prog8/todo.ill

166 lines
3.5 KiB
Plaintext
Raw Normal View History

%output prg,basic
2018-01-03 20:43:19 +00:00
%import c64lib
%import mathlib
~ main {
2018-01-01 17:57:12 +00:00
const num = 2
var var1 =2
var .word wvar1 = 2
2018-01-03 20:43:19 +00:00
start:
2018-01-01 22:46:33 +00:00
A=math.randbyte()
2018-01-03 20:43:19 +00:00
A += c64.RASTER
2018-01-01 22:46:33 +00:00
A-=c64.TIME_LO
X,A=math.divmod_bytes(A, 99)
c64scr.print_byte_decimal(A)
c64.CHROUT('\n')
return
2018-01-03 20:43:19 +00:00
rndloop:
2018-01-01 22:46:33 +00:00
XY = math.randword()
%asm {
txa
sta $0400,y
tya
sta $0500,x
}
;[wvar1] = 81 ; @todo implement pointers like this
goto rndloop
A = math.randbyte()
Y=A
%asm {
txa
sta $0400,y
}
X--
if_ne goto rndloop
%asm {
iny
sty math.randbyte._seed
}
goto rndloop
return
goto start
2018-01-01 17:57:12 +00:00
X <<= var1
X >>= var1
2018-01-01 16:56:55 +00:00
var1 ++
var1 += num
X++
X+=num
2018-01-01 17:57:12 +00:00
X+=0
X-=0
X <<= Y
A <<= X
Y <<= A
X <<= 0
X <<= 33333
X >>= 33333
X <<= 2
X <<= 7
X <<= 8
X <<= 22
X >>= 0
X >>= 1
X >>= 2
X >>= 7
X >>= 8
X >>= 22
2018-01-03 20:43:19 +00:00
XY = 1
AX = 2
2018-01-05 02:11:13 +00:00
SC =1
var QW
2018-01-03 20:43:19 +00:00
QW =3
2018-01-01 17:57:12 +00:00
;XY <<= 0
;XY <<= 1
;XY <<= 2
2018-01-01 16:56:55 +00:00
%asm {
2018-01-01 15:41:08 +00:00
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-03 20:43:19 +00:00
loop :
2018-01-01 15:41:08 +00:00
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
c64scr.clear_screen (81, 5)
2018-01-03 20:43:19 +00:00
c64scr.clear_screen (81, 5)
c64scr.clear_screen (81, 5)
c64scr.clear_screen (81, 5)
c64scr.clear_screen ! (81, 5)
c64scr.clear_screen ! (81, 5)
c64scr.clear_screen !(81, 5)
c64scr.clear_screen !(81, 5)
c64scr.clear_screen !A (81, 5)
c64scr.clear_screen !X (81, 5)
c64scr.clear_screen !Y (81, 5)
c64scr.clear_screen !XY (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
}