In the last tutorial we pointed out that you can not create permanent self modifying code.
This is bugging me because you definitely can do this. The OS leaves the name of the executing program in OP1, so you can do something like:
bcall(_ChkFindSym) ld hl,smc_num-9D95h+4 ;+4 because DE points tot he size bytes and 2 bytes are the header BB6Dh add hl,de ld e,(hl) inc hl ld d,(hl) inc de ld (hl),d dec hl ld (hl),e ex de,hl bcall(_DispHL) ret smc_num: .dw 0
Note that this won't work on the uncompressed hex codes, so you need to either make sure to use AsmComp() or have it compiled by some compiler.
47%? Take a look and try to imagine how cool 100% will be. This has won zContest 2011 and made news on TICalc. This compromise between Assembly and BASIC parses like BASIC and is fast like assembly. Grammer 2