2023-07-08 09:37:29 +00:00
|
|
|
%import textio
|
2023-07-07 19:17:28 +00:00
|
|
|
%zeropage basicsafe
|
2023-07-08 09:37:29 +00:00
|
|
|
%option no_sysinit
|
2023-07-07 19:17:28 +00:00
|
|
|
|
2023-06-27 16:49:49 +00:00
|
|
|
main {
|
|
|
|
sub start() {
|
2023-07-08 09:37:29 +00:00
|
|
|
ubyte @shared current = cx16.screen_mode(0, true)
|
|
|
|
ubyte @shared width
|
|
|
|
ubyte @shared height
|
|
|
|
txt.print_ub(current)
|
|
|
|
txt.nl()
|
|
|
|
cx16.set_screen_mode(128)
|
|
|
|
%asm {{
|
|
|
|
phx
|
|
|
|
jsr cx16.get_screen_mode
|
|
|
|
sta p8_current
|
|
|
|
stx p8_width
|
|
|
|
sty p8_height
|
|
|
|
plx
|
|
|
|
}}
|
|
|
|
txt.print_ub(current)
|
|
|
|
txt.spc()
|
|
|
|
txt.print_ub(width)
|
|
|
|
txt.spc()
|
|
|
|
txt.print_ub(height)
|
|
|
|
txt.nl()
|
|
|
|
txt.nl()
|
|
|
|
|
|
|
|
byte intensity = -25
|
|
|
|
txt.print_b(intensity)
|
|
|
|
txt.nl()
|
|
|
|
txt.print_b(abs(intensity))
|
|
|
|
intensity = abs(intensity)
|
|
|
|
txt.nl()
|
|
|
|
txt.print_b(intensity)
|
|
|
|
txt.nl()
|
|
|
|
word intensityw = 2555
|
|
|
|
txt.print_uw0(12345)
|
|
|
|
txt.nl()
|
|
|
|
txt.print_w(intensityw)
|
|
|
|
txt.nl()
|
|
|
|
txt.print_w(abs(intensityw))
|
|
|
|
intensityw = abs(intensityw)
|
|
|
|
txt.nl()
|
|
|
|
txt.print_w(intensityw)
|
2023-06-26 23:59:22 +00:00
|
|
|
}
|
|
|
|
}
|