Date : Fri, 24 Feb 2017 22:42:22 +0000
From : jgh@... (J.G.Harston)
Subject: Emulation
Julian Stenning wrote:
> My question now is what part of the OS picks up that this keyboard
> input has to be written to the VDU?
OSWORD 0 - Read input line. This does, effectively:
LEN=0
REPEAT
A=OSRDCH
IF (A in range) THEN MEM[LEN]=A:LEN++:OSWRCH
IF (A=127) AND LEN>0 THEN LEN--:OSWRCH
UNTIL A=13 OR ESCAPE
To bypass getting the keyboard working you could configure the MOS so it
starts up with serial as the input stream. You need to set the default
*FX2 value to 1 'input from serial port', and then implement a simple
8bit+Ready input port.
The default startup values are stored at the address in &FFB7/8. This
points to the default page &02 values. So, the first &36 bytes are the
default vectors, the following bytes are the default values for OSBYTE
&A6 onwards.
The input stream is stored in *FX177, so, to start up with serial as the
input stream, set !&FFB8+(177-112) to 1. If you are manipulating just
the 16K ROM image, offset=rom[0x3FB8]+256*rom[0x3FB9]-0xC000;
rom[offset+177-112]=1;
--
J.G.Harston - jgh@... - mdfs.net/jgh