Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ld hl, 0
- ld (___ticksperframe__), hl ; store value to global __ticksperframe__(uint16)
- ; FuncCallAst @38,1 : setspeed
- ld a, 3
- push af
- inc sp
- call _setspeed
- ld hl, 1
- add hl, sp
- ld sp, hl
- ; FuncCallAst @94,1 : setup
- call _setup
- ; WhileAst @96,15
- .LOOP_1:
- ; condition
- ld hl, 178
- ex de, hl
- ld hl, (_i) ; load value from global i
- or a
- sbc hl, de
- ld a, 0
- rla
- or a
- jp z, .ENDLOOP_1
- ; Loop body start
- ; FuncCallAst @97,5 : gotoxy
- ld bc, 6917 ; 27,5
- call lib.gotoxy
- ; PrintAst @97,19
- ld hl, (_i) ; load value from global i
- call lib.printUint
- ld a, ' '
- call lib.putch
- ld hl, -106
- ld (_j), hl ; store value to global j(int16)
- ; WhileAst @98,23
- .LOOP_2:
- ; condition
- ld hl, 107
- ex de, hl
- ld hl, (_j) ; load value from global j
- ld a, l
- sub a, e
- ld a, h
- sbc a, d
- jp po, .LEAVESIGN_3
- xor a, 0x80
- .LEAVESIGN_3:
- rlca
- ld a, 0
- rla
- or a
- jp z, .ENDLOOP_2
- ; Loop body start
- ; FuncCallAst @99,9 : gotoxy
- ld bc, 6922 ; 27,10
- call lib.gotoxy
- ; PrintAst @99,24
- ld hl, (_j) ; load value from global j
- call lib.printInt
- ld a, ' '
- call lib.putch
- ; FuncCallAst @100,17 : shoot
- ld hl, (_j) ; load value from global j
- push hl
- ; CastAst @100,23 int16(uint16)
- ld hl, (_i) ; load value from global i
- push hl
- call _shoot
- ex de, hl
- ld hl, 4
- add hl, sp
- ld sp, hl
- ex de, hl
- ld (_s), hl ; store value to global s(int16)
- ; IfAst @101,9
- .IF_4:
- ; condition
- ld hl, 0
- ex de, hl
- ld hl, (_s) ; load value from global s
- or a
- sbc hl, de
- jp nz, .NE_5
- ld a, 1
- jp .DONE_5
- .NE_5:
- xor a, a
- .DONE_5:
- or a
- jp z, .ELSE_4
- ; FuncCallAst @102,13 : setpixel
- ; CastAst @102,22 uint8(int16)
- ld hl, (_j) ; load value from global j
- ex de, hl
- ld hl, 106
- add hl, de
- ld a, l
- push af
- ; CastAst @102,29 uint8(uint16)
- ld hl, 14
- ex de, hl
- ld hl, (_i) ; load value from global i
- add hl, de
- ld a, l
- pop bc
- ld c, a
- ld a, 255
- call lib.setpixel
- ld hl, -1
- ld (_last), hl ; store value to global last(int16)
- ld hl, (_hits) ; load value from global hits
- inc hl
- ld (_hits), hl ; store value to global hits(int16)
- ; FuncCallAst @105,13 : gotoxy
- ld bc, 6932 ; 27,20
- call lib.gotoxy
- ; PrintAst @105,28
- ld hl, (_hits) ; load value from global hits
- call lib.printInt
- jp .ENDIF_4
- .ELSE_4:
- ; FuncCallAst @107,13 : setpixel
- ; CastAst @107,22 uint8(int16)
- ld hl, (_j) ; load value from global j
- ex de, hl
- ld hl, 106
- add hl, de
- ld a, l
- push af
- ; CastAst @107,29 uint8(uint16)
- ld hl, 14
- ex de, hl
- ld hl, (_i) ; load value from global i
- add hl, de
- ld a, l
- pop bc
- ld c, a
- ; CastAst @107,35 uint8(int16)
- ld a, (_s) ; load low byte from global s
- call lib.setpixel
- ; IfAst @108,13
- .IF_6:
- ; condition
- ld hl, (_j) ; load value from global j
- ex de, hl
- ld hl, 0
- ld a, l
- sub a, e
- ld a, h
- sbc a, d
- jp po, .LEAVESIGN_7
- xor a, 0x80
- .LEAVESIGN_7:
- rlca
- ld a, 0
- rla
- or a
- jp z, .ENDIF_6
- ; IfAst @109,17
- .IF_8:
- ; condition
- ld hl, (_last) ; load value from global last
- ex de, hl
- ld hl, (_s) ; load value from global s
- or a
- sbc hl, de
- jp nz, .NE_9
- ld a, 1
- jp .DONE_9
- .NE_9:
- xor a, a
- .DONE_9:
- or a
- jp z, .ELSE_8
- ld hl, (_count) ; load value from global count
- inc hl
- ld (_count), hl ; store value to global count(int16)
- ; IfAst @111,21
- .IF_10:
- ; condition
- ld hl, (_count) ; load value from global count
- ex de, hl
- ld hl, 5
- ld a, l
- sub a, e
- ld a, h
- sbc a, d
- jp po, .LEAVESIGN_11
- xor a, 0x80
- .LEAVESIGN_11:
- rlca
- ld a, 0
- rla
- or a
- jp z, .ENDIF_10
- ; FuncCallAst @112,25 : line
- ; CastAst @112,50 uint8(int16)
- ld a, (_s) ; load low byte from global s
- push af
- inc sp
- ld hl, (_j) ; load value from global j
- ex de, hl
- ld hl, 106
- or a
- sbc hl, de
- push hl
- ; CastAst @112,37 int16(uint16)
- ld hl, 14
- ex de, hl
- ld hl, (_i) ; load value from global i
- add hl, de
- push hl
- ld hl, (_j) ; load value from global j
- ex de, hl
- ld hl, 107
- add hl, de
- push hl
- call _line
- ld hl, 7
- add hl, sp
- ld sp, hl
- ; BreakAst @113,25
- jp .ENDLOOP_2
- .ENDIF_10:
- jp .ENDIF_8
- .ELSE_8:
- ld hl, (_s) ; load value from global s
- ld (_last), hl ; store value to global last(int16)
- ld hl, 1
- ld (_count), hl ; store value to global count(int16)
- .ENDIF_8:
- jp .ENDIF_6
- .ENDIF_6:
- .ENDIF_4:
- ; Loop body end
- ; Loop step start
- .STEPLOOP_2:
- ld hl, (_j) ; load value from global j
- inc hl
- ld (_j), hl ; store value to global j(int16)
- ; Loop step end
- jp .LOOP_2
- .ENDLOOP_2:
- ; Loop body end
- ; Loop step start
- .STEPLOOP_1:
- ld hl, (_i) ; load value from global i
- inc hl
- ld (_i), hl ; store value to global i(uint16)
- ; Loop step end
- jp .LOOP_1
- .ENDLOOP_1:
- ; FuncCallAst @124,1 : ink
- ld a, 0x10 ; ROM ink
- rst 0x10
- ld a, 0
- rst 0x10
- ; FuncCallAst @125,1 : paper
- ld a, 0x11 ; ROM paper
- rst 0x10
- ld a, 6
- rst 0x10
- ; FuncCallAst @126,1 : gotoxy
- ld bc, 1 ; 0,1
- call lib.gotoxy
- ; PrintAst @126,14
- ld a, ' '
- call lib.putch
- __HALT_12:
- jp __HALT_12
- _wait:
- .FUNC_13:
- push ix
- ld ix, 0
- add ix, sp
- ld hl, -1
- add hl, sp
- ld sp, hl
- ; FuncCallAst @5,15 : peek
- ; CastAst @5,20 uint16(int16)
- ld hl, 23672
- ld a, (hl)
- ld (ix-1), a ; store value to local start(uint8)
- ; WhileAst @6,3
- .LOOP_14:
- ; condition
- ld a, (ix+4) ; load value from parameter n
- push af
- ld a, (ix-1) ; load value from local start
- push af
- ; FuncCallAst @6,10 : peek
- ld a, (23672)
- pop bc
- sub a, b
- pop bc
- sub a, b
- ld a, 0
- rla
- or a
- jp z, .ENDLOOP_14
- ; Loop body start
- ; Loop body end
- jp .LOOP_14
- .ENDLOOP_14:
- .ENDFUNC_13:
- ld sp, ix
- pop ix
- ret
- _calibrate:
- .FUNC_15:
- push ix
- ld ix, 0
- add ix, sp
- ld hl, -1
- add hl, sp
- ld sp, hl
- ; AsmAst @11,5
- __asm_16:
- ; start inline asm
- ld a, i ; Get IF1 loaded into P/V flag
- jp pe, .skip ; If enabled we are fine,
- ld a, i ; if disabled we need to load again just incase an interrupt fired during the first load
- .skip:
- push af
- ei
- ; end inline asm
- ld hl, 0
- ld (___ticksperframe__), hl ; store value to global __ticksperframe__(uint16)
- ; FuncCallAst @14,15 : peek
- ; CastAst @14,20 uint16(int16)
- ld hl, 23672
- ld a, (hl)
- ld (ix-1), a ; store value to local start(uint8)
- ; WhileAst @15,3
- .LOOP_17:
- ; condition
- ld a, 2
- push af
- ld a, (ix-1) ; load value from local start
- push af
- ; FuncCallAst @15,10 : peek
- ld a, (23672)
- pop bc
- sub a, b
- pop bc
- sub a, b
- ld a, 0
- rla
- or a
- jp z, .ENDLOOP_17
- ; Loop body start
- ; Loop body end
- jp .LOOP_17
- .ENDLOOP_17:
- ; FuncCallAst @18,11 : peek
- ld a, (23672)
- ld (ix-1), a ; store value to local start(uint8)
- ; WhileAst @19,3
- .LOOP_18:
- ; condition
- ld a, 1
- push af
- ld a, (ix-1) ; load value from local start
- push af
- ; FuncCallAst @19,10 : peek
- ld a, (23672)
- pop bc
- sub a, b
- pop bc
- sub a, b
- ld a, 0
- rla
- or a
- jp z, .ENDLOOP_18
- ; Loop body start
- ld hl, (___ticksperframe__) ; load value from global __ticksperframe__
- inc hl
- ld (___ticksperframe__), hl ; store value to global __ticksperframe__(uint16)
- ; Loop body end
- jp .LOOP_18
- .ENDLOOP_18:
- ld hl, 50
- ex de, hl
- ld hl, (___ticksperframe__) ; load value from global __ticksperframe__
- call lib.udiv16
- ld (___ticksperframe__), hl ; store value to global __ticksperframe__(uint16)
- ; AsmAst @23,3
- __asm_19:
- ; start inline asm
- pop af
- jp pe, .keepEnabled
- di
- .keepEnabled:
- ; end inline asm
- .ENDFUNC_15:
- ld sp, ix
- pop ix
- ret
- _setspeed:
- .FUNC_20:
- push ix
- ld ix, 0
- add ix, sp
- ; FuncCallAst @27,5 : nextreg
- ld a, 4
- ld b, a
- ld a, (ix+4) ; load value from parameter speed
- call lib.udiv8
- ld a, b
- nextreg 7, a
- ; FuncCallAst @28,5 : calibrate
- call _calibrate
- .ENDFUNC_20:
- pop ix
- ret
- _waitticks:
- .FUNC_21:
- push ix
- ld ix, 0
- add ix, sp
- ld hl, (___ticksperframe__) ; load value from global __ticksperframe__
- ex de, hl
- ld l, (ix + 4) ; load value from parameter n
- ld h, (ix + 5)
- call lib.umul16
- ld (ix + 5), h ; store value to parameter n(uint16)
- ld (ix + 4), l
- ; WhileAst @33,5
- .LOOP_22:
- ; condition
- ld l, (ix + 4) ; load value from parameter n
- ld h, (ix + 5)
- ex de, hl
- ld hl, 0
- or a
- sbc hl, de
- ld a, 0
- rla
- or a
- jp z, .ENDLOOP_22
- ; Loop body start
- ld l, (ix + 4) ; load value from parameter n
- ld h, (ix + 5)
- dec hl
- ld (ix + 5), h ; store value to parameter n(uint16)
- ld (ix + 4), l
- ; Loop body end
- jp .LOOP_22
- .ENDLOOP_22:
- .ENDFUNC_21:
- pop ix
- ret
- _line:
- .FUNC_23:
- push ix
- ld ix, 0
- add ix, sp
- ld hl, -2
- add hl, sp
- ld sp, hl
- ld hl, 0
- ld (ix-2), l ; store value to local i(int16)
- ld (ix-1), h
- ; WhileAst @14,14
- .LOOP_24:
- ; condition
- ld l, (ix + 8) ; load value from parameter length
- ld h, (ix + 9)
- ex de, hl
- ld l, (ix-2) ; load value from local i
- ld h, (ix-1)
- ld a, l
- sub a, e
- ld a, h
- sbc a, d
- jp po, .LEAVESIGN_25
- xor a, 0x80
- .LEAVESIGN_25:
- rlca
- ld a, 0
- rla
- or a
- jp z, .ENDLOOP_24
- ; Loop body start
- ; FuncCallAst @15,9 : setpixel
- ; CastAst @15,18 uint8(int16)
- ld l, (ix-2) ; load value from local i
- ld h, (ix-1)
- ex de, hl
- ld l, (ix + 4) ; load value from parameter x
- ld h, (ix + 5)
- add hl, de
- ld a, l
- push af
- ; CastAst @15,25 uint8(int16)
- ld a, (ix + 6) ; load low byte from parameter y
- pop bc
- ld c, a
- ld a, (ix+10) ; load value from parameter color
- call lib.setpixel
- ; Loop body end
- ; Loop step start
- .STEPLOOP_24:
- ld l, (ix-2) ; load value from local i
- ld h, (ix-1)
- inc hl
- ld (ix-2), l ; store value to local i(int16)
- ld (ix-1), h
- ; Loop step end
- jp .LOOP_24
- .ENDLOOP_24:
- .ENDFUNC_23:
- ld sp, ix
- pop ix
- ret
- _shoot:
- .FUNC_26:
- push ix
- ld ix, 0
- add ix, sp
- ld hl, -6
- add hl, sp
- ld sp, hl
- ld hl, 0
- ld (ix-2), l ; store value to local x(int16)
- ld (ix-1), h
- ld hl, 0
- ld (ix-4), l ; store value to local y(int16)
- ld (ix-3), h
- ld hl, -32768
- ld (ix-6), l ; store value to local high(int16)
- ld (ix-5), h
- ; WhileAst @24,5
- .LOOP_27:
- ; Loop body start
- ld l, (ix + 4) ; load value from parameter dx
- ld h, (ix + 5)
- ex de, hl
- ld l, (ix-2) ; load value from local x
- ld h, (ix-1)
- add hl, de
- ld (ix-2), l ; store value to local x(int16)
- ld (ix-1), h
- ld l, (ix + 6) ; load value from parameter dy
- ld h, (ix + 7)
- ex de, hl
- ld l, (ix-4) ; load value from local y
- ld h, (ix-3)
- add hl, de
- ld (ix-4), l ; store value to local y(int16)
- ld (ix-3), h
- ; IfAst @28,9
- .IF_28:
- ; condition
- ld l, (ix-4) ; load value from local y
- ld h, (ix-3)
- ex de, hl
- ld l, (ix-6) ; load value from local high
- ld h, (ix-5)
- ld a, l
- sub a, e
- ld a, h
- sbc a, d
- jp po, .LEAVESIGN_29
- xor a, 0x80
- .LEAVESIGN_29:
- rlca
- ld a, 0
- rla
- or a
- jp z, .ENDIF_28
- ld l, (ix-4) ; load value from local y
- ld h, (ix-3)
- ld (ix-6), l ; store value to local high(int16)
- ld (ix-5), h
- jp .ENDIF_28
- .ENDIF_28:
- ; IfAst @32,9
- .IF_30:
- ; condition
- ld l, (ix + 4) ; load value from parameter dx
- ld h, (ix + 5)
- ex de, hl
- ld hl, 0
- ld a, l
- sub a, e
- ld a, h
- sbc a, d
- jp po, .LEAVESIGN_31
- xor a, 0x80
- .LEAVESIGN_31:
- rlca
- ld a, 0
- rla
- or a
- jp z, .ELSEIF_30.0
- ld l, (ix + 4) ; load value from parameter dx
- ld h, (ix + 5)
- dec hl
- ld (ix + 5), h ; store value to parameter dx(int16)
- ld (ix + 4), l
- jp .ENDIF_30
- .ELSEIF_30.0:
- ; condition
- ld hl, 0
- ex de, hl
- ld l, (ix + 4) ; load value from parameter dx
- ld h, (ix + 5)
- ld a, l
- sub a, e
- ld a, h
- sbc a, d
- jp po, .LEAVESIGN_32
- xor a, 0x80
- .LEAVESIGN_32:
- rlca
- ld a, 0
- rla
- or a
- jp z, .ENDIF_30
- ld l, (ix + 4) ; load value from parameter dx
- ld h, (ix + 5)
- inc hl
- ld (ix + 5), h ; store value to parameter dx(int16)
- ld (ix + 4), l
- jp .ENDIF_30
- .ENDIF_30:
- ld l, (ix + 6) ; load value from parameter dy
- ld h, (ix + 7)
- dec hl
- ld (ix + 7), h ; store value to parameter dy(int16)
- ld (ix + 6), l
- ; IfAst @39,9
- .IF_33:
- ; condition
- ld hl, -71
- ex de, hl
- ld l, (ix-4) ; load value from local y
- ld h, (ix-3)
- ld a, e
- sub a, l
- ld a, d
- sbc a, h
- jp po, .LEAVESIGN_34
- xor a, 0x80
- .LEAVESIGN_34:
- rlca
- ld a, 0
- rla
- xor a, 1
- or a
- jp z, .ENDIF_33
- ; IfAst @40,13
- .IF_35:
- ; condition
- ld hl, -106
- ex de, hl
- ld l, (ix-4) ; load value from local y
- ld h, (ix-3)
- ld a, l
- sub a, e
- ld a, h
- sbc a, d
- jp po, .LEAVESIGN_36
- xor a, 0x80
- .LEAVESIGN_36:
- rlca
- ld a, 0
- rla
- push af
- ld hl, 0
- ex de, hl
- ld l, (ix + 6) ; load value from parameter dy
- ld h, (ix + 7)
- ld a, l
- sub a, e
- ld a, h
- sbc a, d
- jp po, .LEAVESIGN_37
- xor a, 0x80
- .LEAVESIGN_37:
- rlca
- ld a, 0
- rla
- pop bc
- or a
- jp z, .FALSE_38
- ld a, b
- .FALSE_38:
- or a
- jp z, .ENDIF_35
- ; IfAst @41,17
- .IF_39:
- ; condition
- ld hl, 143
- ex de, hl
- ld l, (ix-2) ; load value from local x
- ld h, (ix-1)
- ld a, l
- sub a, e
- ld a, h
- sbc a, d
- jp po, .LEAVESIGN_40
- xor a, 0x80
- .LEAVESIGN_40:
- rlca
- ld a, 0
- rla
- or a
- jp z, .ELSEIF_39.0
- ; ReturnAst @42,21
- ld l, (ix-2) ; load value from local x
- ld h, (ix-1)
- ex de, hl
- ld hl, 143
- or a
- sbc hl, de
- jp .ENDFUNC_26
- .ELSEIF_39.0:
- ; condition
- ld l, (ix-2) ; load value from local x
- ld h, (ix-1)
- ex de, hl
- ld hl, 177
- ld a, l
- sub a, e
- ld a, h
- sbc a, d
- jp po, .LEAVESIGN_41
- xor a, 0x80
- .LEAVESIGN_41:
- rlca
- ld a, 0
- rla
- or a
- jp z, .ELSE_39
- ; ReturnAst @44,21
- ld hl, 177
- ex de, hl
- ld l, (ix-2) ; load value from local x
- ld h, (ix-1)
- or a
- sbc hl, de
- jp .ENDFUNC_26
- .ELSE_39:
- ; ReturnAst @46,21
- ld l, (ix-4) ; load value from local y
- ld h, (ix-3)
- ex de, hl
- ld hl, -106
- or a
- sbc hl, de
- jp .ENDFUNC_26
- .ENDIF_39:
- jp .ENDIF_35
- .ENDIF_35:
- ; IfAst @50,13
- .IF_42:
- ; condition
- ld l, (ix-4) ; load value from local y
- ld h, (ix-3)
- ex de, hl
- ld hl, -106
- ld a, e
- sub a, l
- ld a, d
- sbc a, h
- jp po, .LEAVESIGN_43
- xor a, 0x80
- .LEAVESIGN_43:
- rlca
- ld a, 0
- rla
- xor a, 1
- push af
- ld hl, 177
- ex de, hl
- ld l, (ix-2) ; load value from local x
- ld h, (ix-1)
- ld a, e
- sub a, l
- ld a, d
- sbc a, h
- jp po, .LEAVESIGN_44
- xor a, 0x80
- .LEAVESIGN_44:
- rlca
- ld a, 0
- rla
- xor a, 1
- push af
- ld l, (ix-2) ; load value from local x
- ld h, (ix-1)
- ex de, hl
- ld hl, 143
- ld a, e
- sub a, l
- ld a, d
- sbc a, h
- jp po, .LEAVESIGN_45
- xor a, 0x80
- .LEAVESIGN_45:
- rlca
- ld a, 0
- rla
- xor a, 1
- pop bc
- or a
- jp z, .FALSE_46
- ld a, b
- .FALSE_46:
- pop bc
- or a
- jp z, .FALSE_47
- ld a, b
- .FALSE_47:
- or a
- jp z, .ENDIF_42
- ; IfAst @51,17
- .IF_48:
- ; condition
- ld l, (ix-6) ; load value from local high
- ld h, (ix-5)
- ex de, hl
- ld hl, (_best) ; load value from global best
- ld a, l
- sub a, e
- ld a, h
- sbc a, d
- jp po, .LEAVESIGN_49
- xor a, 0x80
- .LEAVESIGN_49:
- rlca
- ld a, 0
- rla
- or a
- jp z, .ENDIF_48
- ld l, (ix-6) ; load value from local high
- ld h, (ix-5)
- ld (_best), hl ; store value to global best(int16)
- ; FuncCallAst @53,21 : gotoxy
- ld bc, 6927 ; 27,15
- call lib.gotoxy
- ; PrintAst @54,21
- ld hl, (_best) ; load value from global best
- call lib.printInt
- jp .ENDIF_48
- .ENDIF_48:
- ; ReturnAst @56,17
- ld hl, 0
- jp .ENDFUNC_26
- .ENDIF_42:
- jp .ENDIF_33
- .ENDIF_33:
- ; Loop body end
- jp .LOOP_27
- .ENDLOOP_27:
- .ENDFUNC_26:
- ld sp, ix
- pop ix
- ret
- _setup:
- .FUNC_50:
- push ix
- ld ix, 0
- add ix, sp
- ld hl, -2
- add hl, sp
- ld sp, hl
- ; FuncCallAst @63,5 : setspeed
- ld a, 3
- push af
- inc sp
- call _setspeed
- ld hl, 1
- add hl, sp
- ld sp, hl
- ; FuncCallAst @64,5 : mode256x192
- call lib.mode256x192
- ; FuncCallAst @66,5 : cls
- ld a, 227
- call lib.cls
- ; FuncCallAst @68,5 : bright
- ld a, 0x13 ; ROM bright
- rst 0x10
- ld a, 0
- rst 0x10
- ; FuncCallAst @69,5 : paper
- ld a, 0x11 ; ROM paper
- rst 0x10
- ld a, 0
- rst 0x10
- ; FuncCallAst @70,5 : ink
- ld a, 0x10 ; ROM ink
- rst 0x10
- ld a, 7
- rst 0x10
- ; PrintAst @72,5
- ld hl, @str_0
- call lib.printString
- ld hl, 0
- ld (ix-2), l ; store value to local i(int16)
- ld (ix-1), h
- ; WhileAst @73,14
- .LOOP_51:
- ; condition
- ld hl, 7
- ex de, hl
- ld l, (ix-2) ; load value from local i
- ld h, (ix-1)
- ld a, e
- sub a, l
- ld a, d
- sbc a, h
- jp po, .LEAVESIGN_52
- xor a, 0x80
- .LEAVESIGN_52:
- rlca
- ld a, 0
- rla
- xor a, 1
- or a
- jp z, .ENDLOOP_51
- ; Loop body start
- ; FuncCallAst @74,9 : line
- ld a, 224
- push af
- inc sp
- ld hl, 8
- push hl
- ld l, (ix-2) ; load value from local i
- ld h, (ix-1)
- ex de, hl
- ld hl, 7
- or a
- sbc hl, de
- push hl
- ld l, (ix-2) ; load value from local i
- ld h, (ix-1)
- ex de, hl
- ld hl, 208
- add hl, de
- push hl
- call _line
- ld hl, 7
- add hl, sp
- ld sp, hl
- ; FuncCallAst @75,9 : line
- ld a, 252
- push af
- inc sp
- ld hl, 8
- push hl
- ld l, (ix-2) ; load value from local i
- ld h, (ix-1)
- ex de, hl
- ld hl, 7
- or a
- sbc hl, de
- push hl
- ld l, (ix-2) ; load value from local i
- ld h, (ix-1)
- ex de, hl
- ld hl, 216
- add hl, de
- push hl
- call _line
- ld hl, 7
- add hl, sp
- ld sp, hl
- ; FuncCallAst @76,9 : line
- ld a, 28
- push af
- inc sp
- ld hl, 8
- push hl
- ld l, (ix-2) ; load value from local i
- ld h, (ix-1)
- ex de, hl
- ld hl, 7
- or a
- sbc hl, de
- push hl
- ld l, (ix-2) ; load value from local i
- ld h, (ix-1)
- ex de, hl
- ld hl, 224
- add hl, de
- push hl
- call _line
- ld hl, 7
- add hl, sp
- ld sp, hl
- ; FuncCallAst @77,9 : line
- ld a, 31
- push af
- inc sp
- ld hl, 8
- push hl
- ld l, (ix-2) ; load value from local i
- ld h, (ix-1)
- ex de, hl
- ld hl, 7
- or a
- sbc hl, de
- push hl
- ld l, (ix-2) ; load value from local i
- ld h, (ix-1)
- ex de, hl
- ld hl, 232
- add hl, de
- push hl
- call _line
- ld hl, 7
- add hl, sp
- ld sp, hl
- ; Loop body end
- ; Loop step start
- .STEPLOOP_51:
- ld l, (ix-2) ; load value from local i
- ld h, (ix-1)
- inc hl
- ld (ix-2), l ; store value to local i(int16)
- ld (ix-1), h
- ; Loop step end
- jp .LOOP_51
- .ENDLOOP_51:
- ; FuncCallAst @80,5 : gotoxy
- ld bc, 6916 ; 27,4
- call lib.gotoxy
- ; PrintAst @80,19
- ld hl, @str_1
- call lib.printString
- ; FuncCallAst @81,5 : gotoxy
- ld bc, 6921 ; 27,9
- call lib.gotoxy
- ; PrintAst @81,19
- ld hl, @str_2
- call lib.printString
- ; FuncCallAst @82,5 : gotoxy
- ld bc, 6926 ; 27,14
- call lib.gotoxy
- ; PrintAst @82,20
- ld hl, @str_3
- call lib.printString
- ; FuncCallAst @83,5 : gotoxy
- ld bc, 6931 ; 27,19
- call lib.gotoxy
- ; PrintAst @83,20
- ld hl, @str_4
- call lib.printString
- ; FuncCallAst @85,5 : paper
- ld a, 0x11 ; ROM paper
- rst 0x10
- ld a, 7
- rst 0x10
- ; FuncCallAst @86,5 : ink
- ld a, 0x10 ; ROM ink
- rst 0x10
- ld a, 0
- rst 0x10
- ; FuncCallAst @87,5 : bright
- ld a, 0x13 ; ROM bright
- rst 0x10
- ld a, 1
- rst 0x10
- ; FuncCallAst @88,5 : gotoxy
- ld bc, 6917 ; 27,5
- call lib.gotoxy
- ; PrintAst @88,20
- ld hl, @str_5
- call lib.printString
- ; FuncCallAst @89,5 : gotoxy
- ld bc, 6922 ; 27,10
- call lib.gotoxy
- ; PrintAst @89,20
- ld hl, @str_5
- call lib.printString
- ; FuncCallAst @90,5 : gotoxy
- ld bc, 6927 ; 27,15
- call lib.gotoxy
- ; PrintAst @90,20
- ld hl, @str_5
- call lib.printString
- ; FuncCallAst @91,5 : gotoxy
- ld bc, 6932 ; 27,20
- call lib.gotoxy
- ; PrintAst @91,20
- ld hl, @str_5
- call lib.printString
- .ENDFUNC_50:
- ld sp, ix
- pop ix
- ret
- ___ticksperframe__ dw 0
- _last dw -1
- _best dw -32768
- _hits dw 0
- _count dw 0
- _i dw 0
- _j dw -106
- _s dw 0
- @str_0 db 32,0,"ZXPrinter's Trick Shot "
- @str_1 db 5,0,"x-vel"
- @str_2 db 5,0,"y-vel"
- @str_3 db 5,0,"y-max"
- @str_4 db 5,0,"Hits "
- @str_5 db 5,0," 0 "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement