prog8/examples/test.p8

47 lines
724 B
Plaintext
Raw Normal View History

%import textio
%import string
%zeropage basicsafe
2020-12-08 00:02:38 +00:00
%option no_sysinit
main {
2021-01-13 21:32:17 +00:00
sub start() {
str name = "abcdef"
uword ptr = &name
ubyte cc
cc = @(ptr)
txt.chrout(cc)
txt.nl()
cc = @(ptr+1)
txt.chrout(cc)
2021-01-14 21:51:09 +00:00
txt.nl()
cc = @(ptr+2)
txt.chrout(cc)
2021-01-14 21:51:09 +00:00
txt.nl()
txt.nl()
txt.chrout(@(ptr))
txt.chrout(@(ptr+1))
txt.chrout(@(ptr+2))
2021-01-14 21:51:09 +00:00
txt.nl()
@(ptr) = '1'
@(ptr+1) = '2'
@(ptr+2) = '3'
txt.print(name)
2021-01-14 21:51:09 +00:00
txt.nl()
cc=0
@(ptr+cc) = 'a'
@(ptr+cc+1) = 'b'
@(ptr+cc+2) = 'c'
txt.print(name)
2021-01-14 21:51:09 +00:00
txt.nl()
2021-01-10 14:15:00 +00:00
}
2020-08-27 17:47:50 +00:00
}