Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Zero extending: t39: i16,ch = load<LD2[FixedStack0+1](align=1)> t36, t38, undef:i24
- SEGMENT CODE
- .assume adl = 1
- .file "main.c"
- XDEF _main
- _main:
- ld hl, _asm_ClrLCD
- push hl
- call __OS
- pop hl
- ld hl, _asm_HomeUp
- push hl
- call __OS
- pop hl
- ld hl, _asm_DrawStatusBar
- push hl
- call __OS
- pop hl
- ld hl, 5
- push hl
- ld hl, 2
- push hl
- call _os_SetCursorPos
- ld hl, 6
- add hl, sp
- ld sp, hl
- ld hl, L_.str
- push hl
- call _os_PutStrFull
- pop hl
- ld hl, 5
- push hl
- ld hl, 3
- push hl
- call _os_SetCursorPos
- ld hl, 6
- add hl, sp
- ld sp, hl
- ld hl, L_.str.1
- push hl
- call _os_PutStrFull
- pop hl
- BB0_1:
- call _os_GetCSC
- cp a, 0
- jp z, BB0_1
- call _Init
- jp _gfx_End
- XDEF _printText
- _printText:
- push ix
- ld ix, 0
- add ix, sp
- ld e, (ix + 9)
- push de
- ld l, (ix + 12)
- push hl
- call _os_SetCursorPos
- ld sp, ix
- pop ix
- jp _os_PutStrFull
- XDEF _Canon
- _Canon:
- ld.sis hl, 257
- ld.sis (_Tab+6050), hl
- ld.sis (_Tab+6170), hl
- ld a, 1
- ld (_Tab+7369), a
- ld (_Tab+7373), a
- ld (_Tab+7488), a
- ld (_Tab+7494), a
- ld (_Tab+7608), a
- ld (_Tab+7614), a
- ld (_Tab+7731), a
- ld (_Tab+7849), a
- ld (_Tab+7853), a
- ld (_Tab+8091), a
- ld (_Tab+8687), a
- ld (_Tab+8691), a
- ld.sis (_Tab+8926), hl
- ld.sis (_Tab+8931), hl
- ld (_Tab+10128), a
- ld (_Tab+10129), a
- ld.sis (_Tab+10248), hl
- ld hl, 65793
- ld (_Tab+7250), hl
- ld (_Tab+7970), hl
- ld (_Tab+8448), hl
- ld (_Tab+8568), hl
- ret
- XDEF _Init
- _Init:
- push ix
- ld ix, 0
- add ix, sp
- lea hl, ix + -6
- ld sp, hl
- ld hl, 158
- ld iy, _Tab+121
- BB3_1:
- ld (ix + -6), iy
- ld (ix + -3), hl
- ld hl, 118
- push hl
- or a, a
- sbc hl, hl
- push hl
- push iy
- call _memset
- ld hl, (ix + -3)
- ld iy, 9
- add iy, sp
- ld sp, iy
- ld iy, (ix + -6)
- lea iy, iy + 120
- dec hl
- add hl, bc
- or a, a
- sbc hl, bc
- jp nz, BB3_1
- ld.sis hl, 257
- ld.sis (_Tab+6050), hl
- ld.sis (_Tab+6170), hl
- ld a, 1
- ld (_Tab+7369), a
- ld (_Tab+7373), a
- ld (_Tab+7488), a
- ld (_Tab+7494), a
- ld (_Tab+7608), a
- ld (_Tab+7614), a
- ld (_Tab+7731), a
- ld (_Tab+7849), a
- ld (_Tab+7853), a
- ld (_Tab+8091), a
- ld (_Tab+8687), a
- ld (_Tab+8691), a
- ld.sis (_Tab+8926), hl
- ld.sis (_Tab+8931), hl
- ld (_Tab+10128), a
- ld (_Tab+10129), a
- ld.sis (_Tab+10248), hl
- ld hl, 65793
- ld (_Tab+7250), hl
- ld (_Tab+7970), hl
- ld (_Tab+8448), hl
- ld (_Tab+8568), hl
- ld hl, 39
- push hl
- call _gfx_Begin
- pop hl
- or a, a
- sbc hl, hl
- push hl
- call _gfx_FillScreen
- pop hl
- call _Update
- BB3_3:
- call _os_GetCSC
- cp a, 0
- jp z, BB3_3
- jp BB3_5
- BB3_4:
- call _MainLoop
- BB3_5:
- call _os_GetCSC
- cp a, 0
- jp z, BB3_4
- ld sp, ix
- pop ix
- ret
- XDEF _MainLoop
- _MainLoop:
- push ix
- ld ix, 0
- add ix, sp
- lea hl, ix + -28
- ld sp, hl
- ld hl, 1
- push hl
- call _gfx_SetDraw
- pop hl
- or a, a
- sbc hl, hl
- push hl
- call _gfx_FillScreen
- ld de, 0
- pop hl
- ld hl, 2
- push de
- pop iy
- ld (ix + -22), hl
- BB4_1:
- ld bc, 1
- ld hl, (ix + -22)
- call __ior
- lea bc, iy + 0
- ld (ix + -19), hl
- ld iy, (ix + -22)
- lea hl, iy + 2
- ld (ix + -28), hl
- ld (ix + -25), bc
- ld (ix + -15), de
- ld hl, 2
- ld (ix + -12), hl
- BB4_2:
- ld (ix + -9), bc
- push de
- call _gfx_SetDraw
- pop hl
- ld iy, (-1900524)
- ld de, (ix + -9)
- add iy, de
- ld (ix + -6), iy
- lea hl, iy + 0
- ld de, 642
- add hl, de
- ld a, (hl)
- ld (ix + -16), a
- ld hl, 1
- push hl
- lea hl, iy + 0
- ld de, 640
- add hl, de
- ld a, (hl)
- ld de, 0
- ld e, a
- lea hl, iy + 0
- ld bc, 644
- add hl, bc
- ld a, (hl)
- ld bc, 0
- push bc
- pop iy
- ld iyl, a
- add iy, de
- ld hl, (ix + -6)
- ld de, 1280
- add hl, de
- ld a, (hl)
- push bc
- pop de
- ld e, a
- add iy, de
- ld hl, (ix + -6)
- ld de, 1284
- add hl, de
- ld a, (hl)
- push bc
- pop de
- ld e, a
- add iy, de
- ld hl, (ix + -6)
- ld a, (hl)
- push bc
- pop de
- ld e, a
- lea hl, iy + 0
- add hl, de
- ld iy, (ix + -6)
- ld a, (iy + 4)
- push bc
- pop de
- ld e, a
- add hl, de
- ld iy, (ix + -6)
- ld a, (iy + 2)
- push bc
- pop de
- ld e, a
- add hl, de
- push hl
- pop iy
- ld de, 1282
- ld hl, (ix + -6)
- add hl, de
- ld a, (hl)
- push bc
- pop de
- ld e, a
- add iy, de
- ld (ix + -6), iy
- call _gfx_SetDraw
- ld bc, (ix + -6)
- pop hl
- push bc
- pop hl
- ld de, 765
- or a, a
- sbc hl, de
- add hl, de
- jp nz, BB4_4
- ld hl, (-1900524)
- ld de, (ix + -9)
- add hl, de
- ld de, 642
- add hl, de
- ld (hl), -1
- ld bc, 1
- ld hl, (ix + -12)
- call __ior
- push hl
- pop de
- add hl, hl
- add hl, hl
- push de
- pop bc
- add hl, bc
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- ld iy, (-1900524)
- push hl
- pop bc
- add iy, bc
- ld bc, (ix + -22)
- add iy, bc
- ld a, -1
- ld bc, 640
- jp BB4_8
- BB4_4:
- ld a, (ix + -16)
- ld iy, (ix + -9)
- push bc
- pop hl
- ld de, -510
- add hl, de
- ld (ix + -3), hl
- ld de, (ix + -2)
- or a, a
- sbc hl, hl
- ld l, e
- ld h, d
- add hl, bc
- or a, a
- sbc hl, bc
- jp z, BB4_6
- ld hl, (-1900524)
- lea de, iy + 0
- add hl, de
- ld de, 642
- add hl, de
- ld (hl), 0
- ld bc, 1
- ld hl, (ix + -12)
- call __ior
- push hl
- pop de
- add hl, hl
- add hl, hl
- push de
- pop bc
- add hl, bc
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- ld iy, (-1900524)
- push hl
- pop bc
- add iy, bc
- ld bc, (ix + -22)
- add iy, bc
- xor a, a
- ld bc, 640
- jp BB4_8
- BB4_6:
- push bc
- pop hl
- ld de, 510
- or a, a
- sbc hl, de
- add hl, de
- ld bc, 640
- jp nz, BB4_9
- ld hl, (-1900524)
- ld de, (ix + -9)
- add hl, de
- push de
- pop iy
- ld de, 642
- add hl, de
- ld (hl), a
- ld hl, (-1900524)
- lea de, iy + 0
- add hl, de
- ld de, 962
- add hl, de
- ld iy, (ix + -15)
- lea de, iy + 3
- push hl
- pop iy
- BB4_8:
- ld (iy), a
- push de
- pop hl
- add hl, hl
- add hl, hl
- add hl, de
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- ld iy, (-1900524)
- ex de, hl
- add iy, de
- ld de, (ix + -19)
- add iy, de
- ld (iy), a
- ld hl, (-1900524)
- ld de, (ix + -9)
- add hl, de
- ld de, 643
- add hl, de
- ld (hl), a
- BB4_9:
- ld iy, (ix + -12)
- lea iy, iy + 2
- ld (ix + -12), iy
- ld hl, (ix + -9)
- add hl, bc
- ld (ix + -6), hl
- ld iy, (ix + -15)
- lea iy, iy + 2
- ld c, 2
- ld (ix + -15), iy
- lea hl, iy + 0
- call __ishru
- ld de, -59
- add hl, de
- ld bc, (ix + -6)
- ld de, 0
- jp nc, BB4_2
- ld c, 2
- ld hl, (ix + -22)
- call __ishru
- ld iy, (ix + -25)
- lea iy, iy + 2
- ld bc, -79
- add hl, bc
- ld hl, (ix + -28)
- ld (ix + -22), hl
- jp nc, BB4_1
- ld sp, ix
- pop ix
- jp _gfx_SwapDraw
- XDEF _Update
- _Update:
- push ix
- ld ix, 0
- add ix, sp
- lea hl, ix + -15
- ld sp, hl
- ld iy, 2
- ld hl, _Tab+121
- ld (ix + -15), hl
- ld e, 2
- BB5_1:
- ld bc, 1
- ld (ix + -9), iy
- lea hl, iy + 0
- call __ior
- ld (ix + -12), hl
- or a, a
- sbc hl, hl
- ld (ix + -3), hl
- ld iy, (ix + -15)
- BB5_2:
- ld l, (iy)
- ld a, l
- add a, -128
- cp a, -127
- ld (ix + -6), iy
- ld a, l
- jp c, BB5_5
- cp a, 1
- jp nz, BB5_8
- ld hl, 255
- jp BB5_7
- BB5_5:
- cp a, 0
- jp nz, BB5_8
- or a, a
- sbc hl, hl
- BB5_7:
- push hl
- call _gfx_SetColor
- pop hl
- ld iy, (ix + -3)
- pea iy + 2
- ld hl, (ix + -9)
- push hl
- call _gfx_SetPixel
- ld hl, 6
- add hl, sp
- ld sp, hl
- ld iy, (ix + -3)
- pea iy + 2
- ld hl, (ix + -12)
- push hl
- call _gfx_SetPixel
- ld hl, 6
- add hl, sp
- ld sp, hl
- ld iy, (ix + -3)
- pea iy + 3
- ld hl, (ix + -12)
- push hl
- call _gfx_SetPixel
- ld hl, 6
- add hl, sp
- ld sp, hl
- ld iy, (ix + -3)
- pea iy + 3
- ld hl, (ix + -9)
- push hl
- call _gfx_SetPixel
- ld e, 2
- ld hl, 6
- add hl, sp
- ld sp, hl
- BB5_8:
- ld iy, (ix + -3)
- lea iy, iy + 2
- ld c, e
- ld (ix + -3), iy
- lea hl, iy + 0
- call __ishru
- ld iy, (ix + -6)
- inc iy
- ld bc, -59
- add hl, bc
- jp nc, BB5_2
- ld c, e
- ld de, (ix + -9)
- push de
- pop hl
- call __ishru
- push de
- pop bc
- ld e, 2
- ld iy, (ix + -15)
- lea iy, iy + 120
- ld (ix + -15), iy
- push bc
- pop iy
- lea iy, iy + 2
- ld bc, -79
- add hl, bc
- jp nc, BB5_1
- ld sp, ix
- pop ix
- ret
- SEGMENT TEXT
- XDEF _COLS
- _COLS:
- DW24 160
- XDEF _ROWS
- _ROWS:
- DW24 120
- L_.str:
- DB 71
- DB 97
- DB 109
- DB 101
- DB 32
- DB 79
- DB 102
- DB 32
- DB 76
- DB 105
- DB 102
- DB 101
- DB 33
- DB 0
- L_.str.1:
- DB 80
- DB 114
- DB 101
- DB 115
- DB 115
- DB 32
- DB 65
- DB 110
- DB 121
- DB 32
- DB 107
- DB 101
- DB 121
- DB 46
- DB 46
- DB 46
- DB 0
- SEGMENT BSS
- XDEF _Tab
- _Tab:
- DS 19200
- XREF _gfx_SetPixel
- XREF _gfx_SetColor
- XREF __ior
- XREF _memset
- XREF _gfx_FillScreen
- XREF _asm_HomeUp
- XREF _os_GetCSC
- XREF _gfx_End
- XREF __OS
- XREF _os_PutStrFull
- XREF _asm_DrawStatusBar
- XREF _gfx_Begin
- XREF _asm_ClrLCD
- XREF __ishru
- XREF _gfx_SwapDraw
- XREF _os_SetCursorPos
- XREF _gfx_SetDraw
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement