![]() |
|
trying to print from assembly - Printable Version +- Boriel Basic Forum (https://forum.boriel.com) +-- Forum: Compilers and Computer Languages (https://forum.boriel.com/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://forum.boriel.com/forumdisplay.php?fid=11) +---- Forum: How-To & Tutorials (https://forum.boriel.com/forumdisplay.php?fid=13) +---- Thread: trying to print from assembly (/showthread.php?tid=546) |
trying to print from assembly - slenkar - 2013-05-20 this doesnt compile because the label is made outside of ASM tags Code: function FASTCALL drawthis() as ubyte
asm
LD A,(landscapeeightiter)
INC A
LD (landscapeeightiter),A
end asm
end function
for x=0 to 20
drawthis()
Print AT x,0;STR(PEEK(@landscapeeightiter))+"-"
next
STOP
landscapeeightiter:
ASM
defb 100
END ASMim trying to print the value of the byte at the address, but also modify it in assembly Re: trying to print from assembly - boriel - 2013-05-20 slenkar Wrote:this doesnt compile because the label is made outside of ASM tags At the moment you can try in assembler: Code: DIM a as Ubyte
...
LD a, (_variableName)This only works for *global* variables. Re: trying to print from assembly - slenkar - 2013-05-21 ah yes thanks that works Re: trying to print from assembly - britlion - 2013-05-23 In addition you might find camel case useful. landscapeEightIter might be more readable than landscapeeightiter <!-- m --><a class="postlink" href="http://en.wikipedia.org/wiki/CamelCase">http://en.wikipedia.org/wiki/CamelCase</a><!-- m --> |