One of the snippets I want to share is this. It is a small BASIC launcher, coded in machine language. It generates a single BASIC line, linked to the address where the code start, all dinamically generated inside CPS. Hope it's useful:
Code: Select all
* = $0801 ; Start of Basic (C64)
word eop ; Pointer to next BASIC line
word 1969 ; Line number
byte $9e ; SYS token
text start_ml ; ML start address
byte 0 ; End of Line
eop
word 0 ; End of Program
start_ml = * ; ML code goes after this line