;;; gcc for m6809 : Apr 3 2025 06:14:16 ;;; 4.6.4 (gcc6809lw pl9) ;;; ABI version 1 ;;; -mint16 .module clock.c .area .text _FONT_Wrapper: ;----- asm ----- ; 21 "../games/clock/game.c" 1 ;;; _FONT: fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 fcb $38,$38,$38,$10,$10,$00,$38,$00,$00,$00,$00,$00 fcb $6c,$6c,$48,$00,$00,$00,$00,$00,$00,$00,$00,$00 fcb $00,$14,$7e,$28,$28,$fc,$50,$00,$00,$00,$00,$00 fcb $3e,$6a,$78,$3c,$1e,$56,$7c,$10,$00,$00,$00,$00 fcb $72,$da,$74,$18,$2e,$5b,$4e,$00,$00,$00,$00,$00 fcb $30,$68,$68,$77,$da,$dc,$76,$00,$00,$00,$00,$00 fcb $18,$18,$10,$00,$00,$00,$00,$00,$00,$00,$00,$00 fcb $08,$10,$30,$30,$30,$30,$10,$08,$00,$00,$00,$00 fcb $20,$10,$18,$18,$18,$18,$10,$20,$00,$00,$00,$00 fcb $00,$10,$54,$38,$54,$10,$00,$00,$00,$00,$00,$00 fcb $00,$18,$18,$7e,$18,$18,$00,$00,$00,$00,$00,$00 fcb $00,$00,$00,$00,$00,$18,$18,$10,$00,$00,$00,$00 fcb $00,$00,$00,$7c,$00,$00,$00,$00,$00,$00,$00,$00 fcb $00,$00,$00,$00,$00,$18,$18,$00,$00,$00,$00,$00 fcb $06,$0c,$0c,$18,$18,$30,$30,$60,$00,$00,$00,$00 fcb $18,$24,$66,$66,$66,$24,$18,$00,$00,$00,$00,$00 fcb $18,$38,$18,$18,$18,$18,$3c,$00,$00,$00,$00,$00 fcb $3c,$66,$06,$0c,$18,$32,$7e,$00,$00,$00,$00,$00 fcb $3c,$66,$06,$1c,$06,$66,$3c,$00,$00,$00,$00,$00 fcb $0c,$1c,$2c,$4c,$7e,$0c,$0c,$00,$00,$00,$00,$00 fcb $3e,$60,$70,$0c,$06,$46,$3c,$00,$00,$00,$00,$00 fcb $1c,$30,$60,$7c,$66,$66,$3c,$00,$00,$00,$00,$00 fcb $7e,$46,$06,$0c,$0c,$18,$18,$00,$00,$00,$00,$00 fcb $3c,$62,$72,$3c,$4e,$46,$3c,$00,$00,$00,$00,$00 fcb $3c,$66,$66,$3e,$06,$0c,$38,$00,$00,$00,$00,$00 fcb $00,$00,$18,$18,$00,$18,$18,$00,$00,$00,$00,$00 fcb $00,$00,$18,$18,$00,$18,$18,$10,$00,$00,$00,$00 fcb $00,$06,$1c,$70,$1c,$06,$00,$00,$00,$00,$00,$00 fcb $00,$00,$7c,$00,$7c,$00,$00,$00,$00,$00,$00,$00 fcb $00,$60,$38,$0e,$38,$60,$00,$00,$00,$00,$00,$00 fcb $3c,$66,$06,$0c,$10,$00,$30,$00,$00,$00,$00,$00 fcb $38,$44,$de,$e6,$e6,$de,$40,$3c,$00,$00,$00,$00 fcb $18,$18,$2c,$2c,$7e,$46,$ef,$00,$00,$00,$00,$00 fcb $fc,$66,$66,$7c,$66,$66,$fc,$00,$00,$00,$00,$00 fcb $3a,$66,$c0,$c0,$c0,$62,$3c,$00,$00,$00,$00,$00 fcb $f8,$6c,$66,$66,$66,$6c,$f8,$00,$00,$00,$00,$00 fcb $fe,$62,$68,$78,$68,$62,$fc,$00,$00,$00,$00,$00 fcb $fe,$62,$68,$78,$68,$60,$f0,$00,$00,$00,$00,$00 fcb $34,$6c,$c0,$ce,$c4,$64,$38,$00,$00,$00,$00,$00 fcb $f7,$66,$66,$7e,$66,$66,$ef,$00,$00,$00,$00,$00 fcb $3c,$18,$18,$18,$18,$18,$3c,$00,$00,$00,$00,$00 fcb $1e,$0c,$0c,$0c,$6c,$68,$30,$00,$00,$00,$00,$00 fcb $ee,$64,$68,$70,$78,$6c,$ee,$00,$00,$00,$00,$00 fcb $f0,$60,$60,$60,$60,$62,$fc,$00,$00,$00,$00,$00 fcb $f7,$76,$76,$5a,$5a,$5a,$e7,$00,$00,$00,$00,$00 fcb $ce,$64,$74,$7c,$5c,$4c,$e4,$00,$00,$00,$00,$00 fcb $38,$6c,$c6,$c6,$c6,$6c,$38,$00,$00,$00,$00,$00 fcb $fc,$66,$66,$64,$78,$60,$f0,$00,$00,$00,$00,$00 fcb $38,$6c,$c6,$c6,$c6,$6c,$38,$0c,$00,$00,$00,$00 fcb $fc,$66,$66,$7c,$6c,$66,$f7,$00,$00,$00,$00,$00 fcb $3a,$66,$70,$3c,$0e,$66,$5c,$00,$00,$00,$00,$00 fcb $7e,$5a,$18,$18,$18,$18,$3c,$00,$00,$00,$00,$00 fcb $e7,$62,$62,$62,$62,$62,$3c,$00,$00,$00,$00,$00 fcb $e7,$62,$62,$34,$34,$18,$18,$00,$00,$00,$00,$00 fcb $f7,$6a,$6a,$7e,$7e,$76,$62,$00,$00,$00,$00,$00 fcb $e6,$64,$38,$38,$38,$4c,$ce,$00,$00,$00,$00,$00 fcb $f7,$62,$34,$34,$18,$18,$3c,$00,$00,$00,$00,$00 fcb $7e,$46,$0c,$18,$30,$62,$7e,$00,$00,$00,$00,$00 fcb $3c,$30,$30,$30,$30,$30,$30,$3c,$00,$00,$00,$00 fcb $60,$30,$30,$18,$18,$0c,$0c,$06,$00,$00,$00,$00 fcb $3c,$0c,$0c,$0c,$0c,$0c,$0c,$3c,$00,$00,$00,$00 fcb $10,$38,$6c,$44,$00,$00,$00,$00,$00,$00,$00,$00 fcb $00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00 ;--- end asm --- rts _DivMod10: ldd #0 bra L3 L4: leax -10000,x addd #1000 L3: cmpx #9999 ;cmphi: bhi L4 bra L11 L6: leax -1000,x addd #100 L11: cmpx #999 ;cmphi: bhi L6 bra L12 L8: leax -100,x addd #10 L12: cmpx #99 ;cmphi: bhi L8 bra L13 L10: leax -10,x addd #1 L13: cmpx #9 ;cmphi: bhi L10 std [2,s] tfr x,d ;movlsbqihi: R:x -> R:b rts _ClearGraf.constprop.0: ldx #13312 L15: ldd #0 std ,x++ cmpx #16384 ;cmphi: bne L15 rts LC0: .ascii "hello clock\0" .area .text.startup .globl _main _main: pshs y,u ;----- asm ----- ; 5 "../nekot1/game_postlude.h" 1 .globl __n1pre_entry ;--- end asm --- ldx #0 ldu #__n1pre_entry stu ,x ;----- asm ----- ; 8 "../nekot1/game_postlude.h" 1 .globl __n1pre_final ;--- end asm --- ldu #__n1pre_final stu ,x ;----- asm ----- ; 11 "../nekot1/game_postlude.h" 1 .globl __n1pre_final_startup ;--- end asm --- ldy #__n1pre_final_startup sty ,x ldu #_FONT_Wrapper stu ,x jsr _ClearGraf.constprop.0 clrb ldx #13312 jsr _gPMode1Screen ldx #LC0 jsr _gNetworkLog pshs y ldx #__n1pre_final pshs x ldx #_loop jsr _xAfterSetup leas 4,s ldx #0 puls y,u,pc .area .text _loop: pshs y,u leas -18,s jsr _ClearGraf.constprop.0 leax 16,s pshs x ldb _gWall+2 clra ;zero_extendqihi: R:b -> R:d tfr d,x jsr _DivMod10 stb 2,s ldb 19,s addb #48 stb _time_buf ldb 2,s addb #48 stb _time_buf+1 ldb #58 stb _time_buf+2 leax 18,s pshs x ldb _gWall+1 clra ;zero_extendqihi: R:b -> R:d tfr d,x jsr _DivMod10 stb 4,s ldb 21,s addb #48 stb _time_buf+3 ldb 4,s addb #48 stb _time_buf+4 ldb #58 stb _time_buf+5 leax 20,s pshs x ldb _gWall clra ;zero_extendqihi: R:b -> R:d tfr d,x jsr _DivMod10 stb 6,s ldb 23,s addb #48 stb _time_buf+6 ldb 6,s addb #48 stb _time_buf+7 clr _time_buf+8 ldx #_time_buf stx 12,s leas 6,s ldb #3 jmp L28 L23: clra ;zero_extendqihi: R:b -> R:d addd #-32 std ,s aslb rola aslb rola aslb rola tfr d,x ldd ,s aslb rola aslb rola pshs x ;addhi: R:d += R:x addd ,s++ addd #_FONT std 10,s ldd #0 std 2,s L22: ldd 2,s ldu 10,s leax d,u ldb ,x stb 12,s ldd 2,s aslb rola aslb rola aslb rola aslb rola aslb rola addd #14272 std 13,s ldy #0 ldb #-128 stb 5,s L21: ldb 5,s andb 12,s beq L20 tfr y,d ;movlsbqihi: R:y -> R:b stb ,s ldb 4,s addb ,s stb ,s lsrb lsrb clra ;zero_extendqihi: R:b -> R:d addd 13,s std 8,s tfr d,u ldb ,u stb 15,s ldb ,s andb #3 stb ,s clra ;zero_extendqihi: R:b -> R:d tfr d,u ldx #3 tfr x,d pshs u ;subhi: R:d -= R:u subd ,s++ aslb rola tfr d,x ldd #2 jsr _ashlhi3 stb 1,s ldb 15,s eorb 1,s ldu 8,s stb ,u L20: lsr 5,s leay 1,y cmpy #8 ;cmphi: lbne L21 ldd 2,s addd #1 std 2,s cmpd #8 ;cmphi: lbne L22 ldb 4,s addb #9 L28: stb 4,s ldx 6,s leax 1,x stx 6,s leax -1,x ldb ,x+ lbne L23 ldu _gReal+2 bra L24 L25: ldx _junk_counter stx 16382 leax 1,x stx _junk_counter L24: cmpu _gReal+2 ;cmphi: beq L25 leas 18,s puls y,u,pc .area .text.entry __n1pre_entry: .byte 126 .word _main .area .final __n1pre_final: .word -20754 .area .final.setup __n1pre_final_startup: .word -20753 .area .bss _time_buf: .blkb 16 _junk_counter: .blkb 2 .area .absolute .globl _gAlloc64 _gAlloc64 EQU $0BDC .globl _gConfig _gConfig EQU $0607 .globl _gFatal _gFatal EQU $0ABC .globl _gFatalFIRQ _gFatalFIRQ EQU $0B5F .globl _gFatalNMI _gFatalNMI EQU $0B75 .globl _gFatalSWI1 _gFatalSWI1 EQU $0BB9 .globl _gFatalSWI2 _gFatalSWI2 EQU $0BA3 .globl _gFatalSWI3 _gFatalSWI3 EQU $0B8C .globl _gFree64 _gFree64 EQU $07AC .globl _gIrqRestore _gIrqRestore EQU $07A1 .globl _gIrqSaveAndDisable _gIrqSaveAndDisable EQU $0794 .globl _gKern _gKern EQU $0048 .globl _gModeScreen _gModeScreen EQU $0A85 .globl _gNetworkLog _gNetworkLog EQU $0DBD .globl _gPMode1Screen _gPMode1Screen EQU $0A6A .globl _gReal _gReal EQU $0022 .globl _gReceiveCast64 _gReceiveCast64 EQU $084B .globl _gScore _gScore EQU $060B .globl _gSendCast _gSendCast EQU $0DF0 .globl _gTextScreen _gTextScreen EQU $09A8 .globl _gWall _gWall EQU $0026 .globl _memcpy _memcpy EQU $08C1 .globl _memcpy_words _memcpy_words EQU $0868 .globl _memset _memset EQU $089B .globl _memset_words _memset_words EQU $0880 .globl _strlen _strlen EQU $08E3 .globl _xAfterSetup _xAfterSetup EQU $07CC .globl _xSendControlPacket _xSendControlPacket EQU $0DD6