prog8/todo.ill

85 lines
2.2 KiB
Plaintext
Raw Normal View History

2017-12-30 12:34:52 +00:00
output prg,basic
2017-12-31 03:10:27 +00:00
;reg_preserve off ; @todo global option off/on default off? NOT AN OPTION -> change the default to OFF
2017-12-30 12:34:52 +00:00
import "c64lib"
~ main {
2018-01-01 16:56:55 +00:00
const num = 44
var var1 =22
var .word wvar1 = 22
2018-01-01 15:41:08 +00:00
start
2018-01-01 16:56:55 +00:00
var1 ++
var1 += num
X++
X+=num
2018-01-01 15:41:08 +00:00
asm {
ldy #200
- lda #81
sta c64.Screen+39-40,y
sta c64.Screen+39+4*40,y
sta c64.Screen+39+9*40,y
sta c64.Screen+39+14*40,y
sta c64.Screen+39+19*40,y
lda #83
sta c64.Screen-40,y
sta c64.Screen+4*40,y
sta c64.Screen+9*40,y
sta c64.Screen+14*40,y
sta c64.Screen+19*40,y
lda #1
sta c64.Colors+39-40,y
sta c64.Colors+39+4*40,y
sta c64.Colors+39+9*40,y
sta c64.Colors+39+14*40,y
sta c64.Colors+39+19*40,y
lda #5
sta c64.Colors-40,y
sta c64.Colors+4*40,y
sta c64.Colors+9*40,y
sta c64.Colors+14*40,y
sta c64.Colors+19*40,y
tya
sec
sbc #40
tay
bne -
}
2017-12-31 14:50:50 +00:00
2018-01-01 15:41:08 +00:00
loop
A=c64.GETIN()
if_not goto loop
2018-01-01 16:56:55 +00:00
c64scr.scroll_right_full(1)
2018-01-01 15:41:08 +00:00
goto loop
c64.CHROUT(A)
goto loop
2017-12-31 14:50:50 +00:00
2018-01-01 15:41:08 +00:00
;c64scr.print_byte_hex(0, A)
;c64.CHROUT(' ')
;goto loop
;return
2017-12-31 14:50:50 +00:00
2017-12-31 02:19:06 +00:00
A = $11
X = $22
Y = $33
2018-01-01 15:41:08 +00:00
c64scr.clear_screen !(81, 5) ; @todo new syntax to specify registers to save (! = all three A,X,Y)
;c64scr.clear_screen !A (81, 5) ; @todo new syntax to specify registers to save (only A)
;c64scr.clear_screen !AX (81, 5)
;c64scr.clear_screen !AXY (81, 5)
2017-12-31 02:19:06 +00:00
c64scr.print_byte_hex(1,A)
c64.CHROUT(' ')
c64scr.print_byte_hex(1,X)
c64.CHROUT(' ')
c64scr.print_byte_hex(1,Y)
c64scr.print_word_decimal(1222)
c64.CHROUT('\n')
2017-12-30 12:34:52 +00:00
return
2017-12-30 20:36:42 +00:00
2017-12-30 12:34:52 +00:00
}