The supervisor program now uses its own vectors
This commit is contained in:
parent
1a7af4d8d0
commit
41d0911d13
|
@ -36,7 +36,6 @@
|
|||
|
||||
@center
|
||||
&x $2 &y $2
|
||||
|
||||
@modal
|
||||
&x $2 &y $2
|
||||
|
||||
|
@ -51,11 +50,17 @@
|
|||
DUP2 .center/y STZ2
|
||||
MODALH #31 SFT2 -- .modal/y STZ2
|
||||
|
||||
( vectors )
|
||||
;on-error .System/vector DEO2
|
||||
;on-frame .Screen/vector DEO2
|
||||
|
||||
BRK
|
||||
|
||||
@on-frame ( -> )
|
||||
|
||||
;draw-cross JSR2
|
||||
;draw-stacks JSR2
|
||||
|
||||
EADDR LDA2 #0000 !! ;on-error JCN2
|
||||
|
||||
BRK
|
||||
|
||||
@on-error ( -> )
|
||||
|
|
|
@ -31,7 +31,7 @@ uxn_halt(Uxn *u, Uint8 error, Uint16 addr)
|
|||
Uint16 vec = d->vector;
|
||||
DEVPOKE16(0x4, addr);
|
||||
d->dat[0x6] = error;
|
||||
uxn_eval(&supervisor, PAGE_PROGRAM);
|
||||
uxn_eval(&supervisor, supervisor.dev[0].vector);
|
||||
if(vec) {
|
||||
d->vector = 0; /* need to rearm to run System/vector again */
|
||||
if(error != 2) /* working stack overflow has special treatment */
|
||||
|
|
|
@ -309,6 +309,8 @@ start(Uxn *u, char *rom)
|
|||
uxn_port(&supervisor, 0x1, nil_dei, console_deo);
|
||||
uxn_port(&supervisor, 0x2, screen_dei, screen_deo);
|
||||
|
||||
uxn_eval(&supervisor, PAGE_PROGRAM);
|
||||
|
||||
if(!uxn_eval(u, PAGE_PROGRAM))
|
||||
return error("Boot", "Failed to start rom.");
|
||||
|
||||
|
@ -485,7 +487,7 @@ run(Uxn *u)
|
|||
console_input(u, event.cbutton.button);
|
||||
}
|
||||
if(devsystem->dat[0xe])
|
||||
uxn_eval(&supervisor, PAGE_PROGRAM);
|
||||
uxn_eval(&supervisor, supervisor.dev[2].vector);
|
||||
uxn_eval(u, devscreen->vector);
|
||||
if(uxn_screen.fg.changed || uxn_screen.bg.changed || devsystem->dat[0xe])
|
||||
redraw();
|
||||
|
|
Loading…
Reference in New Issue