Re: A86: _exec_basic
[Prev][Next][Index][Thread]
Re: A86: _exec_basic
In a message dated 3/1/00 9:19:57 PM Eastern Standard Time, rabidcow@juno.com
writes:
> _PARSEINP uses __bank_call, which should return the proper rom page,
> right?
> _PARSEOFF does the same thing as _PARSEINP, except it doesn't reset some
> flags first. does this one work?
> what causes the syntax error?
It doesn't give me a syntax error with the following code. However, if I
enable the error handler it crashes after I exit the asm prog (though while
in it everything works fine). Probably not restoring a stack or something.
ld hl,ErrorHandler
call _pushErrorHandler
ld hl,_PARSEVAR
ld de,BasicBackup ;free memory
ld bc,_LASTENTRYPTR-_PARSEVAR
push bc
push de
push hl
ldir
ld hl,(_OPS)
ld (_OPBASE),hl
ld hl,(_FPS)
ld (_FPBASE),hl
call _PARSEINP ;_exec_basic
call _runIndicOff
pop de
pop hl
pop bc
ldir
call _popErrorHandler
;...
ErrorSyntax = 135
ErrorUndefined = 142
ErrorHandler:
cp ErrorSyntax
jr z,TrapError
cp ErrorUndefined
jp nz,_monErrHand ;default error handler
TrapError:
ld hl,BasicBackup
ld de,_PARSEVAR
ld bc,_LASTENTRYPTR-_PARSEVAR
ldir
call _popErrorHandler
ld sp,0
StackSave = $-2
call _OP3TOOP1
ld a,$d
out (5),a
jp Reload
----
Jonah Cohen
<ComAsYuAre@aol.com>
http://linux.hypnotic.org/~jonah/ (down)