Line 10 reserves 100 bytes of memory for a block called code.
Line 20 sets the program counter P% to point to the start of this memory block.
Lines 30-150 define the assembly code block. This code loads the ASCII value of each character in "Hello" into the accumulator and then calls the OSWRCH routine (at &FFEE) to print the character to the screen.
Line 160 calls the machine code routine to execute the print operation.
> My favourite thing in TempleOS is inline assembly and sprite graphics in C code.
BBC Basic has inline 6502 assembler.
In this example:Line 10 reserves 100 bytes of memory for a block called code.
Line 20 sets the program counter P% to point to the start of this memory block.
Lines 30-150 define the assembly code block. This code loads the ASCII value of each character in "Hello" into the accumulator and then calls the OSWRCH routine (at &FFEE) to print the character to the screen.
Line 160 calls the machine code routine to execute the print operation.