2021-03-16 23:06:28 +01:00
|
|
|
%import textio
|
2021-03-18 19:17:05 +01:00
|
|
|
%zeropage basicsafe
|
2021-04-01 23:04:13 +02:00
|
|
|
%option no_sysinit
|
2021-02-28 20:40:31 +01:00
|
|
|
|
2021-03-05 22:49:14 +01:00
|
|
|
main {
|
2021-03-15 22:24:09 +01:00
|
|
|
|
2021-03-18 19:17:05 +01:00
|
|
|
sub start() {
|
2021-04-01 22:10:04 +02:00
|
|
|
ubyte thing = otherblock.othersub()
|
2021-04-01 23:04:13 +02:00
|
|
|
txt.print_ub(thing) ; should print 21!
|
2021-03-23 23:44:14 +01:00
|
|
|
|
2021-03-22 01:45:19 +01:00
|
|
|
; str filename = "titlescreen.bin"
|
|
|
|
; ubyte success = cx16.vload(filename, 8, 0, $0000)
|
|
|
|
; if success {
|
|
|
|
; txt.print("load ok")
|
|
|
|
; cx16.VERA_DC_HSCALE = 64
|
|
|
|
; cx16.VERA_DC_VSCALE = 64
|
|
|
|
; cx16.VERA_L1_CONFIG = %00011111 ; 256c bitmap mode
|
|
|
|
; cx16.VERA_L1_MAPBASE = 0
|
|
|
|
; cx16.VERA_L1_TILEBASE = 0
|
|
|
|
; } else {
|
|
|
|
; txt.print("load fail")
|
|
|
|
; }
|
2021-03-16 23:06:28 +01:00
|
|
|
}
|
2021-02-21 22:17:28 +01:00
|
|
|
}
|
2021-03-18 19:17:05 +01:00
|
|
|
|
2021-04-01 23:04:13 +02:00
|
|
|
block3 {
|
|
|
|
ubyte returnvalue=10
|
|
|
|
|
2021-04-02 16:56:52 +02:00
|
|
|
inline sub thing()->ubyte {
|
2021-04-01 23:04:13 +02:00
|
|
|
return returnvalue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-01 22:10:04 +02:00
|
|
|
otherblock {
|
|
|
|
|
|
|
|
ubyte othervar=20
|
|
|
|
ubyte calcparam=10
|
|
|
|
|
|
|
|
sub calc(ubyte zz) -> ubyte {
|
2021-04-01 23:04:13 +02:00
|
|
|
return zz+1+block3.thing()
|
2021-04-01 22:10:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
inline sub othersub() -> ubyte {
|
2021-04-02 16:56:52 +02:00
|
|
|
return calc(calcparam)+othervar
|
2021-04-01 22:10:04 +02:00
|
|
|
}
|
|
|
|
}
|