Browse Source

trs80: make (key?) non-blocking

master
Virgil Dupras 3 years ago
parent
commit
1a48ff047f
2 changed files with 8 additions and 3 deletions
  1. +3
    -3
      arch/z80/trs80/blk.fs
  2. +5
    -0
      emul/z80/trs80.c

+ 3
- 3
arch/z80/trs80/blk.fs View File

@@ -11,10 +11,10 @@ There is also the RECV program at B612.
( ----- 602 )
1 8 LOADR+
( ----- 603 )
CODE (key?) ( -- c? f ) ( TODO: make non-blocking )
A 0x01 LDri, ( @KEY )
CODE (key?) ( -- c? f )
A 0x08 LDri, ( @KBD )
0x28 RST,
PUSHA, PUSH1,
IFZ, PUSHA, THEN, PUSHZ,
;CODE
CODE (emit) EXX, ( protect BC )
BC POP, ( c == @DSP arg ) chkPS,


+ 5
- 0
emul/z80/trs80.c View File

@@ -41,6 +41,11 @@ static void pchookfunc(Machine *m)
wmove(w, y, x-1);
}
break;
case 0x08: // @KBD TODO: make non-blocking
debug_panel();
m->cpu.R1.br.A = wgetch(w);
m->cpu.R1.br.F |= F_Z;
break;
case 0x0f: // @VDCTL
wmove(w, m->cpu.R1.br.H, m->cpu.R1.br.L);
break;


Loading…
Cancel
Save