So I've tried to create and access AppVars in a MirageOS Asm program, but for some weird reason, the program doesn't seem to recognize that the AppVar exists, even when I've manually checked that it does. My code looks something like this...
Code:
Also, the AppVar that's created is apparently 20 bytes when I check it in the memory menu, but the value of SizeVar, which is the HL parameter passed to the CreateAppVar b_call, is like, 4 bytes.
Anybody know what's going on?
Code:
GetAppVar: ;finds appvar and gets data from it
ld HL, Name9Bytes
rst rMov9ToOp1
rst rFindSym
jr c, AppVarNotExist
;verify Appvar is in RAM, etc...
;and try to extract data
AppVarNotExist:
;unimportant stuff
;...
Done: ;when program is finished, save data and quit
ld HL, Name9Bytes
rst rMov9ToOp1
rst rFindSym
jr nc, DoneVarExists
ld HL, SizeVar
b_call(_CreateAppVar)
DoneVarExists:
;save data
call quittoshell
Also, the AppVar that's created is apparently 20 bytes when I check it in the memory menu, but the value of SizeVar, which is the HL parameter passed to the CreateAppVar b_call, is like, 4 bytes.
Anybody know what's going on?