2024-03-09 15:38:46 +01:00
|
|
|
%import textio
|
2024-03-08 23:35:15 +01:00
|
|
|
%option no_sysinit
|
2024-03-09 15:38:46 +01:00
|
|
|
%zeropage basicsafe
|
2023-12-31 01:02:33 +01:00
|
|
|
|
2024-01-07 18:48:18 +01:00
|
|
|
main {
|
2024-03-02 14:26:02 +01:00
|
|
|
sub start() {
|
2024-03-11 23:13:32 +01:00
|
|
|
uword @shared ref = $2000
|
|
|
|
ref[5]=10
|
|
|
|
txt.print_ub(ref[5])
|
|
|
|
txt.spc()
|
|
|
|
ref[5]--
|
|
|
|
txt.print_ub(ref[5])
|
|
|
|
txt.spc()
|
|
|
|
ref[5]++
|
|
|
|
txt.print_ub(ref[5])
|
|
|
|
txt.nl()
|
|
|
|
ref[5]-=2
|
|
|
|
txt.print_ub(ref[5])
|
|
|
|
txt.spc()
|
|
|
|
ref[5]+=2
|
|
|
|
txt.print_ub(ref[5])
|
|
|
|
txt.nl()
|
|
|
|
ref[5]-=3
|
|
|
|
txt.print_ub(ref[5])
|
|
|
|
txt.spc()
|
|
|
|
ref[5]+=3
|
|
|
|
txt.print_ub(ref[5])
|
|
|
|
txt.nl()
|
2024-03-09 15:38:46 +01:00
|
|
|
|
|
|
|
|
2024-03-11 23:13:32 +01:00
|
|
|
ubyte[] array = [1,2,3,4,5,10]
|
|
|
|
array[5]=10
|
|
|
|
txt.print_ub(array[5])
|
|
|
|
txt.spc()
|
|
|
|
array[5]--
|
|
|
|
txt.print_ub(array[5])
|
|
|
|
txt.spc()
|
|
|
|
array[5]++
|
|
|
|
txt.print_ub(array[5])
|
|
|
|
txt.nl()
|
|
|
|
array[5]-=2
|
|
|
|
txt.print_ub(array[5])
|
|
|
|
txt.spc()
|
|
|
|
array[5]+=2
|
|
|
|
txt.print_ub(array[5])
|
|
|
|
txt.nl()
|
|
|
|
array[5]-=3
|
|
|
|
txt.print_ub(array[5])
|
|
|
|
txt.spc()
|
|
|
|
array[5]+=3
|
|
|
|
txt.print_ub(array[5])
|
|
|
|
txt.nl()
|
|
|
|
|
|
|
|
|
|
|
|
; cx16.r0L = 5
|
|
|
|
; ref[cx16.r0L]=10
|
|
|
|
; txt.print_ub(ref[cx16.r0L])
|
|
|
|
; txt.spc()
|
|
|
|
; ref[cx16.r0L]--
|
|
|
|
; txt.print_ub(ref[cx16.r0L])
|
|
|
|
; txt.spc()
|
|
|
|
; ref[cx16.r0L]++
|
|
|
|
; txt.print_ub(ref[cx16.r0L])
|
|
|
|
; txt.nl()
|
|
|
|
;
|
|
|
|
; uword @shared uw = 1000
|
|
|
|
; word @shared sw = -1000
|
|
|
|
;
|
|
|
|
; txt.print_uw(uw)
|
|
|
|
; txt.spc()
|
|
|
|
; uw++
|
|
|
|
; txt.print_uw(uw)
|
|
|
|
; txt.spc()
|
|
|
|
; uw--
|
|
|
|
; txt.print_uw(uw)
|
|
|
|
; txt.nl()
|
|
|
|
; uw = $00ff
|
|
|
|
; txt.print_uw(uw)
|
|
|
|
; txt.spc()
|
|
|
|
; uw++
|
|
|
|
; txt.print_uw(uw)
|
|
|
|
; txt.spc()
|
|
|
|
; uw--
|
|
|
|
; txt.print_uw(uw)
|
|
|
|
; txt.nl()
|
|
|
|
;
|
|
|
|
; txt.print_w(sw)
|
|
|
|
; txt.spc()
|
|
|
|
; sw++
|
|
|
|
; txt.print_w(sw)
|
|
|
|
; txt.spc()
|
|
|
|
; sw--
|
|
|
|
; txt.print_w(sw)
|
|
|
|
; txt.nl()
|
|
|
|
; sw = $00ff
|
|
|
|
; txt.print_w(sw)
|
|
|
|
; txt.spc()
|
|
|
|
; sw++
|
|
|
|
; txt.print_w(sw)
|
|
|
|
; txt.spc()
|
|
|
|
; sw--
|
|
|
|
; txt.print_w(sw)
|
|
|
|
; txt.nl()
|
|
|
|
; sw = -257
|
|
|
|
; txt.print_w(sw)
|
|
|
|
; txt.spc()
|
|
|
|
; sw++
|
|
|
|
; txt.print_w(sw)
|
|
|
|
; txt.spc()
|
|
|
|
; sw--
|
|
|
|
; txt.print_w(sw)
|
|
|
|
; txt.nl()
|
|
|
|
|
|
|
|
/*
|
|
|
|
seekerRef[SKR_X]-- this code looks very wrong with the pha/pla stuff
|
|
|
|
bulletRef[BD_Y]--/++
|
|
|
|
enemyRef[EN_MOVE_CNT]--/++
|
|
|
|
|
|
|
|
signed word--/++
|
|
|
|
unsigned word--/++
|
|
|
|
|
|
|
|
attackRef+=FIELD_COUNT
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-03-01 19:45:16 +01:00
|
|
|
}
|
|
|
|
}
|