From 7464a84f54e959612a7d78839410a830dfbea021 Mon Sep 17 00:00:00 2001 From: David Banks Date: Wed, 19 Aug 2015 11:08:15 +0100 Subject: [PATCH] Fixed PDP11 stack limit issue; updated to 0.21 client firmware Change-Id: Id831b03899b261fd22e4221007890a59adddcc42 --- client/pdp11/021/Client11.lst | 1496 ++++++++++++++++++++++++++ client/pdp11/021/Client11.pdp | Bin 0 -> 2048 bytes client/pdp11/021/Client11.src | 1490 +++++++++++++++++++++++++ src/LX9Co_CoProPDP11.vhd | 2 +- src/ROM/tuberom_pdp11.vhd | 1908 ++++++++++++++++----------------- 5 files changed, 3941 insertions(+), 955 deletions(-) create mode 100644 client/pdp11/021/Client11.lst create mode 100644 client/pdp11/021/Client11.pdp create mode 100644 client/pdp11/021/Client11.src diff --git a/client/pdp11/021/Client11.lst b/client/pdp11/021/Client11.lst new file mode 100644 index 0000000..ebf7e7f --- /dev/null +++ b/client/pdp11/021/Client11.lst @@ -0,0 +1,1496 @@ +000000 ; PDP11 Tube Client Code +000000 ; ====================== +000000 ; Copyright (C)1989,2008,2014,2015 J.G.Harston +000000 ; +000000 ; v0.10 1989 JGH: Initial version, untested proof of concept. +000000 ; v0.11 2005 JGH: Altered some labels to assemble from BASIC +000000 ; v0.12 2008 JGH: Interupt handler data transfers. +000000 ; v0.13 2008 JGH: Added EMT handler. +000000 ; v0.14 2008 JGH: Checks executed code for ROM and Unix headers. +000000 ; v0.15 2008 JGH: Rearranged MOS interface code around, changed some labels. +000000 ; v0.16 2014 JGH: Optimised some common calls to SEND_BYTE. +000000 ; v0.17 01-Jan-2015 JGH: Addresses in control blocks allowed to be unaligned. +000000 VERSION: EQU &0018 +000000 ; v0.18 09-Aug-2015 DMB: Bugfix: CLICOM calling OSCLI with wrong register, RDLINE has +000000 ; (R1),R1 wrong way around, IRQHandler needs to have IRQs disabled. +000000 ; JGH: GBPB from channel 0 and EXECUTE uses FETCHBYTE. EXECUTE checks +000000 ; RESET/OSCLI flag on error, saves/restores PROG. IRQ_DATA stores +000000 ; ADDR with MOVBs. +000000 ; DMB: EMTVEC corrected. Indirect JMP/JSRs may be wrong, testing with @vec instead +000000 ; of @#vec and JSR PC,@(SP)+ in EMT dispatcher. +000000 ; JGH: Uses OSASCI for SEND_TXT, OSBYTE returns 16-bit results, MEMBOT and MEMTOP +000000 ; are variables. +000000 ; DMB: GetADDR in IRQ_DATA needs to use @#ADDR+n instead of @ADDR+n. MOVB used to +000000 ; read errors. +000000 VERSION: EQU &0019 +000000 ; v0.19 10-Aug-2015 DMB: Bugfix: EMT dispatcher index into vectors, unbalanced stack in Release. +000000 ; BIT #n,R in EXECUTE should be BIT #n,R. A few ADD/SUB #n wrong way around. +000000 ; JGH: Code with a Unix header copied to MEMBOT instead of &0000 as no MMU in +000000 ; this implementation. +000000 ; Bugs: EXECUTE doesn't prepare valid stack frame for code with Unix header. +000000 ; 11-Aug-2015 DMB: Bugfix, OSWORD <>0 wasn't fetching block lengths correctly. EMT 14 wrote +000000 ; wrong 'address' if not passed 'handler'. ESCHAND should use @ESCADDR. +000000 ; HANDLERS equate had wrong arithmetic. +000000 ; JGH: INIT_ENV correctly initialises EMTs 0-15 and nulls 16-255 instead of +000000 ; setting 16-31 to garbage and missing 240-255 completely. EQUs used to allow +000000 ; more handlers to be added easily. +000000 ; v0.19a 11-Aug-2015 JGH: Crunched some blocks of common code. +000000 ; v0.19b 11-Aug-2015 JGH: Crunched NMI data transfer code. +000000 ; v0.19c 12-Aug-2015 JGH: STARTUP uses internal stack. MEMBOT and MEMTOP fetched from variables. All +000000 ; unused hardware vectors set to NULLIRQ. +000000 ; v0.19d 13-Aug-2015 JGH: Tidied up and optimised EXECUTE, OSCLI saves all registers, uses internal +000000 ; stack. EMT14 optimised. +000000 ; v0.19e 16-Aug-2015 JGH: TRAP jumps to error, EMT 15 used instead of MKERR. +000000 ; v0.19f 16-Aug-2015 DMB: Bugfix: INIT_ENV was looping forever, wrong number of WORKSPACE words initialised +000000 ; starting from wrong workspace offset, TRAP vector was wrong. Wrong address +000000 ; mode in MOV @#COM_BLK,R0 in CLICOM. +000000 ; v0.19g 16-Aug-2015 BMB: All NMIs were failing to update ADDR by returning via wrong exit. +000000 VERSION: EQU &0020 +000000 ; v0.20 17-Aug-2015 JGH: EXECUTE possibly not working when entering BASIC. +000000 ; v0.20a 18-Aug-2015 DMB: Bugfix: EMT handler lost R0, EMT14 restored ERRV even after attempts to change it. +000000 ; Optimised EMT15 to free up space to fit EMT14 bugfix. +000000 ; v0.20b 18-Aug-2015 DMB: Bugfix: EMT15 optimisation used EMTHANDLER ERRV instead of mainline ERRV. +000000 VERSION: EQU &0021 +000000 ; v0.21 19-Aug-2015 JGH: Incremented to version 0.21. Added conditional switch to remove BPUT/BGET/GBPB to +000000 ; channel 0, saves about 100 bytes if removed. +000000 ; +000000 ; +000000 ; This code may be freely reused. +000000 ; +000000 ; This code assumes a single memory space and assumes that code can access I/O devices, low memory +000000 ; vectors and user memory with ordinary MOV instructions. This will work with no seperate +000000 ; Kernal/User space, or with code never running in User mode. +000000 +000000 ; Some naming conventions +000000 ; xxxxVEC - hardware vectors, eg EMTVEC, NMIVEC, etc +000000 ; xxxxV - software vectors, eg ESCV, ERRV, etc. +000000 ; xxxx or xxxHAND - handler for xxxx, eg ESCHAND, ERRHAND, etc. +000000 ; OSxxx or _xxx - routines handled by xxx, eg OSFILE handled by _FILE +000000 +000000 ; Memory map: +000000 ; +-----------------------+ 0000 +000000 ; | Hardware vectors, etc | +000000 ; MEMBOT +-----------------------+ 0100 +000000 ; | | +000000 ; | | +000000 ; MEMTOP | ^^^User Stack^^^ | +000000 ; WORKSP +-----------------------+ F500 +000000 ; | ERRBLK--> <--CLISTK | +000000 ; +-----------------------+ F530 +000000 ; | CLIBUF--> <--ERRSTK | +000000 ; HANDLERS +-----------------------+ +000000 ; | EXITV EXITADDR | F5D8 +000000 ; | ESCV ESCADDR | F5DC +000000 ; | ERRV ERRADDR | F5E0 +000000 ; | EVENTV EVENTADDR | F5E4 +000000 ; | USERIRQV USERIRQADDR | F5E8 +000000 ; | EMTV EMTADDR | F5EC +000000 ; | SPARE LPTR | F5F0 +000000 ; | MEMBOT MEMTOP | F5F4 +000000 ; ADDR | Transfer address | F5F8 +000000 ; PROG | Current program | F5FC +000000 ; PROG+2 | unused byte | F5FE +000000 ; ESCFLG | Escape flag | F5FF +000000 ; EMTTABLE +-----------------------+ +000000 ; | EMT 0 code address | F600 +000000 ; | EMT 1 code address | F602 +000000 ; | EMT 2 code address | F604 +000000 ; | EMT 3 code address | F606 +000000 ; | EMT 4 code address | F608 +000000 ; | ... | +000000 ; | EMT 255 code address | F7FE +000000 ; START +-----------------------+ F800 +000000 ; | Tube client code | +000000 ; +-----------------------+ FFF0 +000000 ; | Tube I/O registers | +000000 ; +-----------------------+ FFFF +000000 +000000 +000000 ; PDP-11 hardware addresses +000000 ; ========================= +000000 STACKVEC: EQU &04 ; Stack too low +000000 EMTVEC: EQU &18 ; Vector called by EMT call +000000 TRAPVEC: EQU &1C ; Vector called by TRAP call DMB +000000 +000000 +000000 ; Tube client system configuration tweekables +000000 ; =========================================== +000000 START: EQU &F800 ; Start of code +000000 TUBEIO: EQU &FFF0 ; Base of Tube I/O registers +000000 NMIVEC: EQU &80 ; Vector called by Tube NMIs with priority 7 +000000 IRQVEC: EQU &84 ; Vector called by Tube IRQs with priority 6 +000000 +000000 EMTMAX: EQU 256 ; Number of EMTs +000000 EMTTABLE: EQU START-EMTMAX*2 ; EMT dispatch table +000000 WORKSP: EQU EMTTABLE-256 ; 256 bytes for buffers, etc +000000 RAMSTART: EQU &0100 ; Lowest available user memory address +000000 RAMEND: EQU WORKSP ; Highest available user memory address +000000 +000000 ;NOCHNZERO: EQU 1 ; Remove bput/bget#0 -> wrch/rdch, saves about 100 bytes +000000 +000000 +000000 ; Internal buffers, etc +000000 ; ===================== +000000 ERRBLK: EQU WORKSP ; Buffer to store host error block +000000 CLIBUF: EQU WORKSP+&30 ; Space to enter command line from CLI prompt +000000 CLISTK: EQU CLIBUF ; Internal stack for CLI commands +000000 ; as main memory may be overwritten +000000 CLIEND: EQU HANDLERS +000000 ERRSTK: EQU CLIEND ; Internal stack for host errors +000000 +000000 WORKSPMAX: EQU 16 ; 16 bytes of general workspace +000000 HANDLEMAX: EQU 6 ; 6 environment handlers +000000 HANDLERS: EQU WORKSP+256-WORKSPMAX-4*HANDLEMAX ; Address of environment handlers +000000 EXITV: EQU HANDLERS+&00 ; Address of exit handler +000000 EXITADDR: EQU HANDLERS+&02 ; unused +000000 ESCV: EQU HANDLERS+&04 ; Address of escape handler +000000 ESCADDR: EQU HANDLERS+&06 ; Address of escape flag +000000 ERRV: EQU HANDLERS+&08 ; Address of error handler +000000 ERRADDR: EQU HANDLERS+&0A ; Address of error buffer +000000 EVENTV: EQU HANDLERS+&0C ; Address of event handler +000000 EVENTADDR: EQU HANDLERS+&0E ; unused +000000 USERIRQV: EQU HANDLERS+&10 ; Address of unknown IRQ handler +000000 USERIRQADDR: EQU HANDLERS+&12 ; unused +000000 EMTV: EQU HANDLERS+&14 ; Old SP within EMT handler +000000 EMTADDR: EQU HANDLERS+&16 ; Address of EMT dispatch table +000000 +000000 SPARE: EQU WORKSP+&F0 ; unused +000000 LPTR: EQU WORKSP+&F2 ; Point to command line (unused) +000000 MEMBOT: EQU WORKSP+&F4 ; Lowest user memory address +000000 MEMTOP: EQU WORKSP+&F6 ; Highest user memory address +000000 ADDR: EQU WORKSP+&F8 ; Transfer address +000000 PROG: EQU WORKSP+&FC ; Current program +000000 PROG2: EQU WORKSP+&FE ; unused +000000 ESCFLG: EQU WORKSP+&FF ; Escape flag +000000 +000000 +000000 ; Tube I/O devices +000000 ; ================ +000000 TUBE1S: EQU TUBEIO+0 ; Tube Status 1 +000000 TUBE1: EQU TUBEIO+2 ; Tube Data 1 - VDU +000000 TUBE2S: EQU TUBEIO+4 ; Tube Status 2 +000000 TUBE2: EQU TUBEIO+6 ; Tube Data 2 - Command +000000 TUBE3S: EQU TUBEIO+8 ; Tube Status 3 +000000 TUBE3: EQU TUBEIO+10 ; Tube Data 3 - Data +000000 TUBE4S: EQU TUBEIO+12 ; Tube Status 4 +000000 TUBE4: EQU TUBEIO+14 ; Tube Data 4 - Interrupt +000000 +000000 +000000 ; Code Entry +000000 ; ========== +000000 ; Set up vectors, hardware, memory, etc. +000000 ; Must be entered in Kernel mode. +174000 ORG START +174000 000167 000030 JMP STARTUP ; Jump to start up Tube code +174004 +174004 +174004 ; STARTUP +174004 ; ======= +174004 ; Tube data: via R1: string &00 -- via R2: &7F or &80 +174004 ; +174004 BANNER: +174004 015 EQUB 13 +174005 120 104 120 061 061 040 124 125 + 102 105 040 066 064 113 040 EQUS "PDP11 TUBE 64K " +174024 060 EQUB ((VERSION >> 8) AND 15)+48 +174025 056 EQUS "." +174026 062 EQUB ((VERSION >> 4) AND 15)+48 +174027 061 EQUB (VERSION AND 15)+48 +174030 #ifdef TESTBUILD +174030 EQUB 96+TESTBUILD +174030 #endif +174030 015 EQUB 13 +174031 015 EQUB 13 +174032 000 EQUB 0 +174033 000 ALIGN +174034 STARTUP: +174034 012706 172460 MOV #CLISTK,SP ; Use internal stack +174040 004767 002610 JSR PC,INIT_ENV ; Set up default handlers, preserving PROG +174044 013737 172774 172770 MOV @#PROG,@#ADDR ; Set current program as default entry address +174052 012701 174004 MOV #BANNER,R1 ; Point to startup banner +174056 004767 000206 JSR PC,SEND_TXT ; Print it via Tube WRCH protocol +174062 ;CLR R0 ; SEND_TXT returns R0=0 +174062 004767 002230 JSR PC,_WRCH ; Send terminating zero byte +174066 000241 CLC ; Clear Carry Flag to indicate Reset +174070 004767 000306 JSR PC,CLI_WAIT ; Wait for and check result byte +174074 ; Fall through to CLICOM if nothing executed +174074 +174074 ; Supervisor Command line prompt +174074 ; ============================== +174074 ; Allow user to enter *commands. +174074 ; We deliberately call _WORD and _CLI so if EMTs vectors are trashed we can still access MOS and so +174074 ; that errors go via ERRV instead of us having to check returned V flag. +174074 ; We will normally be running in Kernal mode so we can see the system vectors and high memory. +174074 ; +174074 CLICOM: +174074 EXITHAND: +174074 013706 172766 MOV @#MEMTOP,SP ; Put stack at top of user memory +174100 012700 000003 MOV #3,R0 +174104 004767 002576 JSR PC,INIT_IRQ ; Initialise IRQ/NMI and environment handlers +174110 CLILOOP: +174110 012701 174140 MOV #PROMPT,R1 +174114 004767 000150 JSR PC,SEND_TXT ; Display prompt +174120 ;CLR R0 ; SEND_TXT returns R0=0 +174120 ;MOV #COM_BLK,R1 ; Point to control block, SENT_TXT returns R1=COM_BLK +174120 004767 001040 JSR PC,_WORD ; Read a line of text +174124 103414 BCS COM_ESC ; Escape pressed +174126 013700 174150 MOV @#COM_BLK,R0 ; Get address of input buffer DMB +174132 004767 000140 JSR PC,_CLI ; Execute command +174136 000764 BR CLILOOP ; Loop back for another line +174140 PROMPT: +174140 120 104 120 061 061 076 052 EQUS "PDP11>*" ; Command prompt +174147 000 EQUB 0 +174150 ALIGN +174150 ; +174150 COM_BLK: +174150 172460 EQUW CLIBUF ; Input buffer +174152 250 EQUB CLIEND-CLIBUF ; Buffer length +174153 040 EQUB 32 ; Lowest acceptable char +174154 377 EQUB 255 ; Highest acceptable char +174155 377 ALIGN +174156 ; +174156 COM_ESC: +174156 012700 000176 MOV #126,R0 +174162 004767 000572 JSR PC,_BYTE ; Acknowledge Escape +174166 ; JSR PC,MKERR +174166 104017 EMT 15 +174170 021 105 163 143 141 160 145 000 + EQUB 17,"Escape",0 +174200 ALIGN +174200 +174200 ; Default error handler +174200 ; --------------------- +174200 ; On entry, R0=>error block +174200 ERRHAND: +174200 013706 172766 MOV @#MEMTOP,SP ; Reset stack to top of user memory +174204 010001 MOV R0,R1 ; Point R1=>error block +174206 005201 INC R1 ; Step past error number +174210 004767 002066 JSR PC,_NEWL ; Print a newline +174214 004767 000050 JSR PC,SEND_TXT ; Print error message +174220 004767 002056 JSR PC,_NEWL ; Print another newline +174224 000723 BR CLICOM +174226 +174226 ; Default escape handler +174226 ; ---------------------- +174226 ESCHAND: +174226 060000 ADD R0,R0 ; Move b6 into b7 +174230 110077 176502 MOVB R0,@ESCADDR ; Store Escape flag +174234 000207 RTS PC +174236 +174236 +174236 ; Fetch word from unaligned R1 to R1 +174236 ; ================================== +174236 ; Unaligned version of MOV (R1),R1, corrupts R0 +174236 ; FETCHWORD2 - R1=>word+2 +174236 ; FETCHWORD - R1=>word +174236 ; +174236 FETCHWORD2: +174236 162701 000002 SUB #2,R1 ; Step back to point to word +174242 FETCHWORD: +174242 112100 MOVB (R1)+,R0 ; Fetch low byte +174244 042700 177400 BIC #&FF00,R0 ; Ensure 8-bit value +174250 111101 MOVB (R1),R1 ; Fetch high byte +174252 042701 177400 BIC #&FF00,R1 ; Ensure 8-bit word +174256 000301 SWAB R1 ; Swap high byte to top of register +174260 050001 BIS R0,R1 ; Merge together +174262 000207 RTS PC +174264 +174264 +174264 ; Print zero-terminated text string at R1 +174264 ; ======================================= +174264 SEND_TXTLP: +174264 004767 002004 JSR PC,_ASCII ; Send to WRCH via Tube R1 +174270 SEND_TXT: +174270 112100 MOVB (R1)+,R0 ; Get byte from R1, increment R1 +174272 001374 BNE SEND_TXTLP ; Loop until &00 byte +174274 000207 RTS PC +174276 +174276 +174276 ; ************* +174276 ; MOS INTERFACE +174276 ; ************* +174276 +174276 ; OSCLI - Send command line to host +174276 ; ================================= +174276 ; On entry: R0=>command string +174276 ; On exit: R0=return value +174276 ; +174276 ; Tube data: &02 string &0D -- &7F or &80 +174276 ; +174276 _CLI: +174276 010146 MOV R1,-(SP) ; Save registers +174300 010246 MOV R2,-(SP) +174302 010346 MOV R3,-(SP) +174304 010446 MOV R4,-(SP) +174306 010546 MOV R5,-(SP) +174310 +174310 ; As a *command may result in data transfer, that data may end up overwriting stack in user memory, +174310 ; so use a temporary stack to do OSCLI. If OSCLI ends up jumping to a new process, a new stack will +174310 ; be set up by that new process. If we are already using the internal stack we continue using it +174310 ; so that transient OSCLIs can call more OSCLIs. +174310 +174310 010605 MOV SP,R5 ; Copy stack pointer so we can stack it +174312 020527 172400 CMP R5,#WORKSP ; Check where the stack is +174316 103002 BCC CLI_SYSSTK ; We're already using internal stack +174320 012706 172460 MOV #CLISTK,SP ; Use internal stack +174324 CLI_SYSSTK: +174324 010546 MOV R5,-(SP) ; Save caller's stack pointer +174326 013746 172774 MOV @#PROG,-(SP) ; Save current program as top item on stack +174332 004767 000024 JSR PC,CLI_GO ; Do the OSCLI call +174336 012637 172774 MOV (SP)+,@#PROG ; Restore current program +174342 011606 MOV (SP),SP ; Restore caller's stack pointer +174344 012605 MOV (SP)+,R5 ; Restore registers +174346 012604 MOV (SP)+,R4 +174350 012603 MOV (SP)+,R3 +174352 012602 MOV (SP)+,R2 +174354 012601 MOV (SP)+,R1 +174356 005000 CLR R0 ; Return R0=0 from OSCLI +174360 CLI_DONE: +174360 000207 RTS PC +174362 +174362 CLI_GO: +174362 010001 MOV R0,R1 ; R1=pointer to command string +174364 012700 000002 MOV #2,R0 +174370 004767 002602 JSR PC,SEND_CMD ; Send command &02 - OSCLI +174374 004767 002516 JSR PC,SEND_STR ; Send command string at R1 +174400 CLI_WAIT1: +174400 000261 SEC ; Set Carry to indicate OSCLI +174402 CLI_WAIT: +174402 004767 001616 JSR PC,WAIT_BYTE ; Wait for result via Tube R2 (preserves Cy) +174406 ; WAIT_BYTE returns flags set from R0 +174406 100364 BPL CLI_DONE ; No code to be executed +174410 ; Fall through into EXECUTE +174410 +174410 +174410 ; EXECUTE - Enter code at ADDR +174410 ; ============================ +174410 ; Checks for possible code header, makes code current PROGRAM. +174410 ; On entry, ADDRESS=code entry address +174410 ; CC=entering from RESET +174410 ; CS=entering from OSCLI/OSBYTE +174410 ; +174410 ; Caller should preserve registers before calling here. +174410 ; +174410 EXECUTE: +174410 012700 000000 MOV #0,R0 ; R0=0 - prepare for raw code +174414 006100 ROL R0 ; Save RESET/OSCLI flag in Carry in R0 +174416 013701 172770 MOV @#ADDR,R1 ; Get transfer address +174422 010146 MOV R1,-(SP) ; Save entry address +174424 116102 000007 MOVB 7(R1),R2 ; Get copyright offset +174430 042702 177400 BIC #&FF00,R2 ; Ensure 8-bit value +174434 060201 ADD R2,R1 ; R1=>copyright string +174436 105721 TSTB (R1)+ ; Check for copyright string +174440 001051 BNE EXEC_NOTROM +174442 122127 000050 CMPB (R1)+,#ASC"(" +174446 001046 BNE EXEC_NOTROM +174450 122127 000103 CMPB (R1)+,#ASC"C" +174454 001043 BNE EXEC_NOTROM +174456 122127 000051 CMPB (R1)+,#ASC")" +174462 001040 BNE EXEC_NOTROM +174464 011601 MOV (SP),R1 ; Get entry address back +174466 116102 000006 MOVB 6(R1),R2 ; Get ROM type +174472 032702 000100 BIT #&40,R2 ; DMB: BIT, not TST +174476 001506 BEQ EXEC_NOTLANG +174500 042702 177760 BIC #&FFF0,R2 ; Mask out non-CPU bits +174504 020227 000007 CMP R2,#&07 +174510 001101 BNE EXEC_NOTPDP +174512 116102 000006 MOVB 6(R1),R2 ; Get ROM type again +174516 032702 000040 BIT #&20,R2 ; Does Tube transfer address exist? DMB: BIT, not TST +174522 001416 BEQ EXEC_ROM ; No, use stacked entry address +174524 116102 000007 MOVB 7(R1),R2 ; Get copyright offset +174530 042702 177400 BIC #&FF00,R2 ; Ensure 8-bit value +174534 060201 ADD R2,R1 ; Point to copyright message +174536 005201 INC R1 ; Step past first zero byte +174540 EXEC_SKIP: +174540 105721 TSTB (R1)+ ; Find terminating zero byte +174542 001376 BNE EXEC_SKIP +174544 062701 000004 ADD #4,R1 ; Step past transfer address +174550 004767 177466 JSR PC,FETCHWORD ; R1=offset from start address +174554 062601 ADD (SP)+,R1 ; Add start entry to offset, R1 is now entry address +174556 010146 MOV R1,-(SP) ; Push it back +174560 EXEC_ROM: +174560 052700 000002 BIS #2,R0 ; R0.1=1 to indicate code with header (will become R1=1) +174564 ; See if a Unix header also exists +174564 ; +174564 EXEC_NOTROM: +174564 012601 MOV (SP)+,R1 ; Get entry address back +174566 042701 000001 BIC #1,R1 ; Ensure word aligned +174572 011102 MOV (R1),R2 ; Get magic number +174574 020227 000405 CMP R2,#&105 ; &o0405 - overlay +174600 103434 BCS EXEC_CODE ; &o0407 - normal +174602 020227 000411 CMP R2,#&109 ; &o0410 - read-only text +174606 103031 BCC EXEC_CODE ; &o0411 - seperated I&D +174610 005721 TST (R1)+ ; Step to next entry +174612 012103 MOV (R1)+,R3 ; Size of text +174614 012104 MOV (R1)+,R4 ; Size of initialised data +174616 060403 ADD R4,R3 ; Size of program +174620 012104 MOV (R1)+,R4 ; Size of uninitialised data +174622 013702 172764 MOV @#MEMBOT,R2 ; Destination address +174626 062701 000010 ADD #8,R1 ; Set past other fields to start of code +174632 +174632 ; R1=source +174632 ; R2=dest +174632 ; R3=size of code+data +174632 ; R4=size to be zeroed +174632 +174632 006203 ASR R3 ; Divide by two to get size in words +174634 EXEC_COPY: +174634 012122 MOV (R1)+,(R2)+ ; Copy program to MEMBOT +174636 005303 DEC R3 ; Decrement number of words to copy +174640 001375 BNE EXEC_COPY +174642 006204 ASR R4 ; Divide by two to get size in words +174644 001403 BEQ EXEC_ENTER ; No uninitialised data to clear +174646 EXEC_ZERO: +174646 005022 CLR (R2)+ ; Zero uninitialised data +174650 005304 DEC R4 ; Decrement number of words to clear +174652 001375 BNE EXEC_ZERO +174654 EXEC_ENTER: +174654 042700 177776 BIC #&FFFE,R0 ; Prepare R0=0 for code without a ROM header +174660 013701 172764 MOV @#MEMBOT,R1 ; Entry address +174664 ; Build an empty stack frame +174664 005046 CLR -(SP) ; argv[1]=0 +174666 005046 CLR -(SP) ; argv[0]=0 +174670 005046 CLR -(SP) ; argn=0 +174672 +174672 EXEC_CODE: +174672 012705 005674 MOV #&0BBC,R5 ; R5=&0BBC to indicate BBC EMTs available +174676 006200 ASR R0 ; R0=0/1 for raw/header, Cy=RESET/OSCLI +174700 010137 172774 MOV R1,@#PROG ; Set as current program +174704 010146 MOV R1,-(SP) ; Stack destination address +174706 012701 174004 MOV #BANNER,R1 ; R1=> for no command line +174712 000207 RTS PC ; Jump to code via RTS +174714 +174714 EXEC_NOTLANG: +174714 ; ASR R0 +174714 ; BCC EXEC_CLICOM ; Entered from RESET, drop into CLICOM +174714 ;; JSR PC,MKERR +174714 ; EMT 15 +174714 ; EQUB 249,"This is not a language",0 +174714 ; ALIGN +174714 ; +174714 EXEC_NOTPDP: +174714 006200 ASR R0 +174716 103015 BCC EXEC_CLICOM ; Entered from RESET, drop into CLICOM +174720 012700 000003 MOV #3,R0 +174724 004767 002006 JSR PC,INIT_HANDLES ; Connect to default error handler +174730 ; JSR PC,MKERR +174730 104017 EMT 15 +174732 371 116 157 164 040 120 104 120 + 061 061 040 143 157 144 145 000 + EQUB 249,"Not PDP11 code",0 +174752 ALIGN +174752 +174752 EXEC_CLICOM: +174752 000167 177116 JMP CLICOM ; Drop into Supervisor command prompt +174756 +174756 +174756 ; OSBYTE +174756 ; ====== +174756 ; On entry: R0,R1,R2=OSBYTE parameters +174756 ; On exit: R0 preserved +174756 ; If R0<&80, R1=returned value +174756 ; If R0>&7F, R1, R2, Carry=returned values +174756 ; +174756 ; Tube data: &04 X A -- X +174756 ; &06 X Y A -- Cy Y X +174756 ; +174756 BYTE_WAIT: +174756 000610 BR CLI_WAIT1 ; Jump to wait for ack. from OSCLI/OSBYTE +174760 _BYTE: +174760 010046 MOV R0,-(SP) ; Save R0 +174762 105700 TSTB R0 +174764 100413 BMI BYTE_HI ; Jump with high OSBYTEs +174766 012700 000004 MOV #4,R0 +174772 004767 002172 JSR PC,SEND_CMD_R1 ; Send command and second parameter +174776 011600 MOV (SP),R0 ; Get first parameter from top of stack +175000 004767 002172 JSR PC,SEND_BYTE ; Send first parameter +175004 004767 001214 JSR PC,WAIT_BYTE ; Wait for response +175010 010001 MOV R0,R1 ; Pass to R1 +175012 000462 BR BYTE_DONE +175014 ; MOV (SP)+,R0 ; Restore R0 +175014 ; RTS PC +175014 +175014 ; OSBYTE >&7F +175014 ; ----------- +175014 BYTE_HI: +175014 ; CMP R0,#&82 +175014 ; BEQ MEM82 ; Fetch address high word +175014 ; CMP R0,#&83 +175014 ; BEQ MEM83 ; Fetch low memory limit +175014 ; CMP R0,#&84 +175014 ; BEQ MEM84 ; Fetch high memory limit +175014 ; +175014 020027 000202 CMP R0,#&82 +175020 103404 BCS BYTE_HI1 ; Not a memory OSBYTE +175022 001445 BEQ MEM82 ; Fetch address high word +175024 020027 000205 CMP R0,#&85 +175030 103444 BCS MEM83 ; Fetch low/high memory limit +175032 BYTE_HI1: +175032 012700 000006 MOV #6,R0 +175036 004767 002126 JSR PC,SEND_CMD_R1 ; Send command and second parameter +175042 010200 MOV R2,R0 +175044 004767 002126 JSR PC,SEND_BYTE ; Send third parameter +175050 012600 MOV (SP)+,R0 ; Get first parameter from stack +175052 004767 002120 JSR PC,SEND_BYTE ; Send first parameter +175056 020027 000235 CMP R0,#&9D ; Was it Fast BPut? +175062 001437 BEQ BYTE_DONE1 ; Don't wait for response +175064 020027 000216 CMP R0,#&8E ; Was it language startup? +175070 001732 BEQ BYTE_WAIT ; Wait for program startup +175072 010046 MOV R0,-(SP) ; Save R0 again +175074 004767 001124 JSR PC,WAIT_BYTE ; Wait for response +175100 062700 177600 ADD #&FF80,R0 ; Copy b7 into Carry +175104 004767 001114 JSR PC,WAIT_BYTE ; Wait for response +175110 042700 177400 BIC #&FF00,R0 ; Ensure 8-bit value +175114 010002 MOV R0,R2 ; Pass to R2 +175116 000300 SWAB R0 +175120 010001 MOV R0,R1 ; Pass to R1 as b8-b15 of result +175122 004767 001076 JSR PC,WAIT_BYTE ; Wait for response +175126 042700 177400 BIC #&FF00,R0 ; Ensure 8-bit value +175132 050001 BIS R0,R1 ; Merge with b8-b15 set from R2 +175134 000411 BR BYTE_DONE +175136 ;BYTE_DONE: +175136 ; MOV (SP)+,R0 ; Restore R0 +175136 ; RTS PC +175136 +175136 ; Read memory locations +175136 ; --------------------- +175136 MEM82: +175136 012700 000206 MOV #&86,R0 ; Point to ADDR+2 +175142 MEM83: +175142 MEM84: +175142 006300 ASL R0 ; A=&0106,&0108,&010C +175144 016001 172356 MOV MEMBOT-&106(R0),R1 ; Fetch address value +175150 010102 MOV R1,R2 ; R2=R1 DIV 256 +175152 000302 SWAB R2 +175154 042702 177400 BIC #&FF00,R2 +175160 BYTE_DONE: +175160 012600 MOV (SP)+,R0 ; Restore R0 +175162 BYTE_DONE1: +175162 000207 RTS PC +175164 +175164 +175164 ; OSWORD +175164 ; ====== +175164 ; On entry: R0=OSWORD number +175164 ; R1=>control block +175164 ; +175164 _WORD: +175164 005700 TST R0 +175166 001515 BEQ RDLINE ; OSWORD 0, jump to read line +175170 ; +175170 ; OSWORD <>&00 +175170 ; ------------ +175170 ; Tube data: &08 function in_length block out_length -- block +175170 ; +175170 010346 MOV R3,-(SP) ; Save R3 +175172 010246 MOV R2,-(SP) ; Save R2 +175174 010046 MOV R0,-(SP) ; Save R0 +175176 012700 000010 MOV #8,R0 +175202 004767 001770 JSR PC,SEND_CMD ; Send command &08 - OSWORD +175206 011600 MOV (SP),R0 ; Get R0 back +175210 004767 001762 JSR PC,SEND_BYTE ; Send OSWORD number +175214 105700 TSTB R0 ; Check OSWORD number +175216 100003 BPL WORDLO ; <&80, calculate control block sizes +175220 112102 MOVB (R1)+,R2 ; Get transmit size from control block DMB: should be R1 +175222 111103 MOVB (R1),R3 ; Get receive size from control block DMB: should be R1 +175224 000414 BR WORDGO ; Jump to send OSWORD command +175226 WORDLO: +175226 012702 000020 MOV #&10,R2 ; OSWORD &15-&7F uses 16 bytes both ways +175232 012703 000020 MOV #&10,R3 +175236 020027 000025 CMP R0,#&15 ; OSWORD &01-&7F use fixed control block sizes +175242 103005 BCC WORDGO ; OSWORD &15-&7F, jump to send OSWORD command +175244 060000 ADD R0,R0 ; Double R0 to index into table +175246 062700 175350 ADD #WORD_TABLE-2,R0 ; Point to table entry DMB: #WORD_TABLE +175252 112002 MOVB (R0)+,R2 ; Fetch send length +175254 111003 MOVB (R0),R3 ; Fetch receive length +175256 WORDGO: +175256 010200 MOV R2,R0 ; Get transmit block length +175260 004767 001712 JSR PC,SEND_BYTE ; Send transmit block length +175264 060201 ADD R2,R1 ; Point to past end of control block +175266 005302 DEC R2 ; Convert 0 to -1 +175270 020227 000200 CMP R2,#&80 ; Check length of transmit block +175274 103005 BCC WORD_NOTX ; Transmit block=0 or >&80, send nothing +175276 WORD_TX: +175276 114100 MOVB -(R1),R0 ; Get byte from control block +175300 004767 001672 JSR PC,SEND_BYTE ; Send byte to Tube R2 +175304 005302 DEC R2 +175306 100373 BPL WORD_TX ; Loop to send control block +175310 WORD_NOTX: +175310 010300 MOV R3,R0 ; Get recive block length +175312 004767 001660 JSR PC,SEND_BYTE ; Send receive block length +175316 060301 ADD R3,R1 ; Point past end of control block +175320 005303 DEC R3 ; Convert 0 to -1 +175322 020327 000200 CMP R3,#&80 ; Check length of received block +175326 103005 BCC WORD_NORX ; Receive block=0 or >&80, receive nothing +175330 WORD_RX: +175330 004767 000670 JSR PC,WAIT_BYTE ; Get byte from Tube R2 +175334 110041 MOVB R0,-(R1) ; Store byte in control block +175336 005303 DEC R3 +175340 100373 BPL WORD_RX ; Loop to receive control block +175342 WORD_NORX: +175342 012600 MOV (SP)+,R0 ; Restore registers +175344 012602 MOV (SP)+,R2 +175346 012603 MOV (SP)+,R3 +175350 000207 RTS PC +175352 ; +175352 ; Table of OSWORD control block lengths for &01-&14 +175352 ; ------------------------------------------------- +175352 ; low byte=send length, high byte=recive length +175352 WORD_TABLE: +175352 002400 EQUW &0500 ; &01 =TIME +175354 000005 EQUW &0005 ; &02 TIME= +175356 002400 EQUW &0500 ; &03 =TIMER +175360 000005 EQUW &0005 ; &04 TIMER= +175362 002404 EQUW &0504 ; &05 =MEM +175364 000005 EQUW &0005 ; &06 MEM= +175366 000010 EQUW &0008 ; &07 SOUND +175370 000016 EQUW &000E ; &08 ENVELOPE +175372 002404 EQUW &0504 ; &09 =POINT +175374 004401 EQUW &0901 ; &0A Read bitmap +175376 002401 EQUW &0501 ; &0B Read palette +175400 000005 EQUW &0005 ; &0C Write palette +175402 004000 EQUW &0800 ; &0D Read graphics coords +175404 014420 EQUW &1910 ; &0E =TIME$ +175406 000040 EQUW &0020 ; &0F TIME$= +175410 000420 EQUW &0110 ; &10 Net_Tx +175412 006415 EQUW &0D0D ; &11 Net_Rx +175414 100000 EQUW &8000 ; &12 Net_Params +175416 004010 EQUW &0808 ; &13 Net_Info +175420 100200 EQUW &8080 ; &14 NetFS_Op +175422 +175422 +175422 ; Read a line of text +175422 ; ------------------- +175422 ; Tube data: &0A block -- &FF or &7F string &0D +175422 ; +175422 RDLINE: +175422 012700 000012 MOV #10,R0 +175426 004767 001544 JSR PC,SEND_CMD ; Send command &0A - RDLINE +175432 062701 000002 ADD #2,R1 +175436 012702 000003 MOV #3,R2 +175442 004767 001466 JSR PC,SEND_BLK ; Send 3-byte control block +175446 012700 000007 MOV #7,R0 +175452 004767 001520 JSR PC,SEND_BYTE ; Send &0700 +175456 005000 CLR R0 +175460 004767 001512 JSR PC,SEND_BYTE +175464 004767 000534 JSR PC,WAIT_BYTE ; Wait for response +175470 062700 177600 ADD #&FF80,R0 ; Copy b7 into Carry +175474 103413 BCS RD_DONE +175476 004767 176534 JSR PC,FETCHWORD2 ; Get address to store text, allowing for nonalignment +175502 005002 CLR R2 ; Clear count of received bytes +175504 RD_STR: +175504 004767 000514 JSR PC,WAIT_BYTE ; Wait for byte from Tube R2 +175510 110021 MOVB R0,(R1)+ ; Store it +175512 005202 INC R2 ; Increment number of bytes +175514 020027 000015 CMP R0,#13 ; Check current byte +175520 001371 BNE RD_STR ; Loop until and Clear Carry +175522 005302 DEC R2 ; R2 is length of string +175524 RD_DONE: +175524 000207 RTS PC +175526 +175526 +175526 ; OSARGS - Read info on open file or filing system +175526 ; ================================================ +175526 ; On entry: R0=function +175526 ; R1=handle +175526 ; R2=>control block +175526 ; On exit: R0=returned value +175526 ; R1 preserved +175526 ; R2 preserved +175526 ; +175526 ; Tube Data: &0C handle block function -- result block +175526 ; +175526 _ARGS: +175526 010246 MOV R2,-(SP) ; Save control block pointer +175530 010146 MOV R1,-(SP) ; Save handle +175532 010046 MOV R0,-(SP) ; Save function +175534 012700 000014 MOV #&0C,R0 +175540 004767 001424 JSR PC,SEND_CMD_R1 ; Send command and handle +175544 010201 MOV R2,R1 +175546 012702 000004 MOV #4,R2 +175552 004767 001356 JSR PC,SEND_BLK ; Send four-byte control block +175556 012600 MOV (SP)+,R0 +175560 004767 001412 JSR PC,SEND_BYTE ; Send function +175564 004767 000434 JSR PC,WAIT_BYTE ; Wait for returned result +175570 010046 MOV R0,-(SP) ; Save result +175572 012702 000004 MOV #4,R2 ; Prepare to wait for 4-byte control block +175576 ; JSR PC,WAIT_BLK ; Wait for four-byte control block +175576 ; MOV (SP)+,R0 ; Get result back +175576 ; MOV (SP)+,R1 ; Get handle back +175576 ; MOV (SP)+,R2 ; Get control block pointer back +175576 ; RTS PC +175576 000463 BR FILE_DONE ; Wait for control block, restore and return +175600 +175600 +175600 ; OSFIND - Open or Close a file +175600 ; ============================= +175600 ; On entry: R0=function +175600 ; R1=handle or =>filename +175600 ; On exit: R0=zero or handle +175600 ; +175600 ; Tube data: &12 function string &0D -- handle +175600 ; &12 &00 handle -- &7F +175600 ; +175600 _FIND: +175600 010046 MOV R0,-(SP) ; Save R0 +175602 012700 000022 MOV #&12,R0 +175606 004767 001364 JSR PC,SEND_CMD ; Send command &12 - OSFIND +175612 012600 MOV (SP)+,R0 ; Get R0 back +175614 004767 001356 JSR PC,SEND_BYTE ; Send function +175620 005700 TST R0 ; Check function +175622 001006 BNE OPEN ; Jump to deal with OPEN +175624 ; CLOSE +175624 004767 001344 JSR PC,SEND_BYTE_R1 ; Send handle to Tube +175630 004767 000370 JSR PC,WAIT_BYTE ; Wait for acknowledgement +175634 005000 CLR R0 ; Zero R0 +175636 000207 RTS PC +175640 OPEN: +175640 010146 MOV R1,-(SP) ; Save R1 +175642 004767 001250 JSR PC,SEND_STR ; Send string at R1 +175646 004767 000352 JSR PC,WAIT_BYTE ; Wait for returned handle +175652 012601 MOV (SP)+,R1 ; Restore R1 +175654 000207 RTS PC +175656 +175656 +175656 ; OSFILE - Operate on whole files +175656 ; =============================== +175656 ; On entry: R0=function +175656 ; R1=>control block +175656 ; On exit: R0=result +175656 ; R1 preserved +175656 ; control block updated +175656 ; +175656 ; Tube data: &14 block string function -- result block +175656 ; +175656 _FILE: +175656 010246 MOV R2,-(SP) ; Save R2 +175660 010146 MOV R1,-(SP) ; Save R1 +175662 010046 MOV R0,-(SP) ; Save function +175664 012700 000024 MOV #&14,R0 +175670 004767 001302 JSR PC,SEND_CMD ; Send command &14 - OSFILE +175674 062701 000002 ADD #2,R1 ; Point to control block contents +175700 012702 000020 MOV #16,R2 +175704 004767 001224 JSR PC,SEND_BLK ; Send 16-byte control block +175710 004767 176322 JSR PC,FETCHWORD2 ; Get address of filename, allowing for nonalignment +175714 004767 001176 JSR PC,SEND_STR ; Send filename string +175720 012600 MOV (SP)+,R0 +175722 004767 001250 JSR PC,SEND_BYTE ; Send function +175726 004767 000272 JSR PC,WAIT_BYTE ; Wait for returned result +175732 011601 MOV (SP),R1 ; Get control block pointer back +175734 010046 MOV R0,-(SP) ; Save result +175736 062701 000002 ADD #2,R1 ; Point to control block contents +175742 012702 000020 MOV #16,R2 ; Prepate to wait for 16-byte control block +175746 FILE_DONE: +175746 004767 001200 JSR PC,WAIT_BLK ; Wait for control block +175752 012600 MOV (SP)+,R0 ; Get result back +175754 012601 MOV (SP)+,R1 ; Get control block pointer back +175756 012602 MOV (SP)+,R2 ; Get R2 back +175760 000207 RTS PC +175762 +175762 +175762 ; OS_GBPB - Multiple byte read and write +175762 ; ===================================== +175762 ; On entry: R0=function +175762 ; R1=>control block +175762 ; On exit: R0=returned value +175762 ; control block updated +175762 ; +175762 ; Tube data: &16 block function -- block Carry result +175762 ; +175762 _GBPB: +175762 #ifndef NOCHNZERO +175762 105711 TSTB (R1) ; Check handle +175764 001005 BNE GBPB1 ; Non-zero handle +175766 005700 TST R0 ; Check function +175770 001403 BEQ GBPB1 ; Pass OSGBPB 0 to Tube +175772 020027 000005 CMP R0,#5 +175776 103423 BCS GBPB_RDWR ; Channel 0 via OSRDCH/OSWRCH +176000 #endif +176000 GBPB1: +176000 010246 MOV R2,-(SP) ; Save R2 +176002 010046 MOV R0,-(SP) ; Save function +176004 012700 000026 MOV #&16,R0 +176010 004767 001162 JSR PC,SEND_CMD ; Send command &16 - OSGBPB +176014 012702 000015 MOV #13,R2 +176020 004767 001110 JSR PC,SEND_BLK ; Send 13-byte control block +176024 012600 MOV (SP)+,R0 +176026 004767 001144 JSR PC,SEND_BYTE ; Send function +176032 012702 000015 MOV #13,R2 +176036 004767 001110 JSR PC,WAIT_BLK ; Wait for 13-byte control block +176042 012602 MOV (SP)+,R2 ; Get R2 back +176044 000463 BR WAIT_CHAR ; Get Carry and result byte +176046 ; +176046 ; Read or write block of memory to/from OSWRCH/OSRDCH +176046 ; --------------------------------------------------- +176046 ; NB, only uses 16-bit address and count, b16-b31 ignored and not updated +176046 ; +176046 #ifndef NOCHNZERO +176046 GBPB_RDWR: +176046 010246 MOV R2,-(SP) ; Save R2 +176050 010046 MOV R0,-(SP) ; Save function +176052 010146 MOV R1,-(SP) ; Save pointer to control block +176054 005201 INC R1 ; Point to Address +176056 004767 176160 JSR PC,FETCHWORD ; R1=Address, allowing for nonalignment +176062 010102 MOV R1,R2 ; R2=Address +176064 012601 MOV (SP)+,R1 ; Restore pointer to control block +176066 +176066 GBPB_LP: +176066 021627 000003 CMP (SP),#3 +176072 103004 BCC GBPB_RD ; Function 3/4, read characters +176074 ; Function 1/2, write characters +176074 112200 MOVB (R2)+,R0 ; Get character from memory +176076 004767 000214 JSR PC,_WRCH ; Write it +176102 000404 BR GBPB_NEXT ; Jump to update and loop +176104 GBPB_RD: +176104 004767 000076 JSR PC,_RDCH ; Read character +176110 103415 BCS GBPB_EXIT ; Carry set, exit +176112 110022 MOVB R0,(R2)+ ; Store character +176114 GBPB_NEXT: +176114 105761 000005 TSTB 5(R1) ; Test byte low byte +176120 001002 BNE GBPB_LO ; Count<>&xx00 +176122 105361 000006 DECB 6(R1) ; Decrement count high byte +176126 GBPB_LO: +176126 105361 000005 DECB 5(R1) ; Decrement count low byte +176132 001355 BNE GBPB_LP ; Loop until all done +176134 105761 000006 TSTB 6(R1) ; Test count high byte +176140 001352 BNE GBPB_LP ; Loop until all done +176142 000241 CLC ; Clear carry for OK +176144 GBPB_EXIT: +176144 110261 000001 MOVB R2,1(R1) +176150 000302 SWAB R2 +176152 110261 000002 MOVB R2,2(R1) ; Update address +176156 005726 TST (SP)+ ; Drop function +176160 012602 MOV (SP)+,R2 ; Restore R2 +176162 012700 000000 MOV #0,R0 ; R0=0, function supported, don't affect Carry +176166 000207 RTS PC +176170 #endif +176170 +176170 +176170 ; OSBGET - Get a byte from open file +176170 ; ================================== +176170 ; On entry: R1=handle +176170 ; On exit: R0=byte Read +176170 ; R1=preserved +176170 ; Cy set if EOF +176170 ; +176170 ; Tube data: &0E handle -- Carry byte +176170 ; +176170 _BGET: +176170 #ifndef NOCHNZERO +176170 005701 TST R1 ; Check handle +176172 001405 BEQ _RDCH ; BGET#0 calls OSRDCH +176174 #endif +176174 012700 000016 MOV #&0E,R0 +176200 004767 000764 JSR PC,SEND_CMD_R1 ; Send command and handle +176204 000403 BR WAIT_CHAR ; Wait for Carry, Byte +176206 +176206 +176206 ; OSRDCH - Wait for character from input stream +176206 ; ============================================= +176206 ; On exit: R0=char, Cy=carry +176206 ; +176206 ; Tube data: &00 -- Carry Char +176206 ; +176206 _RDCH: +176206 005000 CLR R0 +176210 004767 000762 JSR PC,SEND_CMD ; Send command &00 - OSRDCH +176214 WAIT_CHAR: +176214 004767 000004 JSR PC,WAIT_BYTE ; Get returned byte +176220 062700 177600 ADD #&FF80,R0 ; Copy b7 into carry +176224 ; Continue to fetch byte from Tube R2 +176224 +176224 +176224 ; Wait for byte in Tube Register 1 to return in R0, preserving Carry +176224 ; ================================================================== +176224 WAIT_BYTE: +176224 113700 177764 MOVB @#TUBE2S,R0 ; Read Tube R2 status +176230 100375 BPL WAIT_BYTE ; Loop until b7 set +176232 113700 177766 MOVB @#TUBE2,R0 ; Get byte from Tube R2 +176236 000207 RTS PC +176240 +176240 +176240 ; OSBPUT - Put a byte to an open file +176240 ; =================================== +176240 ; On entry: R0=byte to write +176240 ; R1=handle +176240 ; On exit: R0=preserved +176240 ; R1=preserved +176240 ; +176240 ; Tube data: &10 handle byte -- &7F +176240 ; +176240 _BPUT: +176240 #ifndef NOCHNZERO +176240 005701 TST R1 ; Check handle +176242 001425 BEQ _WRCH ; BPUT#0 calls OSWRCH +176244 #endif +176244 010046 MOV R0,-(SP) ; Save R0 +176246 012700 000020 MOV #&10,R0 +176252 004767 000712 JSR PC,SEND_CMD_R1 ; Send command and handle +176256 011600 MOV (SP),R0 ; Get R0 back +176260 004767 000712 JSR PC,SEND_BYTE ; Send byte to Tube +176264 004767 177734 JSR PC,WAIT_BYTE ; Wait for acknowledgement +176270 012600 MOV (SP)+,R0 ; Restore R0 +176272 000207 RTS PC +176274 +176274 +176274 ; OSASCI - Send ASCII character +176274 ; ============================= +176274 _ASCII: +176274 022700 000015 CMP #13,R0 ; If not , send raw character +176300 001006 BNE _WRCH ; If , fall through to send NEWL +176302 +176302 +176302 ; OSNEWL - Send LF/CR sequence +176302 ; ============================ +176302 _NEWL: +176302 012700 000012 MOV #10,R0 +176306 004767 000004 JSR PC,_WRCH ; Output LF +176312 012700 000015 MOV #13,R0 ; Fall through into WRCH +176316 +176316 +176316 ; OSWRCH - Send character in R0 to Tube Register 1 +176316 ; ================================================ +176316 _WRCH: +176316 010046 MOV R0,-(SP) ; Save R0 +176320 SEND_R1LP: +176320 113700 177760 MOVB @#TUBE1S,R0 ; Read Tube R1 status +176324 042700 000277 BIC #&BF,R0 ; Check b6 of status +176330 001773 BEQ SEND_R1LP ; Loop until b6 set +176332 012600 MOV (SP)+,R0 ; Get R0 back +176334 110037 177762 MOVB R0,@#TUBE1 ; Send byte to Tube R1 +176340 000207 RTS PC +176342 +176342 +176342 ; TRAP handler +176342 ; ============ +176342 ; TRAP is used for Unix calls and is followed by a variable number of inline parameters, +176342 ; so it is impossible to simply do a null return. So, the safest option is to give the +176342 ; standard CoPro client 'unsupported' error. +176342 TRAP_HANDLER: +176342 104017 EMT 15 +176344 377 EQUB 255 +176345 102 141 144 EQUS "Bad" +176350 000 EQUB 0 +176351 000 ALIGN +176352 +176352 +176352 ; EMT handler +176352 ; =========== +176352 ; On extry, R0-R5 contain any parameters +176352 ; PSW ignored +176352 ; On exit, R0-R5 contain any returned values +176352 ; C returns any returned value +176352 ; V set if error, R0=>error block +176352 ; +176352 EMT_HANDLER: +176352 042766 177760 000002 BIC #&FFF0,2(SP) ; Clear stacked flags +176360 013746 172740 MOV @#ERRV,-(SP) ; Save old ERR handler +176364 013746 172754 MOV @#EMTV,-(SP) ; Save old EMT SP +176370 010637 172754 MOV SP,@#EMTV ; Save current EMT SP +176374 012737 176440 172740 MOV #EMT_ERROR,@#ERRV ; Catch EMT errors +176402 005746 TST -(SP) ; Make space on stack +176404 010046 MOV R0,-(SP) ; Save R0 +176406 016600 000010 MOV 8(SP),R0 ; Get return address +176412 ; MOV -2(R0),R0 ; Get EMT instruction +176412 014000 MOV -(R0),R0 ; Get EMT instruction v0.20a +176414 042700 177400 BIC #&FF00,R0 ; Get EMT number +176420 ;CMP R0,#EMTMAX +176420 ;BCC EMT_IGNORE ; Out of range +176420 060000 ADD R0,R0 ; Index into dispatch table +176422 063700 172756 ADD @#EMTADDR,R0 ; Index into dispatch table +176426 011066 000002 MOV (R0),2(SP) ; Copy address to stack +176432 012600 MOV (SP)+,R0 ; Restore R0 +176434 004736 JSR PC,@(SP)+ ; Jump to routine +176436 ; BVS EMT_ERROR ; V set, set stacked V flag +176436 102005 BVC EMT_NOERROR ; V clear, jump to check Carry +176440 EMT_ERROR: +176440 013706 172754 MOV @#EMTV,SP ; Get saved EMT SP +176444 052766 000002 000006 BIS #2,6(SP) ; Set stacked V flag +176452 EMT_NOERROR: +176452 103003 BCC EMT_EXIT ; C clear, jump to exit +176454 052766 000001 000006 BIS #1,6(SP) ; Set stacked C flag +176462 EMT_EXIT: +176462 012637 172754 MOV (SP)+,@#EMTV ; Restore old EMT SP +176466 012637 172740 MOV (SP)+,@#ERRV ; Restore old error handler +176472 000002 RTI ; Return from EMT +176474 ;EMT_IGNORE: +176474 ;MOV (SP)+,R0 ; Restore R0 +176474 ;TST (SP)+ ; Balance stack +176474 ;BR EMT_EXIT +176474 +176474 +176474 ; EMT 15 - Generate an error +176474 ; -------------------------- +176474 EMT15: +176474 ; TST (SP)+ ; Drop return to EMT handler +176474 ; MOV (SP)+,@#EMTV ; Restore old EMT SP +176474 ; MOV (SP)+,@#ERRV ; Restore mainline error handler +176474 ; MOV (SP),R0 ; Get return address pointing to inline error block +176474 ; MOV @#ERRV,(SP) ; Replace with address of error handler +176474 ; RTI ; Jump to handler, restoring PSW +176474 ; v0.20a optimisation +176474 016600 000006 MOV 6(SP),R0 ; Get return address pointing to inline error block +176500 016666 000004 000006 MOV 4(SP),6(SP) ; Replace return address with mainline error handler +176506 000207 RTS PC ; Return to EMT handler, thence to error handler +176510 +176510 +176510 ; EMT 14 - Read/Write handlers, etc. +176510 ; ---------------------------------- +176510 ; On entry: R0=0..255 to claim EMTs 0..255 +176510 ; R1=new routine address or 0 to read +176510 ; R0=&FFxx to set environment handlers +176510 ; R1=new handler address or 0 to read +176510 ; R2=new handler data address or 0 to read +176510 ; On exit: R0=preserved +176510 ; R1=old address +176510 ; R2=old handler address or preserved +176510 ; +176510 EMT14: +176510 ; So that EMT14 can change the ERRV we have to rewind out of the EMT handler and restore ERRV so that +176510 ; it can be changed. Otherwise, the EMT handler will just restore ERRV to whatever it was before. +176510 005726 TST (SP)+ ; Drop return to EMT handler +176512 012637 172754 MOV (SP)+,@#EMTV ; Restore old EMT SP +176516 012637 172740 MOV (SP)+,@#ERRV ; Restore mainline error handler +176522 010046 MOV R0,-(SP) ; Save R0 +176524 100413 BMI EMT14_HANDLER ; Negative, set up handler +176526 020027 000400 CMP R0,#EMTMAX +176532 103033 BCC EMT14_QUIT ; Out of range +176534 060000 ADD R0,R0 ; Double R0 to offset into table +176536 063700 172756 ADD @#EMTADDR,R0 ; Index into EMT dispatch table +176542 011046 MOV (R0),-(SP) ; Get old address +176544 005701 TST R1 +176546 001424 BEQ EMT14_READ ; Zero, just read +176550 010110 MOV R1,(R0) ; Store new address if non-zero +176552 000422 BR EMT14_READ +176554 +176554 EMT14_HANDLER: +176554 005100 COM R0 +176556 020027 000006 CMP R0,#HANDLEMAX +176562 103017 BCC EMT14_QUIT ; Out of range +176564 060000 ADD R0,R0 +176566 060000 ADD R0,R0 ; Times four to offset into table +176570 062700 172730 ADD #HANDLERS,R0 ; Index into handlers +176574 011046 MOV (R0),-(SP) ; Save old handler address +176576 005701 TST R1 +176600 001401 BEQ EMT14_HAND2 ; Just read old handler address +176602 010110 MOV R1,(R0) ; Store new handler address +176604 EMT14_HAND2: +176604 005720 TST (R0)+ ; DMB: Step to data address +176606 011046 MOV (R0),-(SP) ; Save old data address +176610 005702 TST R2 +176612 001401 BEQ EMT14_HAND3 ; Just read old data address +176614 010210 MOV R2,(R0) ; Store new data address +176616 EMT14_HAND3: +176616 012602 MOV (SP)+,R2 ; Get old data +176620 EMT14_READ: +176620 012601 MOV (SP)+,R1 ; Get old address +176622 EMT14_QUIT: +176622 012600 MOV (SP)+,R0 ; Restore R0 +176624 ; RTS PC +176624 000002 RTI +176626 +176626 ; EMT 13 - Misc control functions +176626 ; ------------------------------- +176626 ; On entry: R0=0 - Load BBC BASIC +176626 ; 1 - Set up default environment: IRQ/NMI, EMTs, handlers +176626 ; 2 - Set up default EMTs and handlers +176626 ; 3 - Set up default handlers only +176626 EMT13: +176626 005700 TST R0 +176630 001406 BEQ EMTXX ; R0=0 - unsupported +176632 020027 000001 CMP R0,#1 +176636 001406 BEQ INIT_ENV ; R0=1 - Set up hardware and software handlers and EMTs +176640 ; CMP R0,#2 +176640 ; BEQ INIT_HANDLES ; Set up software handlers and EMTs +176640 ; CMP R0,#3 +176640 ; BEQ INIT_HANDLES ; Set up software handlers +176640 020027 000004 CMP R0,#4 +176644 103434 BCS INIT_HANDLES ; R0=2, R0=3 - Set up software handlers +176646 ; Fall through with others, returning R0 preserved +176646 +176646 EMTXX: ; EMTs 16-255 +176646 EVENT: ; Null event handler +176646 000207 RTS PC +176650 +176650 ; EMT 0 - Exit current program +176650 ; ---------------------------- +176650 EMT0: +176650 ; JMP @#EXITV ; Jump via exit handler +176650 000177 174054 JMP @EXITV ; DMB Jump via exit handler +176654 +176654 +176654 ; Set up default system environment +176654 ; ================================= +176654 INIT_ENV: +176654 005000 CLR R0 +176656 INIT_LP1: +176656 012720 177732 MOV #NULLIRQ,(R0)+ ; Set all hardware vectors to NULLIRQ +176662 005020 CLR (R0)+ ; Allow all interupts +176664 020027 000400 CMP R0,#&100 ; Hardware vectors at at &0000-&00FF +176670 001372 BNE INIT_LP1 +176672 ; +176672 ; MOV #CLICOM,@#STACKVEC ; Could also catch Bad Stack vector +176672 ; ; There's no easy way to recover from a Bad Stack, so would have +176672 ; ; bomb out to somewhere safe. +176672 012737 176342 000034 MOV #TRAP_HANDLER,@#TRAPVEC ; Set up TRAP vector to give an error +176700 012737 176352 000030 MOV #EMT_HANDLER,@#EMTVEC ; Set up EMT vector +176706 ; CLR @#EMTVEC+2 ; EMT processor status - allow all interupts +176706 INIT_IRQ: +176706 012737 177726 000200 MOV #NMI_ACK,@#NMIVEC+0 ; Set up NMI vector +176714 012737 000340 000202 MOV #&00E0,@#NMIVEC+2 ; NMI processor status - bar all interupts +176722 012737 177252 000204 MOV #IRQ,@#IRQVEC+0 ; Set up IRQ vector +176730 012737 000300 000206 MOV #&00C0,@#IRQVEC+2 ; IRQ processor status - bar all except NMIs +176736 ; +176736 INIT_HANDLES: +176736 ; Should check R0, if R0=3 set handlers only +176736 012702 172730 MOV #HANDLERS,R2 ; R2=> Start of handlers DMB +176742 012701 177004 MOV #HANDDEFAULT,R1 ; R1=> Default handlers and EMTs +176746 012700 000044 MOV #HANDLEMAX*2+WORKSPMAX/2+16,R0 ; R0=word count of handlers (2 per handle) + workspace (counted in bytes) + core EMTs DMB +176752 013746 172774 MOV @#PROG,-(SP) ; Save PROG +176756 INIT_LP2: +176756 012122 MOV (R1)+,(R2)+ ; Set up initial settings +176760 005300 DEC R0 ; and EMT dispatch table +176762 001375 BNE INIT_LP2 +176764 012637 172774 MOV (SP)+,@#PROG ; Restore PROG +176770 ; +176770 012700 000360 MOV #EMTMAX-16,R0 ; Number of unused EMTs +176774 INIT_CLR: +176774 011122 MOV (R1),(R2)+ ; EMTs 16-255 do nothing +176776 005300 DEC R0 +177000 001375 BNE INIT_CLR +177002 INIT_DONE: +177002 000207 RTS PC ; Return with R0=0, R1,R2 corrupted +177004 +177004 ; Default settings and EMT table +177004 ; ============================== +177004 HANDDEFAULT: +177004 174074 EQUW EXITHAND ; &D8 - Default exit handler +177006 000000 EQUW 0 ; &DA - Default exit address +177010 174226 EQUW ESCHAND ; &DC - Default escape handler +177012 172777 EQUW ESCFLG ; &DE - Default escape flag +177014 174200 EQUW ERRHAND ; &E0 - Default error handler +177016 172400 EQUW ERRBLK ; &E2 - Default error buffer +177020 176646 EQUW EVENT ; &E4 - Default event handler +177022 000000 EQUW 0 ; &E6 - Unused +177024 177732 EQUW USERIRQ ; &E8 - Default unknown IRQ handler +177026 000000 EQUW 0 ; &EA - Unused +177030 000000 EQUW 0 ; &EC - Holds old SP within EMT handler +177032 173000 EQUW EMTTABLE ; &EE - Default EMT dispatch table +177034 +177034 000000 EQUW 0 ; &F0 - unused +177036 174004 EQUW BANNER ; &F2 - Line pointer +177040 000400 EQUW RAMSTART ; &F4 - Lowest user memory +177042 172400 EQUW RAMEND ; &F6 - Highest user memory +177044 000000 000000 EQUD 0 ; &F8 - Transfer address +177050 174034 EQUW STARTUP ; &FC - Default current program +177052 000 EQUB 0 ; &FE - Spare byte +177053 000 EQUB 0 ; &FF - Escape flag +177054 EMTDEFAULT: +177054 176650 EQUW EMT0 ; EMT 0 - QUIT +177056 174276 EQUW _CLI ; EMT 1 - OSCLI +177060 174760 EQUW _BYTE ; EMT 2 - OSBYTE +177062 175164 EQUW _WORD ; EMT 3 - OSWORD +177064 176316 EQUW _WRCH ; EMT 4 - OSWRCH +177066 176302 EQUW _NEWL ; EMT 5 - OSNEWL +177070 176206 EQUW _RDCH ; EMT 6 - OSRDCH +177072 175656 EQUW _FILE ; EMT 7 - OSFILE +177074 175526 EQUW _ARGS ; EMT 8 - OSARGS +177076 176170 EQUW _BGET ; EMT 9 - OSBGET +177100 176240 EQUW _BPUT ; EMT 10 - OSBPUT +177102 175762 EQUW _GBPB ; EMT 11 - OSGBPB +177104 175600 EQUW _FIND ; EMT 12 - OSFIND +177106 176626 EQUW EMT13 ; EMT 13 - System control +177110 176510 EQUW EMT14 ; EMT 14 - Set handlers +177112 176474 EQUW EMT15 ; EMT 15 - ERROR +177114 176646 EQUW EMTXX ; EMTs 16-255 - unused +177116 +177116 +177116 ; ***************** +177116 ; TUBE I/O ROUTINES +177116 ; ***************** +177116 +177116 ; Send -string at R1 to Tube Register 2 +177116 ; ========================================= +177116 SEND_STR: +177116 112100 MOVB (R1)+,R0 ; Get byte from R1, increment R1 +177120 004767 000052 JSR PC,SEND_BYTE ; Send byte via Tube R2 +177124 020027 000015 CMP R0,#13 ; Test current character +177130 001372 BNE SEND_STR ; Loop until sent +177132 000207 RTS PC +177134 +177134 +177134 ; Send block at R1 to Tube Register 2 +177134 ; =================================== +177134 SEND_BLK: +177134 060201 ADD R2,R1 ; Add length of control block to R1 +177136 SEND_BLKLP: +177136 114100 MOVB -(R1),R0 ; Decrement R1, Get byte from R1 +177140 004767 000032 JSR PC,SEND_BYTE ; Send byte via Tube R2 +177144 005302 DEC R2 ; Decrement count +177146 001373 BNE SEND_BLKLP ; Loop until all sent +177150 000207 RTS PC +177152 +177152 +177152 ; Wait for block at R1 from Tube Register 2 +177152 ; ========================================= +177152 WAIT_BLK: +177152 060201 ADD R2,R1 ; Add length of control block to R1 +177154 WAIT_BLKLP: +177154 004767 177044 JSR PC,WAIT_BYTE ; Wait for byte via Tube R2 +177160 110041 MOVB R0,-(R1) ; Decrement R1, store byte to R1 +177162 005302 DEC R2 ; Decrement count +177164 001373 BNE WAIT_BLKLP ; Loop until all received +177166 000207 RTS PC +177170 +177170 +177170 ; Send command in R0 followed by byte in R1 +177170 ; ========================================= +177170 SEND_CMD_R1: +177170 004767 000002 JSR PC,SEND_CMD ; Send command +177174 +177174 +177174 ; Send byte in R1 to Tube Register 2 +177174 ; ================================== +177174 SEND_BYTE_R1: +177174 010100 MOV R1,R0 ; Pass byte to R0 and fall through +177176 +177176 +177176 ; Send byte in R0 to Tube Register 2 +177176 ; ================================== +177176 SEND_CMD: +177176 SEND_BYTE: +177176 010046 MOV R0,-(SP) ; Save R0 +177200 SEND_BYTELP: +177200 113700 177764 MOVB @#TUBE2S,R0 ; Read Tube R2 status +177204 042700 000277 BIC #&BF,R0 ; Check b6 of status +177210 001773 BEQ SEND_BYTELP ; Loop until b6 set +177212 012600 MOV (SP)+,R0 ; Get R0 back +177214 110037 177766 MOVB R0,@#TUBE2 ; Send byte to Tube R2 +177220 000207 RTS PC +177222 +177222 +177222 ; Host->Client communication via interupts +177222 ; ======================================== +177222 Get_R1: +177222 113700 177760 MOVB @#TUBE1S,R0 ; Read Tube R1 status +177226 100375 BPL Get_R1 ; Loop until b7 set +177230 113700 177762 MOVB @#TUBE1,R0 ; Get byte from Tube R1 +177234 000207 RTS PC +177236 +177236 Get_R4: +177236 113700 177774 MOVB @#TUBE4S,R0 ; Read Tube R4 status +177242 100375 BPL Get_R4 ; Loop until b7 set +177244 113700 177776 MOVB @#TUBE4,R0 ; Get byte from Tube R4 +177250 000207 RTS PC +177252 +177252 +177252 ; Interrupt handler +177252 ; ================ +177252 ; When Host sends a byte to R1 or R4 it generates a Client IRQ. +177252 ; Within the interupt handler PSW has been saved on the stack +177252 ; and further interrupts are disabled. +177252 ; +177252 IRQ: +177252 010046 MOV R0,-(SP) ; Save R0 +177254 113700 177774 MOVB @#TUBE4S,R0 ; Read Tube R4 status +177260 100434 BMI IRQ_R4 ; If b7 set, R4 generated the interrupt +177262 113700 177760 MOVB @#TUBE1S,R0 ; Read Tube R1 status +177266 100403 BMI IRQ_R1 ; If b7 set, R1 generated the interrupt +177270 012600 MOV (SP)+,R0 ; Get R0 back +177272 ; JMP @#USERIRQV ; Something else generated the interrupt +177272 000177 173452 JMP @USERIRQV ; DMB Something else generated the interrupt +177276 +177276 ; Data present in Tube R1 generated an interrupt +177276 ; +177276 IRQ_R1: +177276 113700 177762 MOVB @#TUBE1,R0 ; Get byte from Tube R1 +177302 100420 BMI IRQ_ESCAPE ; b7 set, change Escape state +177304 ; +177304 ; R1<&80 - Host event being passed to client +177304 ; Tube data: via R1: &00 Y X A +177304 ; +177304 010146 MOV R1,-(SP) ; Save R1 +177306 010246 MOV R2,-(SP) ; Save R2 +177310 004767 177706 JSR PC,Get_R1 ; Wait for byte via Tube R1 +177314 010002 MOV R0,R2 ; Pass to R2 +177316 004767 177700 JSR PC,Get_R1 ; Wait for byte via Tube R1 +177322 010001 MOV R0,R1 ; Pass to R1 +177324 004767 177672 JSR PC,Get_R1 ; Wait for byte via Tube R1 +177330 ; JSR PC,@#EVENTV ; Call event vector +177330 004777 173410 JSR PC,@EVENTV ; DMB Call event vector +177334 012602 MOV (SP)+,R2 ; Restore R2 +177336 ; BR NMI_DONE2 ; Restore registers and return from interrupt +177336 NMI_DONE2: +177336 012601 MOV (SP)+,R1 +177340 012600 MOV (SP)+,R0 +177342 000002 RTI ; Return from interupt +177344 +177344 ; R1>&7F - Host changing Escape state +177344 ; Tube data: via R1: flag, b7=1, b6=state +177344 ; +177344 IRQ_ESCAPE: +177344 ; JSR PC,@#ESCV ; Call Escape handler +177344 004777 173364 JSR PC,@ESCV ; DMB Call Escape handler +177350 000526 BR NMI_DONE1 ; Restore and return from interrupt +177352 ; MOV (SP)+,R0 ; Restore R0 +177352 ; RTI ; Return from interupt +177352 +177352 ; Data present in Tube R4 generated an interupt +177352 ; +177352 IRQ_R4: +177352 113700 177776 MOVB @#TUBE4,R0 ; Get byte from Tube R4 +177356 100023 BPL IRQ_DATA ; b7=0, jump to do data transfer +177360 +177360 ; R4>&7F - Error occured +177360 ; Tube data: via R4: &FF, via R2: &00 err string &00 +177360 ; +177360 010146 MOV R1,-(SP) ; Remove this when errjmp done +177362 004767 176636 JSR PC,WAIT_BYTE ; Wait for an initial byte from R2 +177366 013701 172742 MOV @#ERRADDR,R1 ; Point to error buffer +177372 004767 176626 JSR PC,WAIT_BYTE +177376 110021 MOVB R0,(R1)+ ; Store error number +177400 IRQ_R4LP: +177400 004767 176620 JSR PC,WAIT_BYTE ; Wait for byte of error string +177404 110021 MOVB R0,(R1)+ ; Store in error buffer +177406 001374 BNE IRQ_R4LP ; Loop until terminating &00 received +177410 012601 MOV (SP)+,R1 ; Restore R1 +177412 012600 MOV (SP)+,R0 ; Balance stack +177414 013700 172742 MOV @#ERRADDR,R0 ; Point to error block +177420 013716 172740 MOV @#ERRV,(SP) ; Replace return address with error handler +177424 000002 RTI ; Restore PSW and jump to error handler +177426 +177426 ;; Generate an error without using EMT call +177426 ;; ---------------------------------------- +177426 ;MKERR: +177426 ; MOV (SP)+,R0 ; Point to inline error block +177426 ;; JMP @#ERRV ; Jump to error handler +177426 ; JMP @ERRV ; DMB Jump to error handler +177426 +177426 ; R4<&80 - Data transfer +177426 ; Tube data: via R4: action ID address sync, via R3: data +177426 ; +177426 IRQ_DATA: +177426 ; R0=transfer type, (sp)=mainline R0 +177426 ; +177426 010146 MOV R1,-(SP) ; Save R1 +177430 010001 MOV R0,R1 ; Save transfer type in R2 +177432 004767 177600 JSR PC,Get_R4 ; Wait for caller ID +177436 020127 000005 CMP R1,#5 ; Is transfer 'release'? +177442 001735 BEQ NMI_DONE2 ; Exit if 'release' +177444 004767 177566 JSR PC,Get_R4 ; Get data address byte 4 +177450 110037 172773 MOVB R0,@#ADDR+3 +177454 004767 177556 JSR PC,Get_R4 ; Get data address byte 3 +177460 110037 172772 MOVB R0,@#ADDR+2 +177464 004767 177546 JSR PC,Get_R4 ; Get data address byte 2 +177470 110037 172771 MOVB R0,@#ADDR+1 +177474 004767 177536 JSR PC,Get_R4 ; Get data address byte 1 +177500 110037 172770 MOVB R0,@#ADDR+0 +177504 113700 177772 MOVB @#TUBE3,R0 ; Clear Tube3 FIFO +177510 113700 177772 MOVB @#TUBE3,R0 +177514 004767 177516 JSR PC,Get_R4 ; Get sync byte +177520 060101 ADD R1,R1 ; Index into NMI dispatch table +177522 016137 177734 000200 MOV NMIADDRS(R1),@#NMIVEC ; Set up NMI vector +177530 013700 172770 MOV @#ADDR,R0 ; Get transfer address +177534 020127 000014 CMP R1,#12 ; check transfer type +177540 103676 BCS NMI_DONE2 ; Jump to exit if not 256-byte transfers +177542 001412 BEQ NMI6 ; Jump with 256-byte write +177544 +177544 ; Transfer 7 - Read 256 bytes from Host via R3 +177544 ; -------------------------------------------- +177544 NMI7: +177544 012701 000400 MOV #256,R1 ; Prepare to transfer 256 bytes +177550 NMI7_LOOP: +177550 105737 177770 TSTB @#TUBE3S +177554 100375 BPL NMI7_LOOP ; Wait for Tube R3 ready +177556 113720 177772 MOVB @#TUBE3,(R0)+ ; Fetch byte from Tube R3 and store +177562 005301 DEC R1 ; Decrement count +177564 001371 BNE NMI7_LOOP ; Loop for 256 bytes +177566 000416 BR NMI_DONE +177570 +177570 ; Transfer 6 - Send 256 bytes to Host via R3 +177570 ; ------------------------------------------ +177570 NMI6: +177570 012701 000400 MOV #256,R1 ; Prepare to transfer 256 bytes +177574 NMI6_LOOP: +177574 105737 177770 TSTB @#TUBE3S +177600 100375 BPL NMI6_LOOP ; Wait for Tube R3 ready +177602 112037 177772 MOVB (R0)+,@#TUBE3 ; Fetch byte and send to Tube R3 +177606 005301 DEC R1 ; Decrement count +177610 001371 BNE NMI6_LOOP ; Loop for 256 bytes +177612 NMI6_DONE: +177612 105737 177770 TSTB @#TUBE3S +177616 100375 BPL NMI6_DONE ; Wait for Tube R3 ready again +177620 105037 177772 CLRB @#TUBE3 ; Send final sync byte +177624 NMI_DONE: +177624 012601 MOV (SP)+,R1 ; Restore and return +177626 NMI_DONE1: +177626 010037 172770 MOV R0,@#ADDR ; Save updated transfer address +177632 012600 MOV (SP)+,R0 +177634 000002 RTI +177636 +177636 +177636 ; Transfer 3 - Read double bytes from host +177636 ; ---------------------------------------- +177636 NMI3: +177636 010046 MOV R0,-(SP) +177640 013700 172770 MOV @#ADDR,R0 ; Get transfer address +177644 113720 177772 MOVB @#TUBE3,(R0)+ ; Read two bytes +177650 113720 177772 MOVB @#TUBE3,(R0)+ +177654 000764 BR NMI_DONE1 +177656 +177656 ; Transfer 2 - Send double bytes to host +177656 ; -------------------------------------- +177656 NMI2: +177656 010046 MOV R0,-(SP) +177660 013700 172770 MOV @#ADDR,R0 ; Get transfer address +177664 112037 177772 MOVB (R0)+,@#TUBE3 ; Send two bytes +177670 112037 177772 MOVB (R0)+,@#TUBE3 +177674 000754 BR NMI_DONE1 +177676 +177676 ; Transfer 1 - Read single byte from host +177676 ; --------------------------------------- +177676 NMI1: +177676 010046 MOV R0,-(SP) +177700 013700 172770 MOV @#ADDR,R0 ; Get transfer address +177704 113720 177772 MOVB @#TUBE3,(R0)+ ; Transfer byte from Tube +177710 000746 BR NMI_DONE1 +177712 +177712 ; Transfer 0 - Send single byte to Host +177712 ; ------------------------------------- +177712 NMI0: +177712 010046 MOV R0,-(SP) +177714 013700 172770 MOV @#ADDR,R0 ; Get transfer address +177720 112037 177772 MOVB (R0)+,@#TUBE3 ; Transfer byte to Tube +177724 000740 BR NMI_DONE1 +177726 ;NMI_DONE1: +177726 ; MOV (SP)+,R0 +177726 ; RTI +177726 +177726 ; Transfers 4,5,6,7 - Just acknowledge NMI +177726 ; ---------------------------------------- +177726 NMI_ACK: +177726 105037 177772 CLRB @#TUBE3 ; Store to Tube R3 to acknowledge NMI +177732 USERIRQ: ; Default unknown IRQ handler +177732 NULLIRQ: ; Default unused hardware vector handler +177732 000002 RTI +177734 +177734 ; NMI transfer dispatch table +177734 ; --------------------------- +177734 NMIADDRS: +177734 177712 EQUW NMI0 ; Single byte to host +177736 177676 EQUW NMI1 ; Single byte from host +177740 177656 EQUW NMI2 ; Double byte to host +177742 177636 EQUW NMI3 ; Double byte from host +177744 177726 EQUW NMI_ACK ; Execute +177746 177726 EQUW NMI_ACK ; Release +177750 177726 EQUW NMI_ACK ; 256 bytes to host +177752 177726 EQUW NMI_ACK ; 256 bytes from host +177754 +177754 000 000 000 000 EQUM TUBEIO-$ ; Spare space +177760 +177760 ; Tube I/O registers +177760 ; ------------------ +177760 000000 000000 000000 000000 + 000000 000000 000000 000000 EQUW 0,0,0,0,0,0,0,0 ; Tube registers +200000 +Errors: 0 diff --git a/client/pdp11/021/Client11.pdp b/client/pdp11/021/Client11.pdp new file mode 100644 index 0000000000000000000000000000000000000000..f03dcd4f302ef680d92daa54dfd562fbe5266403 GIT binary patch literal 2048 zcmZ8iU2GIp6h8OP?9$mEm~QvFpd}q5Y=9WTkM@aRS*Rh3O+y4;j4Xk!JPA=Eh6k7_ zu+vaOHl$&BK+(hy;scQvV~D}Ki;~C#0Zot)wS;J62ofMWoozeY@w-#7#@*a=@AO&xMZi&<(YcK z^?5@ReS7y?GnL)7clQ7tpuXuLmN(^a(vd<%bWpcD6!nddIWt$YoHawXMI9l(4U|?S|0MZxE!!U-`I@UDCDL@c70=A#Ib&ZNl_-5Vx12g z1+yOI)D|wu7Mqq(HV zn8B2+&0JuS$$)sft<44!5{PNHRvX|{kI>z%NiheqevN?B*EQdGo2h#zU94Ihvdyf$ zGMLC&X`0}5VC}|^SVf5-W2)R{Vz8t)-YvNin?@PP%s@)eNiL5Y>xmrq%%~U(r%{mcsNF! zKRzC($H!yzH-9`Fr~CYKx>#XU2jz4tIVe=8p|g`QWOXjiYcP$eygq>+om5_BwGp;# zSsf3RodD8gbjxc@;p7_ZehniWElE?H&(sS$5j`xck3!k|9ZhMr=&C${hj~L`Vdrk5 zadaxDvD{s6Ecd`W+y1~C6;=yeGH==o+lb~X3aXoNV#C5j%Pnw&Up8IBDha ztqk*7f!*S+2aAPq`g)-bnTwk}ljqH(le37upl}Oc`AjXD)i#+K)&qpZX&&SX(YGTF zgXTsupQ$IAHe{+d%Es#i6resh4OFL2*QLYsQj-!l#GTND7h;oqRNMRvpQBX-`pyRfBx2L68jGG7EmaN1(qFzNQ9?_PJ;#^t_sGVwtp4}wxT#M*V zNa{CEq&JC?r129wyBST&w?jY_SC7?rq!m8LDyXWjYA35fw4TOV*#=>!qx70% zi^H_sS5~H@z5@6j;r;Oq8LAiPQWzR-{9cn|X=<`U)!%3-D@(8V{cGN;mc&-Cd@0 wasn't fetching block lengths correctly. EMT 14 wrote +; wrong 'address' if not passed 'handler'. ESCHAND should use @ESCADDR. +; HANDLERS equate had wrong arithmetic. +; JGH: INIT_ENV correctly initialises EMTs 0-15 and nulls 16-255 instead of +; setting 16-31 to garbage and missing 240-255 completely. EQUs used to allow +; more handlers to be added easily. +; v0.19a 11-Aug-2015 JGH: Crunched some blocks of common code. +; v0.19b 11-Aug-2015 JGH: Crunched NMI data transfer code. +; v0.19c 12-Aug-2015 JGH: STARTUP uses internal stack. MEMBOT and MEMTOP fetched from variables. All +; unused hardware vectors set to NULLIRQ. +; v0.19d 13-Aug-2015 JGH: Tidied up and optimised EXECUTE, OSCLI saves all registers, uses internal +; stack. EMT14 optimised. +; v0.19e 16-Aug-2015 JGH: TRAP jumps to error, EMT 15 used instead of MKERR. +; v0.19f 16-Aug-2015 DMB: Bugfix: INIT_ENV was looping forever, wrong number of WORKSPACE words initialised +; starting from wrong workspace offset, TRAP vector was wrong. Wrong address +; mode in MOV @#COM_BLK,R0 in CLICOM. +; v0.19g 16-Aug-2015 BMB: All NMIs were failing to update ADDR by returning via wrong exit. +VERSION: EQU &0020 +; v0.20 17-Aug-2015 JGH: EXECUTE possibly not working when entering BASIC. +; v0.20a 18-Aug-2015 DMB: Bugfix: EMT handler lost R0, EMT14 restored ERRV even after attempts to change it. +; Optimised EMT15 to free up space to fit EMT14 bugfix. +; v0.20b 18-Aug-2015 DMB: Bugfix: EMT15 optimisation used EMTHANDLER ERRV instead of mainline ERRV. +VERSION: EQU &0021 +; v0.21 19-Aug-2015 JGH: Incremented to version 0.21. Added conditional switch to remove BPUT/BGET/GBPB to +; channel 0, saves about 100 bytes if removed. +; +; +; This code may be freely reused. +; +; This code assumes a single memory space and assumes that code can access I/O devices, low memory +; vectors and user memory with ordinary MOV instructions. This will work with no seperate +; Kernal/User space, or with code never running in User mode. + +; Some naming conventions +; xxxxVEC - hardware vectors, eg EMTVEC, NMIVEC, etc +; xxxxV - software vectors, eg ESCV, ERRV, etc. +; xxxx or xxxHAND - handler for xxxx, eg ESCHAND, ERRHAND, etc. +; OSxxx or _xxx - routines handled by xxx, eg OSFILE handled by _FILE + +; Memory map: +; +-----------------------+ 0000 +; | Hardware vectors, etc | +; MEMBOT +-----------------------+ 0100 +; | | +; | | +; MEMTOP | ^^^User Stack^^^ | +; WORKSP +-----------------------+ F500 +; | ERRBLK--> <--CLISTK | +; +-----------------------+ F530 +; | CLIBUF--> <--ERRSTK | +; HANDLERS +-----------------------+ +; | EXITV EXITADDR | F5D8 +; | ESCV ESCADDR | F5DC +; | ERRV ERRADDR | F5E0 +; | EVENTV EVENTADDR | F5E4 +; | USERIRQV USERIRQADDR | F5E8 +; | EMTV EMTADDR | F5EC +; | SPARE LPTR | F5F0 +; | MEMBOT MEMTOP | F5F4 +; ADDR | Transfer address | F5F8 +; PROG | Current program | F5FC +; PROG+2 | unused byte | F5FE +; ESCFLG | Escape flag | F5FF +; EMTTABLE +-----------------------+ +; | EMT 0 code address | F600 +; | EMT 1 code address | F602 +; | EMT 2 code address | F604 +; | EMT 3 code address | F606 +; | EMT 4 code address | F608 +; | ... | +; | EMT 255 code address | F7FE +; START +-----------------------+ F800 +; | Tube client code | +; +-----------------------+ FFF0 +; | Tube I/O registers | +; +-----------------------+ FFFF + + +; PDP-11 hardware addresses +; ========================= +STACKVEC: EQU &04 ; Stack too low +EMTVEC: EQU &18 ; Vector called by EMT call +TRAPVEC: EQU &1C ; Vector called by TRAP call DMB + + +; Tube client system configuration tweekables +; =========================================== +START: EQU &F800 ; Start of code +TUBEIO: EQU &FFF0 ; Base of Tube I/O registers +NMIVEC: EQU &80 ; Vector called by Tube NMIs with priority 7 +IRQVEC: EQU &84 ; Vector called by Tube IRQs with priority 6 + +EMTMAX: EQU 256 ; Number of EMTs +EMTTABLE: EQU START-EMTMAX*2 ; EMT dispatch table +WORKSP: EQU EMTTABLE-256 ; 256 bytes for buffers, etc +RAMSTART: EQU &0100 ; Lowest available user memory address +RAMEND: EQU WORKSP ; Highest available user memory address + +;NOCHNZERO: EQU 1 ; Remove bput/bget#0 -> wrch/rdch, saves about 100 bytes + + +; Internal buffers, etc +; ===================== +ERRBLK: EQU WORKSP ; Buffer to store host error block +CLIBUF: EQU WORKSP+&30 ; Space to enter command line from CLI prompt +CLISTK: EQU CLIBUF ; Internal stack for CLI commands + ; as main memory may be overwritten +CLIEND: EQU HANDLERS +ERRSTK: EQU CLIEND ; Internal stack for host errors + +WORKSPMAX: EQU 16 ; 16 bytes of general workspace +HANDLEMAX: EQU 6 ; 6 environment handlers +HANDLERS: EQU WORKSP+256-WORKSPMAX-4*HANDLEMAX ; Address of environment handlers +EXITV: EQU HANDLERS+&00 ; Address of exit handler +EXITADDR: EQU HANDLERS+&02 ; unused +ESCV: EQU HANDLERS+&04 ; Address of escape handler +ESCADDR: EQU HANDLERS+&06 ; Address of escape flag +ERRV: EQU HANDLERS+&08 ; Address of error handler +ERRADDR: EQU HANDLERS+&0A ; Address of error buffer +EVENTV: EQU HANDLERS+&0C ; Address of event handler +EVENTADDR: EQU HANDLERS+&0E ; unused +USERIRQV: EQU HANDLERS+&10 ; Address of unknown IRQ handler +USERIRQADDR: EQU HANDLERS+&12 ; unused +EMTV: EQU HANDLERS+&14 ; Old SP within EMT handler +EMTADDR: EQU HANDLERS+&16 ; Address of EMT dispatch table + +SPARE: EQU WORKSP+&F0 ; unused +LPTR: EQU WORKSP+&F2 ; Point to command line (unused) +MEMBOT: EQU WORKSP+&F4 ; Lowest user memory address +MEMTOP: EQU WORKSP+&F6 ; Highest user memory address +ADDR: EQU WORKSP+&F8 ; Transfer address +PROG: EQU WORKSP+&FC ; Current program +PROG2: EQU WORKSP+&FE ; unused +ESCFLG: EQU WORKSP+&FF ; Escape flag + + +; Tube I/O devices +; ================ +TUBE1S: EQU TUBEIO+0 ; Tube Status 1 +TUBE1: EQU TUBEIO+2 ; Tube Data 1 - VDU +TUBE2S: EQU TUBEIO+4 ; Tube Status 2 +TUBE2: EQU TUBEIO+6 ; Tube Data 2 - Command +TUBE3S: EQU TUBEIO+8 ; Tube Status 3 +TUBE3: EQU TUBEIO+10 ; Tube Data 3 - Data +TUBE4S: EQU TUBEIO+12 ; Tube Status 4 +TUBE4: EQU TUBEIO+14 ; Tube Data 4 - Interrupt + + +; Code Entry +; ========== +; Set up vectors, hardware, memory, etc. +; Must be entered in Kernel mode. + ORG START + JMP STARTUP ; Jump to start up Tube code + + +; STARTUP +; ======= +; Tube data: via R1: string &00 -- via R2: &7F or &80 +; +BANNER: + EQUB 13 + EQUS "PDP11 TUBE 64K " + EQUB ((VERSION >> 8) AND 15)+48 + EQUS "." + EQUB ((VERSION >> 4) AND 15)+48 + EQUB (VERSION AND 15)+48 +#ifdef TESTBUILD + EQUB 96+TESTBUILD +#endif + EQUB 13 + EQUB 13 + EQUB 0 + ALIGN +STARTUP: + MOV #CLISTK,SP ; Use internal stack + JSR PC,INIT_ENV ; Set up default handlers, preserving PROG + MOV @#PROG,@#ADDR ; Set current program as default entry address + MOV #BANNER,R1 ; Point to startup banner + JSR PC,SEND_TXT ; Print it via Tube WRCH protocol + ;CLR R0 ; SEND_TXT returns R0=0 + JSR PC,_WRCH ; Send terminating zero byte + CLC ; Clear Carry Flag to indicate Reset + JSR PC,CLI_WAIT ; Wait for and check result byte + ; Fall through to CLICOM if nothing executed + +; Supervisor Command line prompt +; ============================== +; Allow user to enter *commands. +; We deliberately call _WORD and _CLI so if EMTs vectors are trashed we can still access MOS and so +; that errors go via ERRV instead of us having to check returned V flag. +; We will normally be running in Kernal mode so we can see the system vectors and high memory. +; +CLICOM: +EXITHAND: + MOV @#MEMTOP,SP ; Put stack at top of user memory + MOV #3,R0 + JSR PC,INIT_IRQ ; Initialise IRQ/NMI and environment handlers +CLILOOP: + MOV #PROMPT,R1 + JSR PC,SEND_TXT ; Display prompt + ;CLR R0 ; SEND_TXT returns R0=0 + ;MOV #COM_BLK,R1 ; Point to control block, SENT_TXT returns R1=COM_BLK + JSR PC,_WORD ; Read a line of text + BCS COM_ESC ; Escape pressed + MOV @#COM_BLK,R0 ; Get address of input buffer DMB + JSR PC,_CLI ; Execute command + BR CLILOOP ; Loop back for another line +PROMPT: + EQUS "PDP11>*" ; Command prompt + EQUB 0 + ALIGN +; +COM_BLK: + EQUW CLIBUF ; Input buffer + EQUB CLIEND-CLIBUF ; Buffer length + EQUB 32 ; Lowest acceptable char + EQUB 255 ; Highest acceptable char + ALIGN +; +COM_ESC: + MOV #126,R0 + JSR PC,_BYTE ; Acknowledge Escape +; JSR PC,MKERR + EMT 15 + EQUB 17,"Escape",0 + ALIGN + +; Default error handler +; --------------------- +; On entry, R0=>error block +ERRHAND: + MOV @#MEMTOP,SP ; Reset stack to top of user memory + MOV R0,R1 ; Point R1=>error block + INC R1 ; Step past error number + JSR PC,_NEWL ; Print a newline + JSR PC,SEND_TXT ; Print error message + JSR PC,_NEWL ; Print another newline + BR CLICOM + +; Default escape handler +; ---------------------- +ESCHAND: + ADD R0,R0 ; Move b6 into b7 + MOVB R0,@ESCADDR ; Store Escape flag + RTS PC + + +; Fetch word from unaligned R1 to R1 +; ================================== +; Unaligned version of MOV (R1),R1, corrupts R0 +; FETCHWORD2 - R1=>word+2 +; FETCHWORD - R1=>word +; +FETCHWORD2: + SUB #2,R1 ; Step back to point to word +FETCHWORD: + MOVB (R1)+,R0 ; Fetch low byte + BIC #&FF00,R0 ; Ensure 8-bit value + MOVB (R1),R1 ; Fetch high byte + BIC #&FF00,R1 ; Ensure 8-bit word + SWAB R1 ; Swap high byte to top of register + BIS R0,R1 ; Merge together + RTS PC + + +; Print zero-terminated text string at R1 +; ======================================= +SEND_TXTLP: + JSR PC,_ASCII ; Send to WRCH via Tube R1 +SEND_TXT: + MOVB (R1)+,R0 ; Get byte from R1, increment R1 + BNE SEND_TXTLP ; Loop until &00 byte + RTS PC + + +; ************* +; MOS INTERFACE +; ************* + +; OSCLI - Send command line to host +; ================================= +; On entry: R0=>command string +; On exit: R0=return value +; +; Tube data: &02 string &0D -- &7F or &80 +; +_CLI: + MOV R1,-(SP) ; Save registers + MOV R2,-(SP) + MOV R3,-(SP) + MOV R4,-(SP) + MOV R5,-(SP) + +; As a *command may result in data transfer, that data may end up overwriting stack in user memory, +; so use a temporary stack to do OSCLI. If OSCLI ends up jumping to a new process, a new stack will +; be set up by that new process. If we are already using the internal stack we continue using it +; so that transient OSCLIs can call more OSCLIs. + + MOV SP,R5 ; Copy stack pointer so we can stack it + CMP R5,#WORKSP ; Check where the stack is + BCC CLI_SYSSTK ; We're already using internal stack + MOV #CLISTK,SP ; Use internal stack +CLI_SYSSTK: + MOV R5,-(SP) ; Save caller's stack pointer + MOV @#PROG,-(SP) ; Save current program as top item on stack + JSR PC,CLI_GO ; Do the OSCLI call + MOV (SP)+,@#PROG ; Restore current program + MOV (SP),SP ; Restore caller's stack pointer + MOV (SP)+,R5 ; Restore registers + MOV (SP)+,R4 + MOV (SP)+,R3 + MOV (SP)+,R2 + MOV (SP)+,R1 + CLR R0 ; Return R0=0 from OSCLI +CLI_DONE: + RTS PC + +CLI_GO: + MOV R0,R1 ; R1=pointer to command string + MOV #2,R0 + JSR PC,SEND_CMD ; Send command &02 - OSCLI + JSR PC,SEND_STR ; Send command string at R1 +CLI_WAIT1: + SEC ; Set Carry to indicate OSCLI +CLI_WAIT: + JSR PC,WAIT_BYTE ; Wait for result via Tube R2 (preserves Cy) + ; WAIT_BYTE returns flags set from R0 + BPL CLI_DONE ; No code to be executed + ; Fall through into EXECUTE + + +; EXECUTE - Enter code at ADDR +; ============================ +; Checks for possible code header, makes code current PROGRAM. +; On entry, ADDRESS=code entry address +; CC=entering from RESET +; CS=entering from OSCLI/OSBYTE +; +; Caller should preserve registers before calling here. +; +EXECUTE: + MOV #0,R0 ; R0=0 - prepare for raw code + ROL R0 ; Save RESET/OSCLI flag in Carry in R0 + MOV @#ADDR,R1 ; Get transfer address + MOV R1,-(SP) ; Save entry address + MOVB 7(R1),R2 ; Get copyright offset + BIC #&FF00,R2 ; Ensure 8-bit value + ADD R2,R1 ; R1=>copyright string + TSTB (R1)+ ; Check for copyright string + BNE EXEC_NOTROM + CMPB (R1)+,#ASC"(" + BNE EXEC_NOTROM + CMPB (R1)+,#ASC"C" + BNE EXEC_NOTROM + CMPB (R1)+,#ASC")" + BNE EXEC_NOTROM + MOV (SP),R1 ; Get entry address back + MOVB 6(R1),R2 ; Get ROM type + BIT #&40,R2 ; DMB: BIT, not TST + BEQ EXEC_NOTLANG + BIC #&FFF0,R2 ; Mask out non-CPU bits + CMP R2,#&07 + BNE EXEC_NOTPDP + MOVB 6(R1),R2 ; Get ROM type again + BIT #&20,R2 ; Does Tube transfer address exist? DMB: BIT, not TST + BEQ EXEC_ROM ; No, use stacked entry address + MOVB 7(R1),R2 ; Get copyright offset + BIC #&FF00,R2 ; Ensure 8-bit value + ADD R2,R1 ; Point to copyright message + INC R1 ; Step past first zero byte +EXEC_SKIP: + TSTB (R1)+ ; Find terminating zero byte + BNE EXEC_SKIP + ADD #4,R1 ; Step past transfer address + JSR PC,FETCHWORD ; R1=offset from start address + ADD (SP)+,R1 ; Add start entry to offset, R1 is now entry address + MOV R1,-(SP) ; Push it back +EXEC_ROM: + BIS #2,R0 ; R0.1=1 to indicate code with header (will become R1=1) + ; See if a Unix header also exists +; +EXEC_NOTROM: + MOV (SP)+,R1 ; Get entry address back + BIC #1,R1 ; Ensure word aligned + MOV (R1),R2 ; Get magic number + CMP R2,#&105 ; &o0405 - overlay + BCS EXEC_CODE ; &o0407 - normal + CMP R2,#&109 ; &o0410 - read-only text + BCC EXEC_CODE ; &o0411 - seperated I&D + TST (R1)+ ; Step to next entry + MOV (R1)+,R3 ; Size of text + MOV (R1)+,R4 ; Size of initialised data + ADD R4,R3 ; Size of program + MOV (R1)+,R4 ; Size of uninitialised data + MOV @#MEMBOT,R2 ; Destination address + ADD #8,R1 ; Set past other fields to start of code + +; R1=source +; R2=dest +; R3=size of code+data +; R4=size to be zeroed + + ASR R3 ; Divide by two to get size in words +EXEC_COPY: + MOV (R1)+,(R2)+ ; Copy program to MEMBOT + DEC R3 ; Decrement number of words to copy + BNE EXEC_COPY + ASR R4 ; Divide by two to get size in words + BEQ EXEC_ENTER ; No uninitialised data to clear +EXEC_ZERO: + CLR (R2)+ ; Zero uninitialised data + DEC R4 ; Decrement number of words to clear + BNE EXEC_ZERO +EXEC_ENTER: + BIC #&FFFE,R0 ; Prepare R0=0 for code without a ROM header + MOV @#MEMBOT,R1 ; Entry address + ; Build an empty stack frame + CLR -(SP) ; argv[1]=0 + CLR -(SP) ; argv[0]=0 + CLR -(SP) ; argn=0 + +EXEC_CODE: + MOV #&0BBC,R5 ; R5=&0BBC to indicate BBC EMTs available + ASR R0 ; R0=0/1 for raw/header, Cy=RESET/OSCLI + MOV R1,@#PROG ; Set as current program + MOV R1,-(SP) ; Stack destination address + MOV #BANNER,R1 ; R1=> for no command line + RTS PC ; Jump to code via RTS + +EXEC_NOTLANG: +; ASR R0 +; BCC EXEC_CLICOM ; Entered from RESET, drop into CLICOM +;; JSR PC,MKERR +; EMT 15 +; EQUB 249,"This is not a language",0 +; ALIGN +; +EXEC_NOTPDP: + ASR R0 + BCC EXEC_CLICOM ; Entered from RESET, drop into CLICOM + MOV #3,R0 + JSR PC,INIT_HANDLES ; Connect to default error handler +; JSR PC,MKERR + EMT 15 + EQUB 249,"Not PDP11 code",0 + ALIGN + +EXEC_CLICOM: + JMP CLICOM ; Drop into Supervisor command prompt + + +; OSBYTE +; ====== +; On entry: R0,R1,R2=OSBYTE parameters +; On exit: R0 preserved +; If R0<&80, R1=returned value +; If R0>&7F, R1, R2, Carry=returned values +; +; Tube data: &04 X A -- X +; &06 X Y A -- Cy Y X +; +BYTE_WAIT: + BR CLI_WAIT1 ; Jump to wait for ack. from OSCLI/OSBYTE +_BYTE: + MOV R0,-(SP) ; Save R0 + TSTB R0 + BMI BYTE_HI ; Jump with high OSBYTEs + MOV #4,R0 + JSR PC,SEND_CMD_R1 ; Send command and second parameter + MOV (SP),R0 ; Get first parameter from top of stack + JSR PC,SEND_BYTE ; Send first parameter + JSR PC,WAIT_BYTE ; Wait for response + MOV R0,R1 ; Pass to R1 + BR BYTE_DONE +; MOV (SP)+,R0 ; Restore R0 +; RTS PC + +; OSBYTE >&7F +; ----------- +BYTE_HI: +; CMP R0,#&82 +; BEQ MEM82 ; Fetch address high word +; CMP R0,#&83 +; BEQ MEM83 ; Fetch low memory limit +; CMP R0,#&84 +; BEQ MEM84 ; Fetch high memory limit +; + CMP R0,#&82 + BCS BYTE_HI1 ; Not a memory OSBYTE + BEQ MEM82 ; Fetch address high word + CMP R0,#&85 + BCS MEM83 ; Fetch low/high memory limit +BYTE_HI1: + MOV #6,R0 + JSR PC,SEND_CMD_R1 ; Send command and second parameter + MOV R2,R0 + JSR PC,SEND_BYTE ; Send third parameter + MOV (SP)+,R0 ; Get first parameter from stack + JSR PC,SEND_BYTE ; Send first parameter + CMP R0,#&9D ; Was it Fast BPut? + BEQ BYTE_DONE1 ; Don't wait for response + CMP R0,#&8E ; Was it language startup? + BEQ BYTE_WAIT ; Wait for program startup + MOV R0,-(SP) ; Save R0 again + JSR PC,WAIT_BYTE ; Wait for response + ADD #&FF80,R0 ; Copy b7 into Carry + JSR PC,WAIT_BYTE ; Wait for response + BIC #&FF00,R0 ; Ensure 8-bit value + MOV R0,R2 ; Pass to R2 + SWAB R0 + MOV R0,R1 ; Pass to R1 as b8-b15 of result + JSR PC,WAIT_BYTE ; Wait for response + BIC #&FF00,R0 ; Ensure 8-bit value + BIS R0,R1 ; Merge with b8-b15 set from R2 + BR BYTE_DONE +;BYTE_DONE: +; MOV (SP)+,R0 ; Restore R0 +; RTS PC + +; Read memory locations +; --------------------- +MEM82: + MOV #&86,R0 ; Point to ADDR+2 +MEM83: +MEM84: + ASL R0 ; A=&0106,&0108,&010C + MOV MEMBOT-&106(R0),R1 ; Fetch address value + MOV R1,R2 ; R2=R1 DIV 256 + SWAB R2 + BIC #&FF00,R2 +BYTE_DONE: + MOV (SP)+,R0 ; Restore R0 +BYTE_DONE1: + RTS PC + + +; OSWORD +; ====== +; On entry: R0=OSWORD number +; R1=>control block +; +_WORD: + TST R0 + BEQ RDLINE ; OSWORD 0, jump to read line +; +; OSWORD <>&00 +; ------------ +; Tube data: &08 function in_length block out_length -- block +; + MOV R3,-(SP) ; Save R3 + MOV R2,-(SP) ; Save R2 + MOV R0,-(SP) ; Save R0 + MOV #8,R0 + JSR PC,SEND_CMD ; Send command &08 - OSWORD + MOV (SP),R0 ; Get R0 back + JSR PC,SEND_BYTE ; Send OSWORD number + TSTB R0 ; Check OSWORD number + BPL WORDLO ; <&80, calculate control block sizes + MOVB (R1)+,R2 ; Get transmit size from control block DMB: should be R1 + MOVB (R1),R3 ; Get receive size from control block DMB: should be R1 + BR WORDGO ; Jump to send OSWORD command +WORDLO: + MOV #&10,R2 ; OSWORD &15-&7F uses 16 bytes both ways + MOV #&10,R3 + CMP R0,#&15 ; OSWORD &01-&7F use fixed control block sizes + BCC WORDGO ; OSWORD &15-&7F, jump to send OSWORD command + ADD R0,R0 ; Double R0 to index into table + ADD #WORD_TABLE-2,R0 ; Point to table entry DMB: #WORD_TABLE + MOVB (R0)+,R2 ; Fetch send length + MOVB (R0),R3 ; Fetch receive length +WORDGO: + MOV R2,R0 ; Get transmit block length + JSR PC,SEND_BYTE ; Send transmit block length + ADD R2,R1 ; Point to past end of control block + DEC R2 ; Convert 0 to -1 + CMP R2,#&80 ; Check length of transmit block + BCC WORD_NOTX ; Transmit block=0 or >&80, send nothing +WORD_TX: + MOVB -(R1),R0 ; Get byte from control block + JSR PC,SEND_BYTE ; Send byte to Tube R2 + DEC R2 + BPL WORD_TX ; Loop to send control block +WORD_NOTX: + MOV R3,R0 ; Get recive block length + JSR PC,SEND_BYTE ; Send receive block length + ADD R3,R1 ; Point past end of control block + DEC R3 ; Convert 0 to -1 + CMP R3,#&80 ; Check length of received block + BCC WORD_NORX ; Receive block=0 or >&80, receive nothing +WORD_RX: + JSR PC,WAIT_BYTE ; Get byte from Tube R2 + MOVB R0,-(R1) ; Store byte in control block + DEC R3 + BPL WORD_RX ; Loop to receive control block +WORD_NORX: + MOV (SP)+,R0 ; Restore registers + MOV (SP)+,R2 + MOV (SP)+,R3 + RTS PC +; +; Table of OSWORD control block lengths for &01-&14 +; ------------------------------------------------- +; low byte=send length, high byte=recive length +WORD_TABLE: + EQUW &0500 ; &01 =TIME + EQUW &0005 ; &02 TIME= + EQUW &0500 ; &03 =TIMER + EQUW &0005 ; &04 TIMER= + EQUW &0504 ; &05 =MEM + EQUW &0005 ; &06 MEM= + EQUW &0008 ; &07 SOUND + EQUW &000E ; &08 ENVELOPE + EQUW &0504 ; &09 =POINT + EQUW &0901 ; &0A Read bitmap + EQUW &0501 ; &0B Read palette + EQUW &0005 ; &0C Write palette + EQUW &0800 ; &0D Read graphics coords + EQUW &1910 ; &0E =TIME$ + EQUW &0020 ; &0F TIME$= + EQUW &0110 ; &10 Net_Tx + EQUW &0D0D ; &11 Net_Rx + EQUW &8000 ; &12 Net_Params + EQUW &0808 ; &13 Net_Info + EQUW &8080 ; &14 NetFS_Op + + +; Read a line of text +; ------------------- +; Tube data: &0A block -- &FF or &7F string &0D +; +RDLINE: + MOV #10,R0 + JSR PC,SEND_CMD ; Send command &0A - RDLINE + ADD #2,R1 + MOV #3,R2 + JSR PC,SEND_BLK ; Send 3-byte control block + MOV #7,R0 + JSR PC,SEND_BYTE ; Send &0700 + CLR R0 + JSR PC,SEND_BYTE + JSR PC,WAIT_BYTE ; Wait for response + ADD #&FF80,R0 ; Copy b7 into Carry + BCS RD_DONE + JSR PC,FETCHWORD2 ; Get address to store text, allowing for nonalignment + CLR R2 ; Clear count of received bytes +RD_STR: + JSR PC,WAIT_BYTE ; Wait for byte from Tube R2 + MOVB R0,(R1)+ ; Store it + INC R2 ; Increment number of bytes + CMP R0,#13 ; Check current byte + BNE RD_STR ; Loop until and Clear Carry + DEC R2 ; R2 is length of string +RD_DONE: + RTS PC + + +; OSARGS - Read info on open file or filing system +; ================================================ +; On entry: R0=function +; R1=handle +; R2=>control block +; On exit: R0=returned value +; R1 preserved +; R2 preserved +; +; Tube Data: &0C handle block function -- result block +; +_ARGS: + MOV R2,-(SP) ; Save control block pointer + MOV R1,-(SP) ; Save handle + MOV R0,-(SP) ; Save function + MOV #&0C,R0 + JSR PC,SEND_CMD_R1 ; Send command and handle + MOV R2,R1 + MOV #4,R2 + JSR PC,SEND_BLK ; Send four-byte control block + MOV (SP)+,R0 + JSR PC,SEND_BYTE ; Send function + JSR PC,WAIT_BYTE ; Wait for returned result + MOV R0,-(SP) ; Save result + MOV #4,R2 ; Prepare to wait for 4-byte control block +; JSR PC,WAIT_BLK ; Wait for four-byte control block +; MOV (SP)+,R0 ; Get result back +; MOV (SP)+,R1 ; Get handle back +; MOV (SP)+,R2 ; Get control block pointer back +; RTS PC + BR FILE_DONE ; Wait for control block, restore and return + + +; OSFIND - Open or Close a file +; ============================= +; On entry: R0=function +; R1=handle or =>filename +; On exit: R0=zero or handle +; +; Tube data: &12 function string &0D -- handle +; &12 &00 handle -- &7F +; +_FIND: + MOV R0,-(SP) ; Save R0 + MOV #&12,R0 + JSR PC,SEND_CMD ; Send command &12 - OSFIND + MOV (SP)+,R0 ; Get R0 back + JSR PC,SEND_BYTE ; Send function + TST R0 ; Check function + BNE OPEN ; Jump to deal with OPEN +; CLOSE + JSR PC,SEND_BYTE_R1 ; Send handle to Tube + JSR PC,WAIT_BYTE ; Wait for acknowledgement + CLR R0 ; Zero R0 + RTS PC +OPEN: + MOV R1,-(SP) ; Save R1 + JSR PC,SEND_STR ; Send string at R1 + JSR PC,WAIT_BYTE ; Wait for returned handle + MOV (SP)+,R1 ; Restore R1 + RTS PC + + +; OSFILE - Operate on whole files +; =============================== +; On entry: R0=function +; R1=>control block +; On exit: R0=result +; R1 preserved +; control block updated +; +; Tube data: &14 block string function -- result block +; +_FILE: + MOV R2,-(SP) ; Save R2 + MOV R1,-(SP) ; Save R1 + MOV R0,-(SP) ; Save function + MOV #&14,R0 + JSR PC,SEND_CMD ; Send command &14 - OSFILE + ADD #2,R1 ; Point to control block contents + MOV #16,R2 + JSR PC,SEND_BLK ; Send 16-byte control block + JSR PC,FETCHWORD2 ; Get address of filename, allowing for nonalignment + JSR PC,SEND_STR ; Send filename string + MOV (SP)+,R0 + JSR PC,SEND_BYTE ; Send function + JSR PC,WAIT_BYTE ; Wait for returned result + MOV (SP),R1 ; Get control block pointer back + MOV R0,-(SP) ; Save result + ADD #2,R1 ; Point to control block contents + MOV #16,R2 ; Prepate to wait for 16-byte control block +FILE_DONE: + JSR PC,WAIT_BLK ; Wait for control block + MOV (SP)+,R0 ; Get result back + MOV (SP)+,R1 ; Get control block pointer back + MOV (SP)+,R2 ; Get R2 back + RTS PC + + +; OS_GBPB - Multiple byte read and write +; ===================================== +; On entry: R0=function +; R1=>control block +; On exit: R0=returned value +; control block updated +; +; Tube data: &16 block function -- block Carry result +; +_GBPB: +#ifndef NOCHNZERO + TSTB (R1) ; Check handle + BNE GBPB1 ; Non-zero handle + TST R0 ; Check function + BEQ GBPB1 ; Pass OSGBPB 0 to Tube + CMP R0,#5 + BCS GBPB_RDWR ; Channel 0 via OSRDCH/OSWRCH +#endif +GBPB1: + MOV R2,-(SP) ; Save R2 + MOV R0,-(SP) ; Save function + MOV #&16,R0 + JSR PC,SEND_CMD ; Send command &16 - OSGBPB + MOV #13,R2 + JSR PC,SEND_BLK ; Send 13-byte control block + MOV (SP)+,R0 + JSR PC,SEND_BYTE ; Send function + MOV #13,R2 + JSR PC,WAIT_BLK ; Wait for 13-byte control block + MOV (SP)+,R2 ; Get R2 back + BR WAIT_CHAR ; Get Carry and result byte +; +; Read or write block of memory to/from OSWRCH/OSRDCH +; --------------------------------------------------- +; NB, only uses 16-bit address and count, b16-b31 ignored and not updated +; +#ifndef NOCHNZERO +GBPB_RDWR: + MOV R2,-(SP) ; Save R2 + MOV R0,-(SP) ; Save function + MOV R1,-(SP) ; Save pointer to control block + INC R1 ; Point to Address + JSR PC,FETCHWORD ; R1=Address, allowing for nonalignment + MOV R1,R2 ; R2=Address + MOV (SP)+,R1 ; Restore pointer to control block + +GBPB_LP: + CMP (SP),#3 + BCC GBPB_RD ; Function 3/4, read characters + ; Function 1/2, write characters + MOVB (R2)+,R0 ; Get character from memory + JSR PC,_WRCH ; Write it + BR GBPB_NEXT ; Jump to update and loop +GBPB_RD: + JSR PC,_RDCH ; Read character + BCS GBPB_EXIT ; Carry set, exit + MOVB R0,(R2)+ ; Store character +GBPB_NEXT: + TSTB 5(R1) ; Test byte low byte + BNE GBPB_LO ; Count<>&xx00 + DECB 6(R1) ; Decrement count high byte +GBPB_LO: + DECB 5(R1) ; Decrement count low byte + BNE GBPB_LP ; Loop until all done + TSTB 6(R1) ; Test count high byte + BNE GBPB_LP ; Loop until all done + CLC ; Clear carry for OK +GBPB_EXIT: + MOVB R2,1(R1) + SWAB R2 + MOVB R2,2(R1) ; Update address + TST (SP)+ ; Drop function + MOV (SP)+,R2 ; Restore R2 + MOV #0,R0 ; R0=0, function supported, don't affect Carry + RTS PC +#endif + + +; OSBGET - Get a byte from open file +; ================================== +; On entry: R1=handle +; On exit: R0=byte Read +; R1=preserved +; Cy set if EOF +; +; Tube data: &0E handle -- Carry byte +; +_BGET: +#ifndef NOCHNZERO + TST R1 ; Check handle + BEQ _RDCH ; BGET#0 calls OSRDCH +#endif + MOV #&0E,R0 + JSR PC,SEND_CMD_R1 ; Send command and handle + BR WAIT_CHAR ; Wait for Carry, Byte + + +; OSRDCH - Wait for character from input stream +; ============================================= +; On exit: R0=char, Cy=carry +; +; Tube data: &00 -- Carry Char +; +_RDCH: + CLR R0 + JSR PC,SEND_CMD ; Send command &00 - OSRDCH +WAIT_CHAR: + JSR PC,WAIT_BYTE ; Get returned byte + ADD #&FF80,R0 ; Copy b7 into carry + ; Continue to fetch byte from Tube R2 + + +; Wait for byte in Tube Register 1 to return in R0, preserving Carry +; ================================================================== +WAIT_BYTE: + MOVB @#TUBE2S,R0 ; Read Tube R2 status + BPL WAIT_BYTE ; Loop until b7 set + MOVB @#TUBE2,R0 ; Get byte from Tube R2 + RTS PC + + +; OSBPUT - Put a byte to an open file +; =================================== +; On entry: R0=byte to write +; R1=handle +; On exit: R0=preserved +; R1=preserved +; +; Tube data: &10 handle byte -- &7F +; +_BPUT: +#ifndef NOCHNZERO + TST R1 ; Check handle + BEQ _WRCH ; BPUT#0 calls OSWRCH +#endif + MOV R0,-(SP) ; Save R0 + MOV #&10,R0 + JSR PC,SEND_CMD_R1 ; Send command and handle + MOV (SP),R0 ; Get R0 back + JSR PC,SEND_BYTE ; Send byte to Tube + JSR PC,WAIT_BYTE ; Wait for acknowledgement + MOV (SP)+,R0 ; Restore R0 + RTS PC + + +; OSASCI - Send ASCII character +; ============================= +_ASCII: + CMP #13,R0 ; If not , send raw character + BNE _WRCH ; If , fall through to send NEWL + + +; OSNEWL - Send LF/CR sequence +; ============================ +_NEWL: + MOV #10,R0 + JSR PC,_WRCH ; Output LF + MOV #13,R0 ; Fall through into WRCH + + +; OSWRCH - Send character in R0 to Tube Register 1 +; ================================================ +_WRCH: + MOV R0,-(SP) ; Save R0 +SEND_R1LP: + MOVB @#TUBE1S,R0 ; Read Tube R1 status + BIC #&BF,R0 ; Check b6 of status + BEQ SEND_R1LP ; Loop until b6 set + MOV (SP)+,R0 ; Get R0 back + MOVB R0,@#TUBE1 ; Send byte to Tube R1 + RTS PC + + +; TRAP handler +; ============ +; TRAP is used for Unix calls and is followed by a variable number of inline parameters, +; so it is impossible to simply do a null return. So, the safest option is to give the +; standard CoPro client 'unsupported' error. +TRAP_HANDLER: + EMT 15 + EQUB 255 + EQUS "Bad" + EQUB 0 + ALIGN + + +; EMT handler +; =========== +; On extry, R0-R5 contain any parameters +; PSW ignored +; On exit, R0-R5 contain any returned values +; C returns any returned value +; V set if error, R0=>error block +; +EMT_HANDLER: + BIC #&FFF0,2(SP) ; Clear stacked flags + MOV @#ERRV,-(SP) ; Save old ERR handler + MOV @#EMTV,-(SP) ; Save old EMT SP + MOV SP,@#EMTV ; Save current EMT SP + MOV #EMT_ERROR,@#ERRV ; Catch EMT errors + TST -(SP) ; Make space on stack + MOV R0,-(SP) ; Save R0 + MOV 8(SP),R0 ; Get return address +; MOV -2(R0),R0 ; Get EMT instruction + MOV -(R0),R0 ; Get EMT instruction v0.20a + BIC #&FF00,R0 ; Get EMT number + ;CMP R0,#EMTMAX + ;BCC EMT_IGNORE ; Out of range + ADD R0,R0 ; Index into dispatch table + ADD @#EMTADDR,R0 ; Index into dispatch table + MOV (R0),2(SP) ; Copy address to stack + MOV (SP)+,R0 ; Restore R0 + JSR PC,@(SP)+ ; Jump to routine +; BVS EMT_ERROR ; V set, set stacked V flag + BVC EMT_NOERROR ; V clear, jump to check Carry +EMT_ERROR: + MOV @#EMTV,SP ; Get saved EMT SP + BIS #2,6(SP) ; Set stacked V flag +EMT_NOERROR: + BCC EMT_EXIT ; C clear, jump to exit + BIS #1,6(SP) ; Set stacked C flag +EMT_EXIT: + MOV (SP)+,@#EMTV ; Restore old EMT SP + MOV (SP)+,@#ERRV ; Restore old error handler + RTI ; Return from EMT +;EMT_IGNORE: + ;MOV (SP)+,R0 ; Restore R0 + ;TST (SP)+ ; Balance stack + ;BR EMT_EXIT + + +; EMT 15 - Generate an error +; -------------------------- +EMT15: +; TST (SP)+ ; Drop return to EMT handler +; MOV (SP)+,@#EMTV ; Restore old EMT SP +; MOV (SP)+,@#ERRV ; Restore mainline error handler +; MOV (SP),R0 ; Get return address pointing to inline error block +; MOV @#ERRV,(SP) ; Replace with address of error handler +; RTI ; Jump to handler, restoring PSW +; v0.20a optimisation + MOV 6(SP),R0 ; Get return address pointing to inline error block + MOV 4(SP),6(SP) ; Replace return address with mainline error handler + RTS PC ; Return to EMT handler, thence to error handler + + +; EMT 14 - Read/Write handlers, etc. +; ---------------------------------- +; On entry: R0=0..255 to claim EMTs 0..255 +; R1=new routine address or 0 to read +; R0=&FFxx to set environment handlers +; R1=new handler address or 0 to read +; R2=new handler data address or 0 to read +; On exit: R0=preserved +; R1=old address +; R2=old handler address or preserved +; +EMT14: +; So that EMT14 can change the ERRV we have to rewind out of the EMT handler and restore ERRV so that +; it can be changed. Otherwise, the EMT handler will just restore ERRV to whatever it was before. + TST (SP)+ ; Drop return to EMT handler + MOV (SP)+,@#EMTV ; Restore old EMT SP + MOV (SP)+,@#ERRV ; Restore mainline error handler + MOV R0,-(SP) ; Save R0 + BMI EMT14_HANDLER ; Negative, set up handler + CMP R0,#EMTMAX + BCC EMT14_QUIT ; Out of range + ADD R0,R0 ; Double R0 to offset into table + ADD @#EMTADDR,R0 ; Index into EMT dispatch table + MOV (R0),-(SP) ; Get old address + TST R1 + BEQ EMT14_READ ; Zero, just read + MOV R1,(R0) ; Store new address if non-zero + BR EMT14_READ + +EMT14_HANDLER: + COM R0 + CMP R0,#HANDLEMAX + BCC EMT14_QUIT ; Out of range + ADD R0,R0 + ADD R0,R0 ; Times four to offset into table + ADD #HANDLERS,R0 ; Index into handlers + MOV (R0),-(SP) ; Save old handler address + TST R1 + BEQ EMT14_HAND2 ; Just read old handler address + MOV R1,(R0) ; Store new handler address +EMT14_HAND2: + TST (R0)+ ; DMB: Step to data address + MOV (R0),-(SP) ; Save old data address + TST R2 + BEQ EMT14_HAND3 ; Just read old data address + MOV R2,(R0) ; Store new data address +EMT14_HAND3: + MOV (SP)+,R2 ; Get old data +EMT14_READ: + MOV (SP)+,R1 ; Get old address +EMT14_QUIT: + MOV (SP)+,R0 ; Restore R0 +; RTS PC + RTI + +; EMT 13 - Misc control functions +; ------------------------------- +; On entry: R0=0 - Load BBC BASIC +; 1 - Set up default environment: IRQ/NMI, EMTs, handlers +; 2 - Set up default EMTs and handlers +; 3 - Set up default handlers only +EMT13: + TST R0 + BEQ EMTXX ; R0=0 - unsupported + CMP R0,#1 + BEQ INIT_ENV ; R0=1 - Set up hardware and software handlers and EMTs +; CMP R0,#2 +; BEQ INIT_HANDLES ; Set up software handlers and EMTs +; CMP R0,#3 +; BEQ INIT_HANDLES ; Set up software handlers + CMP R0,#4 + BCS INIT_HANDLES ; R0=2, R0=3 - Set up software handlers + ; Fall through with others, returning R0 preserved + +EMTXX: ; EMTs 16-255 +EVENT: ; Null event handler + RTS PC + +; EMT 0 - Exit current program +; ---------------------------- +EMT0: +; JMP @#EXITV ; Jump via exit handler + JMP @EXITV ; DMB Jump via exit handler + + +; Set up default system environment +; ================================= +INIT_ENV: + CLR R0 +INIT_LP1: + MOV #NULLIRQ,(R0)+ ; Set all hardware vectors to NULLIRQ + CLR (R0)+ ; Allow all interupts + CMP R0,#&100 ; Hardware vectors at at &0000-&00FF + BNE INIT_LP1 +; +; MOV #CLICOM,@#STACKVEC ; Could also catch Bad Stack vector +; ; There's no easy way to recover from a Bad Stack, so would have +; ; bomb out to somewhere safe. + MOV #TRAP_HANDLER,@#TRAPVEC ; Set up TRAP vector to give an error + MOV #EMT_HANDLER,@#EMTVEC ; Set up EMT vector +; CLR @#EMTVEC+2 ; EMT processor status - allow all interupts +INIT_IRQ: + MOV #NMI_ACK,@#NMIVEC+0 ; Set up NMI vector + MOV #&00E0,@#NMIVEC+2 ; NMI processor status - bar all interupts + MOV #IRQ,@#IRQVEC+0 ; Set up IRQ vector + MOV #&00C0,@#IRQVEC+2 ; IRQ processor status - bar all except NMIs +; +INIT_HANDLES: + ; Should check R0, if R0=3 set handlers only + MOV #HANDLERS,R2 ; R2=> Start of handlers DMB + MOV #HANDDEFAULT,R1 ; R1=> Default handlers and EMTs + MOV #HANDLEMAX*2+WORKSPMAX/2+16,R0 ; R0=word count of handlers (2 per handle) + workspace (counted in bytes) + core EMTs DMB + MOV @#PROG,-(SP) ; Save PROG +INIT_LP2: + MOV (R1)+,(R2)+ ; Set up initial settings + DEC R0 ; and EMT dispatch table + BNE INIT_LP2 + MOV (SP)+,@#PROG ; Restore PROG +; + MOV #EMTMAX-16,R0 ; Number of unused EMTs +INIT_CLR: + MOV (R1),(R2)+ ; EMTs 16-255 do nothing + DEC R0 + BNE INIT_CLR +INIT_DONE: + RTS PC ; Return with R0=0, R1,R2 corrupted + +; Default settings and EMT table +; ============================== +HANDDEFAULT: + EQUW EXITHAND ; &D8 - Default exit handler + EQUW 0 ; &DA - Default exit address + EQUW ESCHAND ; &DC - Default escape handler + EQUW ESCFLG ; &DE - Default escape flag + EQUW ERRHAND ; &E0 - Default error handler + EQUW ERRBLK ; &E2 - Default error buffer + EQUW EVENT ; &E4 - Default event handler + EQUW 0 ; &E6 - Unused + EQUW USERIRQ ; &E8 - Default unknown IRQ handler + EQUW 0 ; &EA - Unused + EQUW 0 ; &EC - Holds old SP within EMT handler + EQUW EMTTABLE ; &EE - Default EMT dispatch table + + EQUW 0 ; &F0 - unused + EQUW BANNER ; &F2 - Line pointer + EQUW RAMSTART ; &F4 - Lowest user memory + EQUW RAMEND ; &F6 - Highest user memory + EQUD 0 ; &F8 - Transfer address + EQUW STARTUP ; &FC - Default current program + EQUB 0 ; &FE - Spare byte + EQUB 0 ; &FF - Escape flag +EMTDEFAULT: + EQUW EMT0 ; EMT 0 - QUIT + EQUW _CLI ; EMT 1 - OSCLI + EQUW _BYTE ; EMT 2 - OSBYTE + EQUW _WORD ; EMT 3 - OSWORD + EQUW _WRCH ; EMT 4 - OSWRCH + EQUW _NEWL ; EMT 5 - OSNEWL + EQUW _RDCH ; EMT 6 - OSRDCH + EQUW _FILE ; EMT 7 - OSFILE + EQUW _ARGS ; EMT 8 - OSARGS + EQUW _BGET ; EMT 9 - OSBGET + EQUW _BPUT ; EMT 10 - OSBPUT + EQUW _GBPB ; EMT 11 - OSGBPB + EQUW _FIND ; EMT 12 - OSFIND + EQUW EMT13 ; EMT 13 - System control + EQUW EMT14 ; EMT 14 - Set handlers + EQUW EMT15 ; EMT 15 - ERROR + EQUW EMTXX ; EMTs 16-255 - unused + + +; ***************** +; TUBE I/O ROUTINES +; ***************** + +; Send -string at R1 to Tube Register 2 +; ========================================= +SEND_STR: + MOVB (R1)+,R0 ; Get byte from R1, increment R1 + JSR PC,SEND_BYTE ; Send byte via Tube R2 + CMP R0,#13 ; Test current character + BNE SEND_STR ; Loop until sent + RTS PC + + +; Send block at R1 to Tube Register 2 +; =================================== +SEND_BLK: + ADD R2,R1 ; Add length of control block to R1 +SEND_BLKLP: + MOVB -(R1),R0 ; Decrement R1, Get byte from R1 + JSR PC,SEND_BYTE ; Send byte via Tube R2 + DEC R2 ; Decrement count + BNE SEND_BLKLP ; Loop until all sent + RTS PC + + +; Wait for block at R1 from Tube Register 2 +; ========================================= +WAIT_BLK: + ADD R2,R1 ; Add length of control block to R1 +WAIT_BLKLP: + JSR PC,WAIT_BYTE ; Wait for byte via Tube R2 + MOVB R0,-(R1) ; Decrement R1, store byte to R1 + DEC R2 ; Decrement count + BNE WAIT_BLKLP ; Loop until all received + RTS PC + + +; Send command in R0 followed by byte in R1 +; ========================================= +SEND_CMD_R1: + JSR PC,SEND_CMD ; Send command + + +; Send byte in R1 to Tube Register 2 +; ================================== +SEND_BYTE_R1: + MOV R1,R0 ; Pass byte to R0 and fall through + + +; Send byte in R0 to Tube Register 2 +; ================================== +SEND_CMD: +SEND_BYTE: + MOV R0,-(SP) ; Save R0 +SEND_BYTELP: + MOVB @#TUBE2S,R0 ; Read Tube R2 status + BIC #&BF,R0 ; Check b6 of status + BEQ SEND_BYTELP ; Loop until b6 set + MOV (SP)+,R0 ; Get R0 back + MOVB R0,@#TUBE2 ; Send byte to Tube R2 + RTS PC + + +; Host->Client communication via interupts +; ======================================== +Get_R1: + MOVB @#TUBE1S,R0 ; Read Tube R1 status + BPL Get_R1 ; Loop until b7 set + MOVB @#TUBE1,R0 ; Get byte from Tube R1 + RTS PC + +Get_R4: + MOVB @#TUBE4S,R0 ; Read Tube R4 status + BPL Get_R4 ; Loop until b7 set + MOVB @#TUBE4,R0 ; Get byte from Tube R4 + RTS PC + + +; Interrupt handler +; ================ +; When Host sends a byte to R1 or R4 it generates a Client IRQ. +; Within the interupt handler PSW has been saved on the stack +; and further interrupts are disabled. +; +IRQ: + MOV R0,-(SP) ; Save R0 + MOVB @#TUBE4S,R0 ; Read Tube R4 status + BMI IRQ_R4 ; If b7 set, R4 generated the interrupt + MOVB @#TUBE1S,R0 ; Read Tube R1 status + BMI IRQ_R1 ; If b7 set, R1 generated the interrupt + MOV (SP)+,R0 ; Get R0 back +; JMP @#USERIRQV ; Something else generated the interrupt + JMP @USERIRQV ; DMB Something else generated the interrupt + +; Data present in Tube R1 generated an interrupt +; +IRQ_R1: + MOVB @#TUBE1,R0 ; Get byte from Tube R1 + BMI IRQ_ESCAPE ; b7 set, change Escape state +; +; R1<&80 - Host event being passed to client +; Tube data: via R1: &00 Y X A +; + MOV R1,-(SP) ; Save R1 + MOV R2,-(SP) ; Save R2 + JSR PC,Get_R1 ; Wait for byte via Tube R1 + MOV R0,R2 ; Pass to R2 + JSR PC,Get_R1 ; Wait for byte via Tube R1 + MOV R0,R1 ; Pass to R1 + JSR PC,Get_R1 ; Wait for byte via Tube R1 +; JSR PC,@#EVENTV ; Call event vector + JSR PC,@EVENTV ; DMB Call event vector + MOV (SP)+,R2 ; Restore R2 +; BR NMI_DONE2 ; Restore registers and return from interrupt +NMI_DONE2: + MOV (SP)+,R1 + MOV (SP)+,R0 + RTI ; Return from interupt + +; R1>&7F - Host changing Escape state +; Tube data: via R1: flag, b7=1, b6=state +; +IRQ_ESCAPE: +; JSR PC,@#ESCV ; Call Escape handler + JSR PC,@ESCV ; DMB Call Escape handler + BR NMI_DONE1 ; Restore and return from interrupt +; MOV (SP)+,R0 ; Restore R0 +; RTI ; Return from interupt + +; Data present in Tube R4 generated an interupt +; +IRQ_R4: + MOVB @#TUBE4,R0 ; Get byte from Tube R4 + BPL IRQ_DATA ; b7=0, jump to do data transfer + +; R4>&7F - Error occured +; Tube data: via R4: &FF, via R2: &00 err string &00 +; + MOV R1,-(SP) ; Remove this when errjmp done + JSR PC,WAIT_BYTE ; Wait for an initial byte from R2 + MOV @#ERRADDR,R1 ; Point to error buffer + JSR PC,WAIT_BYTE + MOVB R0,(R1)+ ; Store error number +IRQ_R4LP: + JSR PC,WAIT_BYTE ; Wait for byte of error string + MOVB R0,(R1)+ ; Store in error buffer + BNE IRQ_R4LP ; Loop until terminating &00 received + MOV (SP)+,R1 ; Restore R1 + MOV (SP)+,R0 ; Balance stack + MOV @#ERRADDR,R0 ; Point to error block + MOV @#ERRV,(SP) ; Replace return address with error handler + RTI ; Restore PSW and jump to error handler + +;; Generate an error without using EMT call +;; ---------------------------------------- +;MKERR: +; MOV (SP)+,R0 ; Point to inline error block +;; JMP @#ERRV ; Jump to error handler +; JMP @ERRV ; DMB Jump to error handler + +; R4<&80 - Data transfer +; Tube data: via R4: action ID address sync, via R3: data +; +IRQ_DATA: +; R0=transfer type, (sp)=mainline R0 +; + MOV R1,-(SP) ; Save R1 + MOV R0,R1 ; Save transfer type in R2 + JSR PC,Get_R4 ; Wait for caller ID + CMP R1,#5 ; Is transfer 'release'? + BEQ NMI_DONE2 ; Exit if 'release' + JSR PC,Get_R4 ; Get data address byte 4 + MOVB R0,@#ADDR+3 + JSR PC,Get_R4 ; Get data address byte 3 + MOVB R0,@#ADDR+2 + JSR PC,Get_R4 ; Get data address byte 2 + MOVB R0,@#ADDR+1 + JSR PC,Get_R4 ; Get data address byte 1 + MOVB R0,@#ADDR+0 + MOVB @#TUBE3,R0 ; Clear Tube3 FIFO + MOVB @#TUBE3,R0 + JSR PC,Get_R4 ; Get sync byte + ADD R1,R1 ; Index into NMI dispatch table + MOV NMIADDRS(R1),@#NMIVEC ; Set up NMI vector + MOV @#ADDR,R0 ; Get transfer address + CMP R1,#12 ; check transfer type + BCS NMI_DONE2 ; Jump to exit if not 256-byte transfers + BEQ NMI6 ; Jump with 256-byte write + +; Transfer 7 - Read 256 bytes from Host via R3 +; -------------------------------------------- +NMI7: + MOV #256,R1 ; Prepare to transfer 256 bytes +NMI7_LOOP: + TSTB @#TUBE3S + BPL NMI7_LOOP ; Wait for Tube R3 ready + MOVB @#TUBE3,(R0)+ ; Fetch byte from Tube R3 and store + DEC R1 ; Decrement count + BNE NMI7_LOOP ; Loop for 256 bytes + BR NMI_DONE + +; Transfer 6 - Send 256 bytes to Host via R3 +; ------------------------------------------ +NMI6: + MOV #256,R1 ; Prepare to transfer 256 bytes +NMI6_LOOP: + TSTB @#TUBE3S + BPL NMI6_LOOP ; Wait for Tube R3 ready + MOVB (R0)+,@#TUBE3 ; Fetch byte and send to Tube R3 + DEC R1 ; Decrement count + BNE NMI6_LOOP ; Loop for 256 bytes +NMI6_DONE: + TSTB @#TUBE3S + BPL NMI6_DONE ; Wait for Tube R3 ready again + CLRB @#TUBE3 ; Send final sync byte +NMI_DONE: + MOV (SP)+,R1 ; Restore and return +NMI_DONE1: + MOV R0,@#ADDR ; Save updated transfer address + MOV (SP)+,R0 + RTI + + +; Transfer 3 - Read double bytes from host +; ---------------------------------------- +NMI3: + MOV R0,-(SP) + MOV @#ADDR,R0 ; Get transfer address + MOVB @#TUBE3,(R0)+ ; Read two bytes + MOVB @#TUBE3,(R0)+ + BR NMI_DONE1 + +; Transfer 2 - Send double bytes to host +; -------------------------------------- +NMI2: + MOV R0,-(SP) + MOV @#ADDR,R0 ; Get transfer address + MOVB (R0)+,@#TUBE3 ; Send two bytes + MOVB (R0)+,@#TUBE3 + BR NMI_DONE1 + +; Transfer 1 - Read single byte from host +; --------------------------------------- +NMI1: + MOV R0,-(SP) + MOV @#ADDR,R0 ; Get transfer address + MOVB @#TUBE3,(R0)+ ; Transfer byte from Tube + BR NMI_DONE1 + +; Transfer 0 - Send single byte to Host +; ------------------------------------- +NMI0: + MOV R0,-(SP) + MOV @#ADDR,R0 ; Get transfer address + MOVB (R0)+,@#TUBE3 ; Transfer byte to Tube + BR NMI_DONE1 +;NMI_DONE1: +; MOV (SP)+,R0 +; RTI + +; Transfers 4,5,6,7 - Just acknowledge NMI +; ---------------------------------------- +NMI_ACK: + CLRB @#TUBE3 ; Store to Tube R3 to acknowledge NMI +USERIRQ: ; Default unknown IRQ handler +NULLIRQ: ; Default unused hardware vector handler + RTI + +; NMI transfer dispatch table +; --------------------------- +NMIADDRS: + EQUW NMI0 ; Single byte to host + EQUW NMI1 ; Single byte from host + EQUW NMI2 ; Double byte to host + EQUW NMI3 ; Double byte from host + EQUW NMI_ACK ; Execute + EQUW NMI_ACK ; Release + EQUW NMI_ACK ; 256 bytes to host + EQUW NMI_ACK ; 256 bytes from host + + EQUM TUBEIO-$ ; Spare space + +; Tube I/O registers +; ------------------ + EQUW 0,0,0,0,0,0,0,0 ; Tube registers + diff --git a/src/LX9Co_CoProPDP11.vhd b/src/LX9Co_CoProPDP11.vhd index 5f591ca..c300f52 100644 --- a/src/LX9Co_CoProPDP11.vhd +++ b/src/LX9Co_CoProPDP11.vhd @@ -135,7 +135,7 @@ begin illhalt => open, -- a halt instruction was not executed because it was illegal in the current mode; for use in the cer cpu error register ysv => open, -- a yellow stack trap is in progress - for use in the cer cpu error register rsv => open, -- a red stack trap is in progress - for use in the cer cpu error register - cpu_stack_limit => x"8000", -- the cpu stack limit control register value + cpu_stack_limit => x"0100", -- the cpu stack limit control register value cpu_kmillhalt => '0', -- the control register setting for kernel mode illegal halt sr0_ic => open, -- sr0/mmr0 instruction complete flag sr1 => open, -- sr1/mmr1, address of the current instruction diff --git a/src/ROM/tuberom_pdp11.vhd b/src/ROM/tuberom_pdp11.vhd index 26d0a0f..0d9c688 100644 --- a/src/ROM/tuberom_pdp11.vhd +++ b/src/ROM/tuberom_pdp11.vhd @@ -38,1009 +38,1009 @@ begin when x"008" => DATA <= x"3436"; when x"009" => DATA <= x"204b"; when x"00a" => DATA <= x"2e30"; - when x"00b" => DATA <= x"3931"; + when x"00b" => DATA <= x"3132"; when x"00c" => DATA <= x"0d0d"; when x"00d" => DATA <= x"0000"; when x"00e" => DATA <= x"15c6"; - when x"00f" => DATA <= x"f500"; + when x"00f" => DATA <= x"f530"; when x"010" => DATA <= x"09f7"; - when x"011" => DATA <= x"0578"; + when x"011" => DATA <= x"0588"; when x"012" => DATA <= x"17df"; when x"013" => DATA <= x"f5fc"; when x"014" => DATA <= x"f5f8"; when x"015" => DATA <= x"15c1"; when x"016" => DATA <= x"f804"; when x"017" => DATA <= x"09f7"; - when x"018" => DATA <= x"0088"; + when x"018" => DATA <= x"0086"; when x"019" => DATA <= x"09f7"; - when x"01a" => DATA <= x"0486"; + when x"01a" => DATA <= x"0498"; when x"01b" => DATA <= x"00a1"; when x"01c" => DATA <= x"09f7"; - when x"01d" => DATA <= x"009a"; - when x"01e" => DATA <= x"15c6"; - when x"01f" => DATA <= x"f500"; - when x"020" => DATA <= x"09f7"; - when x"021" => DATA <= x"0558"; - when x"022" => DATA <= x"15c1"; - when x"023" => DATA <= x"f860"; - when x"024" => DATA <= x"09f7"; - when x"025" => DATA <= x"006e"; - when x"026" => DATA <= x"15c1"; - when x"027" => DATA <= x"f868"; + when x"01d" => DATA <= x"00c6"; + when x"01e" => DATA <= x"17c6"; + when x"01f" => DATA <= x"f5f6"; + when x"020" => DATA <= x"15c0"; + when x"021" => DATA <= x"0003"; + when x"022" => DATA <= x"09f7"; + when x"023" => DATA <= x"057e"; + when x"024" => DATA <= x"15c1"; + when x"025" => DATA <= x"f860"; + when x"026" => DATA <= x"09f7"; + when x"027" => DATA <= x"0068"; when x"028" => DATA <= x"09f7"; - when x"029" => DATA <= x"0204"; + when x"029" => DATA <= x"0220"; when x"02a" => DATA <= x"870c"; - when x"02b" => DATA <= x"15c0"; - when x"02c" => DATA <= x"f520"; + when x"02b" => DATA <= x"17c0"; + when x"02c" => DATA <= x"f868"; when x"02d" => DATA <= x"09f7"; - when x"02e" => DATA <= x"0062"; - when x"02f" => DATA <= x"01ee"; + when x"02e" => DATA <= x"0060"; + when x"02f" => DATA <= x"01f4"; when x"030" => DATA <= x"4450"; when x"031" => DATA <= x"3150"; when x"032" => DATA <= x"3e31"; when x"033" => DATA <= x"002a"; - when x"034" => DATA <= x"f520"; - when x"035" => DATA <= x"20c0"; + when x"034" => DATA <= x"f530"; + when x"035" => DATA <= x"20a8"; when x"036" => DATA <= x"ffff"; when x"037" => DATA <= x"15c0"; when x"038" => DATA <= x"007e"; when x"039" => DATA <= x"09f7"; - when x"03a" => DATA <= x"0150"; - when x"03b" => DATA <= x"09f7"; - when x"03c" => DATA <= x"0676"; - when x"03d" => DATA <= x"4511"; - when x"03e" => DATA <= x"6373"; - when x"03f" => DATA <= x"7061"; - when x"040" => DATA <= x"0065"; - when x"041" => DATA <= x"15c6"; - when x"042" => DATA <= x"f500"; - when x"043" => DATA <= x"1001"; - when x"044" => DATA <= x"0a81"; - when x"045" => DATA <= x"09f7"; - when x"046" => DATA <= x"0422"; - when x"047" => DATA <= x"09f7"; - when x"048" => DATA <= x"0028"; - when x"049" => DATA <= x"09f7"; - when x"04a" => DATA <= x"041a"; - when x"04b" => DATA <= x"01d2"; - when x"04c" => DATA <= x"6000"; - when x"04d" => DATA <= x"903f"; - when x"04e" => DATA <= x"fd48"; - when x"04f" => DATA <= x"0087"; - when x"050" => DATA <= x"e5c1"; - when x"051" => DATA <= x"0002"; - when x"052" => DATA <= x"9440"; - when x"053" => DATA <= x"45c0"; - when x"054" => DATA <= x"ff00"; - when x"055" => DATA <= x"9241"; - when x"056" => DATA <= x"45c1"; - when x"057" => DATA <= x"ff00"; - when x"058" => DATA <= x"00c1"; - when x"059" => DATA <= x"5001"; - when x"05a" => DATA <= x"0087"; - when x"05b" => DATA <= x"09f7"; - when x"05c" => DATA <= x"03f0"; - when x"05d" => DATA <= x"9440"; - when x"05e" => DATA <= x"02fc"; - when x"05f" => DATA <= x"0087"; - when x"060" => DATA <= x"1066"; - when x"061" => DATA <= x"1026"; - when x"062" => DATA <= x"15c0"; - when x"063" => DATA <= x"0002"; - when x"064" => DATA <= x"09f7"; - when x"065" => DATA <= x"058a"; - when x"066" => DATA <= x"1581"; - when x"067" => DATA <= x"09f7"; - when x"068" => DATA <= x"0554"; - when x"069" => DATA <= x"1581"; - when x"06a" => DATA <= x"00b1"; - when x"06b" => DATA <= x"09f7"; - when x"06c" => DATA <= x"03a8"; - when x"06d" => DATA <= x"8102"; - when x"06e" => DATA <= x"0a00"; - when x"06f" => DATA <= x"0087"; - when x"070" => DATA <= x"15c4"; - when x"071" => DATA <= x"0000"; - when x"072" => DATA <= x"0c44"; - when x"073" => DATA <= x"17c1"; - when x"074" => DATA <= x"f5f8"; - when x"075" => DATA <= x"1066"; - when x"076" => DATA <= x"9c40"; - when x"077" => DATA <= x"0007"; - when x"078" => DATA <= x"45c0"; - when x"079" => DATA <= x"ff00"; - when x"07a" => DATA <= x"6001"; - when x"07b" => DATA <= x"8bd1"; - when x"07c" => DATA <= x"0229"; - when x"07d" => DATA <= x"a457"; - when x"07e" => DATA <= x"0028"; - when x"07f" => DATA <= x"0226"; - when x"080" => DATA <= x"a457"; - when x"081" => DATA <= x"0043"; - when x"082" => DATA <= x"0223"; - when x"083" => DATA <= x"a457"; - when x"084" => DATA <= x"0029"; - when x"085" => DATA <= x"0220"; - when x"086" => DATA <= x"1381"; - when x"087" => DATA <= x"9c40"; - when x"088" => DATA <= x"0006"; - when x"089" => DATA <= x"35c0"; -- was 0bd7 - when x"08a" => DATA <= x"0040"; - when x"08b" => DATA <= x"0349"; - when x"08c" => DATA <= x"45c0"; - when x"08d" => DATA <= x"fff0"; -- was 00ff - when x"08e" => DATA <= x"2017"; - when x"08f" => DATA <= x"0007"; - when x"090" => DATA <= x"0244"; - when x"091" => DATA <= x"9c40"; - when x"092" => DATA <= x"0006"; - when x"093" => DATA <= x"35c0"; -- was 0bd7 - when x"094" => DATA <= x"0020"; - when x"095" => DATA <= x"030e"; - when x"096" => DATA <= x"9c40"; - when x"097" => DATA <= x"0007"; - when x"098" => DATA <= x"45c0"; - when x"099" => DATA <= x"ff00"; - when x"09a" => DATA <= x"6001"; - when x"09b" => DATA <= x"0a81"; - when x"09c" => DATA <= x"8bd1"; - when x"09d" => DATA <= x"02fe"; - when x"09e" => DATA <= x"65c1"; - when x"09f" => DATA <= x"0004"; - when x"0a0" => DATA <= x"09f7"; - when x"0a1" => DATA <= x"ff60"; - when x"0a2" => DATA <= x"6581"; - when x"0a3" => DATA <= x"1066"; - when x"0a4" => DATA <= x"65c4"; - when x"0a5" => DATA <= x"0002"; - when x"0a6" => DATA <= x"1581"; - when x"0a7" => DATA <= x"45c1"; - when x"0a8" => DATA <= x"0001"; - when x"0a9" => DATA <= x"1240"; - when x"0aa" => DATA <= x"2017"; - when x"0ab" => DATA <= x"0105"; - when x"0ac" => DATA <= x"871a"; - when x"0ad" => DATA <= x"2017"; - when x"0ae" => DATA <= x"0109"; - when x"0af" => DATA <= x"8617"; - when x"0b0" => DATA <= x"1c42"; - when x"0b1" => DATA <= x"0002"; - when x"0b2" => DATA <= x"1c43"; + when x"03a" => DATA <= x"017a"; + when x"03b" => DATA <= x"880f"; + when x"03c" => DATA <= x"4511"; + when x"03d" => DATA <= x"6373"; + when x"03e" => DATA <= x"7061"; + when x"03f" => DATA <= x"0065"; + when x"040" => DATA <= x"17c6"; + when x"041" => DATA <= x"f5f6"; + when x"042" => DATA <= x"1001"; + when x"043" => DATA <= x"0a81"; + when x"044" => DATA <= x"09f7"; + when x"045" => DATA <= x"0436"; + when x"046" => DATA <= x"09f7"; + when x"047" => DATA <= x"0028"; + when x"048" => DATA <= x"09f7"; + when x"049" => DATA <= x"042e"; + when x"04a" => DATA <= x"01d3"; + when x"04b" => DATA <= x"6000"; + when x"04c" => DATA <= x"903f"; + when x"04d" => DATA <= x"fd42"; + when x"04e" => DATA <= x"0087"; + when x"04f" => DATA <= x"e5c1"; + when x"050" => DATA <= x"0002"; + when x"051" => DATA <= x"9440"; + when x"052" => DATA <= x"45c0"; + when x"053" => DATA <= x"ff00"; + when x"054" => DATA <= x"9241"; + when x"055" => DATA <= x"45c1"; + when x"056" => DATA <= x"ff00"; + when x"057" => DATA <= x"00c1"; + when x"058" => DATA <= x"5001"; + when x"059" => DATA <= x"0087"; + when x"05a" => DATA <= x"09f7"; + when x"05b" => DATA <= x"0404"; + when x"05c" => DATA <= x"9440"; + when x"05d" => DATA <= x"02fc"; + when x"05e" => DATA <= x"0087"; + when x"05f" => DATA <= x"1066"; + when x"060" => DATA <= x"10a6"; + when x"061" => DATA <= x"10e6"; + when x"062" => DATA <= x"1126"; + when x"063" => DATA <= x"1166"; + when x"064" => DATA <= x"1185"; + when x"065" => DATA <= x"2157"; + when x"066" => DATA <= x"f500"; + when x"067" => DATA <= x"8602"; + when x"068" => DATA <= x"15c6"; + when x"069" => DATA <= x"f530"; + when x"06a" => DATA <= x"1166"; + when x"06b" => DATA <= x"17e6"; + when x"06c" => DATA <= x"f5fc"; + when x"06d" => DATA <= x"09f7"; + when x"06e" => DATA <= x"0014"; + when x"06f" => DATA <= x"159f"; + when x"070" => DATA <= x"f5fc"; + when x"071" => DATA <= x"1386"; + when x"072" => DATA <= x"1585"; + when x"073" => DATA <= x"1584"; + when x"074" => DATA <= x"1583"; + when x"075" => DATA <= x"1582"; + when x"076" => DATA <= x"1581"; + when x"077" => DATA <= x"0a00"; + when x"078" => DATA <= x"0087"; + when x"079" => DATA <= x"1001"; + when x"07a" => DATA <= x"15c0"; + when x"07b" => DATA <= x"0002"; + when x"07c" => DATA <= x"09f7"; + when x"07d" => DATA <= x"0582"; + when x"07e" => DATA <= x"09f7"; + when x"07f" => DATA <= x"054e"; + when x"080" => DATA <= x"00b1"; + when x"081" => DATA <= x"09f7"; + when x"082" => DATA <= x"038e"; + when x"083" => DATA <= x"80f4"; + when x"084" => DATA <= x"15c0"; + when x"085" => DATA <= x"0000"; + when x"086" => DATA <= x"0c40"; + when x"087" => DATA <= x"17c1"; + when x"088" => DATA <= x"f5f8"; + when x"089" => DATA <= x"1066"; + when x"08a" => DATA <= x"9c42"; + when x"08b" => DATA <= x"0007"; + when x"08c" => DATA <= x"45c2"; + when x"08d" => DATA <= x"ff00"; + when x"08e" => DATA <= x"6081"; + when x"08f" => DATA <= x"8bd1"; + when x"090" => DATA <= x"0229"; + when x"091" => DATA <= x"a457"; + when x"092" => DATA <= x"0028"; + when x"093" => DATA <= x"0226"; + when x"094" => DATA <= x"a457"; + when x"095" => DATA <= x"0043"; + when x"096" => DATA <= x"0223"; + when x"097" => DATA <= x"a457"; + when x"098" => DATA <= x"0029"; + when x"099" => DATA <= x"0220"; + when x"09a" => DATA <= x"1381"; + when x"09b" => DATA <= x"9c42"; + when x"09c" => DATA <= x"0006"; + when x"09d" => DATA <= x"35c2"; + when x"09e" => DATA <= x"0040"; + when x"09f" => DATA <= x"0346"; + when x"0a0" => DATA <= x"45c2"; + when x"0a1" => DATA <= x"fff0"; + when x"0a2" => DATA <= x"2097"; + when x"0a3" => DATA <= x"0007"; + when x"0a4" => DATA <= x"0241"; + when x"0a5" => DATA <= x"9c42"; + when x"0a6" => DATA <= x"0006"; + when x"0a7" => DATA <= x"35c2"; + when x"0a8" => DATA <= x"0020"; + when x"0a9" => DATA <= x"030e"; + when x"0aa" => DATA <= x"9c42"; + when x"0ab" => DATA <= x"0007"; + when x"0ac" => DATA <= x"45c2"; + when x"0ad" => DATA <= x"ff00"; + when x"0ae" => DATA <= x"6081"; + when x"0af" => DATA <= x"0a81"; + when x"0b0" => DATA <= x"8bd1"; + when x"0b1" => DATA <= x"02fe"; + when x"0b2" => DATA <= x"65c1"; when x"0b3" => DATA <= x"0004"; - when x"0b4" => DATA <= x"60c2"; - when x"0b5" => DATA <= x"1c43"; - when x"0b6" => DATA <= x"0006"; - when x"0b7" => DATA <= x"17c0"; - when x"0b8" => DATA <= x"f5ee"; - when x"0b9" => DATA <= x"65c1"; - when x"0ba" => DATA <= x"0010"; - when x"0bb" => DATA <= x"1450"; - when x"0bc" => DATA <= x"e5c2"; - when x"0bd" => DATA <= x"0002"; - when x"0be" => DATA <= x"02fc"; - when x"0bf" => DATA <= x"0bc3"; - when x"0c0" => DATA <= x"0304"; - when x"0c1" => DATA <= x"0a10"; - when x"0c2" => DATA <= x"e5c3"; - when x"0c3" => DATA <= x"0002"; - when x"0c4" => DATA <= x"02fc"; - when x"0c5" => DATA <= x"17c1"; - when x"0c6" => DATA <= x"f5ee"; - when x"0c7" => DATA <= x"15c5"; - when x"0c8" => DATA <= x"0bbc"; - when x"0c9" => DATA <= x"1100"; - when x"0ca" => DATA <= x"0c80"; - when x"0cb" => DATA <= x"0308"; - when x"0cc" => DATA <= x"17e6"; - when x"0cd" => DATA <= x"f5fc"; - when x"0ce" => DATA <= x"105f"; - when x"0cf" => DATA <= x"f5fc"; - when x"0d0" => DATA <= x"09c9"; - when x"0d1" => DATA <= x"159f"; - when x"0d2" => DATA <= x"f5fc"; - when x"0d3" => DATA <= x"0087"; - when x"0d4" => DATA <= x"0049"; - when x"0d5" => DATA <= x"0c02"; - when x"0d6" => DATA <= x"860a"; - when x"0d7" => DATA <= x"09f7"; - when x"0d8" => DATA <= x"053e"; - when x"0d9" => DATA <= x"4ef9"; - when x"0da" => DATA <= x"746f"; - when x"0db" => DATA <= x"5020"; - when x"0dc" => DATA <= x"5044"; - when x"0dd" => DATA <= x"3131"; - when x"0de" => DATA <= x"6320"; - when x"0df" => DATA <= x"646f"; - when x"0e0" => DATA <= x"0065"; - when x"0e1" => DATA <= x"0077"; - when x"0e2" => DATA <= x"fe76"; - when x"0e3" => DATA <= x"1026"; - when x"0e4" => DATA <= x"8bc0"; - when x"0e5" => DATA <= x"810c"; - when x"0e6" => DATA <= x"15c0"; - when x"0e7" => DATA <= x"0004"; - when x"0e8" => DATA <= x"09f7"; - when x"0e9" => DATA <= x"047c"; - when x"0ea" => DATA <= x"1380"; - when x"0eb" => DATA <= x"09f7"; - when x"0ec" => DATA <= x"047c"; - when x"0ed" => DATA <= x"09f7"; - when x"0ee" => DATA <= x"02a4"; - when x"0ef" => DATA <= x"1001"; - when x"0f0" => DATA <= x"1580"; - when x"0f1" => DATA <= x"0087"; - when x"0f2" => DATA <= x"2017"; - when x"0f3" => DATA <= x"0082"; - when x"0f4" => DATA <= x"032b"; - when x"0f5" => DATA <= x"2017"; - when x"0f6" => DATA <= x"0083"; - when x"0f7" => DATA <= x"032a"; - when x"0f8" => DATA <= x"2017"; - when x"0f9" => DATA <= x"0084"; - when x"0fa" => DATA <= x"0327"; + when x"0b4" => DATA <= x"09f7"; + when x"0b5" => DATA <= x"ff36"; + when x"0b6" => DATA <= x"6581"; + when x"0b7" => DATA <= x"1066"; + when x"0b8" => DATA <= x"55c0"; + when x"0b9" => DATA <= x"0002"; + when x"0ba" => DATA <= x"1581"; + when x"0bb" => DATA <= x"45c1"; + when x"0bc" => DATA <= x"0001"; + when x"0bd" => DATA <= x"1242"; + when x"0be" => DATA <= x"2097"; + when x"0bf" => DATA <= x"0105"; + when x"0c0" => DATA <= x"871c"; + when x"0c1" => DATA <= x"2097"; + when x"0c2" => DATA <= x"0109"; + when x"0c3" => DATA <= x"8619"; + when x"0c4" => DATA <= x"0bd1"; + when x"0c5" => DATA <= x"1443"; + when x"0c6" => DATA <= x"1444"; + when x"0c7" => DATA <= x"6103"; + when x"0c8" => DATA <= x"1444"; + when x"0c9" => DATA <= x"17c2"; + when x"0ca" => DATA <= x"f5f4"; + when x"0cb" => DATA <= x"65c1"; + when x"0cc" => DATA <= x"0008"; + when x"0cd" => DATA <= x"0c83"; + when x"0ce" => DATA <= x"1452"; + when x"0cf" => DATA <= x"0ac3"; + when x"0d0" => DATA <= x"02fd"; + when x"0d1" => DATA <= x"0c84"; + when x"0d2" => DATA <= x"0303"; + when x"0d3" => DATA <= x"0a12"; + when x"0d4" => DATA <= x"0ac4"; + when x"0d5" => DATA <= x"02fd"; + when x"0d6" => DATA <= x"45c0"; + when x"0d7" => DATA <= x"fffe"; + when x"0d8" => DATA <= x"17c1"; + when x"0d9" => DATA <= x"f5f4"; + when x"0da" => DATA <= x"0a26"; + when x"0db" => DATA <= x"0a26"; + when x"0dc" => DATA <= x"0a26"; + when x"0dd" => DATA <= x"15c5"; + when x"0de" => DATA <= x"0bbc"; + when x"0df" => DATA <= x"0c80"; + when x"0e0" => DATA <= x"105f"; + when x"0e1" => DATA <= x"f5fc"; + when x"0e2" => DATA <= x"1066"; + when x"0e3" => DATA <= x"15c1"; + when x"0e4" => DATA <= x"f804"; + when x"0e5" => DATA <= x"0087"; + when x"0e6" => DATA <= x"0c80"; + when x"0e7" => DATA <= x"860d"; + when x"0e8" => DATA <= x"15c0"; + when x"0e9" => DATA <= x"0003"; + when x"0ea" => DATA <= x"09f7"; + when x"0eb" => DATA <= x"0406"; + when x"0ec" => DATA <= x"880f"; + when x"0ed" => DATA <= x"4ef9"; + when x"0ee" => DATA <= x"746f"; + when x"0ef" => DATA <= x"5020"; + when x"0f0" => DATA <= x"5044"; + when x"0f1" => DATA <= x"3131"; + when x"0f2" => DATA <= x"6320"; + when x"0f3" => DATA <= x"646f"; + when x"0f4" => DATA <= x"0065"; + when x"0f5" => DATA <= x"0077"; + when x"0f6" => DATA <= x"fe4e"; + when x"0f7" => DATA <= x"0188"; + when x"0f8" => DATA <= x"1026"; + when x"0f9" => DATA <= x"8bc0"; + when x"0fa" => DATA <= x"810b"; when x"0fb" => DATA <= x"15c0"; - when x"0fc" => DATA <= x"0006"; + when x"0fc" => DATA <= x"0004"; when x"0fd" => DATA <= x"09f7"; - when x"0fe" => DATA <= x"0452"; - when x"0ff" => DATA <= x"1080"; + when x"0fe" => DATA <= x"047a"; + when x"0ff" => DATA <= x"1380"; when x"100" => DATA <= x"09f7"; - when x"101" => DATA <= x"0452"; - when x"102" => DATA <= x"1580"; - when x"103" => DATA <= x"09f7"; - when x"104" => DATA <= x"044c"; - when x"105" => DATA <= x"2017"; - when x"106" => DATA <= x"009d"; - when x"107" => DATA <= x"0315"; - when x"108" => DATA <= x"2017"; - when x"109" => DATA <= x"008e"; - when x"10a" => DATA <= x"0313"; - when x"10b" => DATA <= x"1026"; - when x"10c" => DATA <= x"09f7"; - when x"10d" => DATA <= x"0266"; - when x"10e" => DATA <= x"65c0"; - when x"10f" => DATA <= x"ff80"; - when x"110" => DATA <= x"09f7"; - when x"111" => DATA <= x"025e"; - when x"112" => DATA <= x"45c0"; - when x"113" => DATA <= x"ff00"; - when x"114" => DATA <= x"1002"; - when x"115" => DATA <= x"00c0"; - when x"116" => DATA <= x"1001"; - when x"117" => DATA <= x"09f7"; - when x"118" => DATA <= x"0250"; - when x"119" => DATA <= x"45c0"; - when x"11a" => DATA <= x"ff00"; - when x"11b" => DATA <= x"5001"; - when x"11c" => DATA <= x"1580"; - when x"11d" => DATA <= x"0087"; - when x"11e" => DATA <= x"0077"; - when x"11f" => DATA <= x"fe94"; - when x"120" => DATA <= x"15c0"; - when x"121" => DATA <= x"0086"; - when x"122" => DATA <= x"8cc0"; - when x"123" => DATA <= x"8cc0"; - when x"124" => DATA <= x"1c01"; - when x"125" => DATA <= x"f5e2"; - when x"126" => DATA <= x"1042"; - when x"127" => DATA <= x"00c2"; - when x"128" => DATA <= x"45c2"; - when x"129" => DATA <= x"ff00"; - when x"12a" => DATA <= x"1580"; - when x"12b" => DATA <= x"0087"; - when x"12c" => DATA <= x"0bc0"; - when x"12d" => DATA <= x"034d"; - when x"12e" => DATA <= x"10e6"; - when x"12f" => DATA <= x"10a6"; - when x"130" => DATA <= x"1026"; - when x"131" => DATA <= x"15c0"; - when x"132" => DATA <= x"0008"; - when x"133" => DATA <= x"09f7"; - when x"134" => DATA <= x"03ec"; - when x"135" => DATA <= x"1380"; - when x"136" => DATA <= x"09f7"; - when x"137" => DATA <= x"03e6"; - when x"138" => DATA <= x"8bc0"; - when x"139" => DATA <= x"8003"; - when x"13a" => DATA <= x"9442"; - when x"13b" => DATA <= x"9243"; - when x"13c" => DATA <= x"010c"; - when x"13d" => DATA <= x"15c2"; - when x"13e" => DATA <= x"0010"; - when x"13f" => DATA <= x"15c3"; - when x"140" => DATA <= x"0010"; - when x"141" => DATA <= x"2017"; - when x"142" => DATA <= x"0015"; - when x"143" => DATA <= x"8605"; - when x"144" => DATA <= x"6000"; - when x"145" => DATA <= x"65c0"; - when x"146" => DATA <= x"facc"; - when x"147" => DATA <= x"9402"; - when x"148" => DATA <= x"9203"; - when x"149" => DATA <= x"1080"; - when x"14a" => DATA <= x"09f7"; - when x"14b" => DATA <= x"03be"; - when x"14c" => DATA <= x"6081"; - when x"14d" => DATA <= x"0ac2"; - when x"14e" => DATA <= x"2097"; - when x"14f" => DATA <= x"0080"; - when x"150" => DATA <= x"8605"; - when x"151" => DATA <= x"9840"; - when x"152" => DATA <= x"09f7"; - when x"153" => DATA <= x"03ae"; - when x"154" => DATA <= x"0ac2"; - when x"155" => DATA <= x"80fb"; - when x"156" => DATA <= x"10c0"; - when x"157" => DATA <= x"09f7"; - when x"158" => DATA <= x"03a4"; - when x"159" => DATA <= x"60c1"; - when x"15a" => DATA <= x"0ac3"; - when x"15b" => DATA <= x"20d7"; - when x"15c" => DATA <= x"0080"; - when x"15d" => DATA <= x"8605"; - when x"15e" => DATA <= x"09f7"; - when x"15f" => DATA <= x"01c2"; - when x"160" => DATA <= x"9021"; - when x"161" => DATA <= x"0ac3"; - when x"162" => DATA <= x"80fb"; - when x"163" => DATA <= x"1580"; - when x"164" => DATA <= x"1582"; - when x"165" => DATA <= x"1583"; - when x"166" => DATA <= x"0087"; - when x"167" => DATA <= x"0500"; - when x"168" => DATA <= x"0005"; - when x"169" => DATA <= x"0500"; - when x"16a" => DATA <= x"0005"; - when x"16b" => DATA <= x"0504"; - when x"16c" => DATA <= x"0005"; - when x"16d" => DATA <= x"0008"; - when x"16e" => DATA <= x"000e"; - when x"16f" => DATA <= x"0504"; - when x"170" => DATA <= x"0901"; - when x"171" => DATA <= x"0501"; - when x"172" => DATA <= x"0005"; - when x"173" => DATA <= x"0800"; - when x"174" => DATA <= x"1910"; - when x"175" => DATA <= x"0020"; - when x"176" => DATA <= x"0110"; - when x"177" => DATA <= x"0d0d"; - when x"178" => DATA <= x"8000"; - when x"179" => DATA <= x"0808"; - when x"17a" => DATA <= x"8080"; - when x"17b" => DATA <= x"15c0"; - when x"17c" => DATA <= x"000a"; - when x"17d" => DATA <= x"09f7"; - when x"17e" => DATA <= x"0358"; - when x"17f" => DATA <= x"65c1"; - when x"180" => DATA <= x"0002"; - when x"181" => DATA <= x"15c2"; - when x"182" => DATA <= x"0003"; - when x"183" => DATA <= x"09f7"; - when x"184" => DATA <= x"032a"; - when x"185" => DATA <= x"15c0"; - when x"186" => DATA <= x"0007"; - when x"187" => DATA <= x"09f7"; - when x"188" => DATA <= x"0344"; - when x"189" => DATA <= x"0a00"; - when x"18a" => DATA <= x"09f7"; - when x"18b" => DATA <= x"033e"; - when x"18c" => DATA <= x"09f7"; - when x"18d" => DATA <= x"0166"; - when x"18e" => DATA <= x"65c0"; - when x"18f" => DATA <= x"ff80"; - when x"190" => DATA <= x"870b"; + when x"101" => DATA <= x"047a"; + when x"102" => DATA <= x"09f7"; + when x"103" => DATA <= x"028c"; + when x"104" => DATA <= x"1001"; + when x"105" => DATA <= x"0132"; + when x"106" => DATA <= x"2017"; + when x"107" => DATA <= x"0082"; + when x"108" => DATA <= x"8704"; + when x"109" => DATA <= x"0325"; + when x"10a" => DATA <= x"2017"; + when x"10b" => DATA <= x"0085"; + when x"10c" => DATA <= x"8724"; + when x"10d" => DATA <= x"15c0"; + when x"10e" => DATA <= x"0006"; + when x"10f" => DATA <= x"09f7"; + when x"110" => DATA <= x"0456"; + when x"111" => DATA <= x"1080"; + when x"112" => DATA <= x"09f7"; + when x"113" => DATA <= x"0456"; + when x"114" => DATA <= x"1580"; + when x"115" => DATA <= x"09f7"; + when x"116" => DATA <= x"0450"; + when x"117" => DATA <= x"2017"; + when x"118" => DATA <= x"009d"; + when x"119" => DATA <= x"031f"; + when x"11a" => DATA <= x"2017"; + when x"11b" => DATA <= x"008e"; + when x"11c" => DATA <= x"03da"; + when x"11d" => DATA <= x"1026"; + when x"11e" => DATA <= x"09f7"; + when x"11f" => DATA <= x"0254"; + when x"120" => DATA <= x"65c0"; + when x"121" => DATA <= x"ff80"; + when x"122" => DATA <= x"09f7"; + when x"123" => DATA <= x"024c"; + when x"124" => DATA <= x"45c0"; + when x"125" => DATA <= x"ff00"; + when x"126" => DATA <= x"1002"; + when x"127" => DATA <= x"00c0"; + when x"128" => DATA <= x"1001"; + when x"129" => DATA <= x"09f7"; + when x"12a" => DATA <= x"023e"; + when x"12b" => DATA <= x"45c0"; + when x"12c" => DATA <= x"ff00"; + when x"12d" => DATA <= x"5001"; + when x"12e" => DATA <= x"0109"; + when x"12f" => DATA <= x"15c0"; + when x"130" => DATA <= x"0086"; + when x"131" => DATA <= x"0cc0"; + when x"132" => DATA <= x"1c01"; + when x"133" => DATA <= x"f4ee"; + when x"134" => DATA <= x"1042"; + when x"135" => DATA <= x"00c2"; + when x"136" => DATA <= x"45c2"; + when x"137" => DATA <= x"ff00"; + when x"138" => DATA <= x"1580"; + when x"139" => DATA <= x"0087"; + when x"13a" => DATA <= x"0bc0"; + when x"13b" => DATA <= x"034d"; + when x"13c" => DATA <= x"10e6"; + when x"13d" => DATA <= x"10a6"; + when x"13e" => DATA <= x"1026"; + when x"13f" => DATA <= x"15c0"; + when x"140" => DATA <= x"0008"; + when x"141" => DATA <= x"09f7"; + when x"142" => DATA <= x"03f8"; + when x"143" => DATA <= x"1380"; + when x"144" => DATA <= x"09f7"; + when x"145" => DATA <= x"03f2"; + when x"146" => DATA <= x"8bc0"; + when x"147" => DATA <= x"8003"; + when x"148" => DATA <= x"9442"; + when x"149" => DATA <= x"9243"; + when x"14a" => DATA <= x"010c"; + when x"14b" => DATA <= x"15c2"; + when x"14c" => DATA <= x"0010"; + when x"14d" => DATA <= x"15c3"; + when x"14e" => DATA <= x"0010"; + when x"14f" => DATA <= x"2017"; + when x"150" => DATA <= x"0015"; + when x"151" => DATA <= x"8605"; + when x"152" => DATA <= x"6000"; + when x"153" => DATA <= x"65c0"; + when x"154" => DATA <= x"fae8"; + when x"155" => DATA <= x"9402"; + when x"156" => DATA <= x"9203"; + when x"157" => DATA <= x"1080"; + when x"158" => DATA <= x"09f7"; + when x"159" => DATA <= x"03ca"; + when x"15a" => DATA <= x"6081"; + when x"15b" => DATA <= x"0ac2"; + when x"15c" => DATA <= x"2097"; + when x"15d" => DATA <= x"0080"; + when x"15e" => DATA <= x"8605"; + when x"15f" => DATA <= x"9840"; + when x"160" => DATA <= x"09f7"; + when x"161" => DATA <= x"03ba"; + when x"162" => DATA <= x"0ac2"; + when x"163" => DATA <= x"80fb"; + when x"164" => DATA <= x"10c0"; + when x"165" => DATA <= x"09f7"; + when x"166" => DATA <= x"03b0"; + when x"167" => DATA <= x"60c1"; + when x"168" => DATA <= x"0ac3"; + when x"169" => DATA <= x"20d7"; + when x"16a" => DATA <= x"0080"; + when x"16b" => DATA <= x"8605"; + when x"16c" => DATA <= x"09f7"; + when x"16d" => DATA <= x"01b8"; + when x"16e" => DATA <= x"9021"; + when x"16f" => DATA <= x"0ac3"; + when x"170" => DATA <= x"80fb"; + when x"171" => DATA <= x"1580"; + when x"172" => DATA <= x"1582"; + when x"173" => DATA <= x"1583"; + when x"174" => DATA <= x"0087"; + when x"175" => DATA <= x"0500"; + when x"176" => DATA <= x"0005"; + when x"177" => DATA <= x"0500"; + when x"178" => DATA <= x"0005"; + when x"179" => DATA <= x"0504"; + when x"17a" => DATA <= x"0005"; + when x"17b" => DATA <= x"0008"; + when x"17c" => DATA <= x"000e"; + when x"17d" => DATA <= x"0504"; + when x"17e" => DATA <= x"0901"; + when x"17f" => DATA <= x"0501"; + when x"180" => DATA <= x"0005"; + when x"181" => DATA <= x"0800"; + when x"182" => DATA <= x"1910"; + when x"183" => DATA <= x"0020"; + when x"184" => DATA <= x"0110"; + when x"185" => DATA <= x"0d0d"; + when x"186" => DATA <= x"8000"; + when x"187" => DATA <= x"0808"; + when x"188" => DATA <= x"8080"; + when x"189" => DATA <= x"15c0"; + when x"18a" => DATA <= x"000a"; + when x"18b" => DATA <= x"09f7"; + when x"18c" => DATA <= x"0364"; + when x"18d" => DATA <= x"65c1"; + when x"18e" => DATA <= x"0002"; + when x"18f" => DATA <= x"15c2"; + when x"190" => DATA <= x"0003"; when x"191" => DATA <= x"09f7"; - when x"192" => DATA <= x"fd7a"; - when x"193" => DATA <= x"0a02"; - when x"194" => DATA <= x"09f7"; - when x"195" => DATA <= x"0156"; - when x"196" => DATA <= x"9011"; - when x"197" => DATA <= x"0a82"; - when x"198" => DATA <= x"2017"; - when x"199" => DATA <= x"000d"; - when x"19a" => DATA <= x"02f9"; - when x"19b" => DATA <= x"0ac2"; - when x"19c" => DATA <= x"0087"; - when x"19d" => DATA <= x"10a6"; - when x"19e" => DATA <= x"1066"; - when x"19f" => DATA <= x"1026"; - when x"1a0" => DATA <= x"15c0"; - when x"1a1" => DATA <= x"000c"; + when x"192" => DATA <= x"0336"; + when x"193" => DATA <= x"15c0"; + when x"194" => DATA <= x"0007"; + when x"195" => DATA <= x"09f7"; + when x"196" => DATA <= x"0350"; + when x"197" => DATA <= x"0a00"; + when x"198" => DATA <= x"09f7"; + when x"199" => DATA <= x"034a"; + when x"19a" => DATA <= x"09f7"; + when x"19b" => DATA <= x"015c"; + when x"19c" => DATA <= x"65c0"; + when x"19d" => DATA <= x"ff80"; + when x"19e" => DATA <= x"870b"; + when x"19f" => DATA <= x"09f7"; + when x"1a0" => DATA <= x"fd5c"; + when x"1a1" => DATA <= x"0a02"; when x"1a2" => DATA <= x"09f7"; - when x"1a3" => DATA <= x"0308"; - when x"1a4" => DATA <= x"1081"; - when x"1a5" => DATA <= x"15c2"; - when x"1a6" => DATA <= x"0004"; - when x"1a7" => DATA <= x"09f7"; - when x"1a8" => DATA <= x"02e2"; - when x"1a9" => DATA <= x"1580"; - when x"1aa" => DATA <= x"09f7"; - when x"1ab" => DATA <= x"02fe"; - when x"1ac" => DATA <= x"09f7"; - when x"1ad" => DATA <= x"0126"; - when x"1ae" => DATA <= x"1026"; - when x"1af" => DATA <= x"15c2"; - when x"1b0" => DATA <= x"0004"; - when x"1b1" => DATA <= x"09f7"; - when x"1b2" => DATA <= x"02dc"; - when x"1b3" => DATA <= x"1580"; - when x"1b4" => DATA <= x"1581"; - when x"1b5" => DATA <= x"1582"; - when x"1b6" => DATA <= x"0087"; - when x"1b7" => DATA <= x"1026"; - when x"1b8" => DATA <= x"15c0"; - when x"1b9" => DATA <= x"0012"; + when x"1a3" => DATA <= x"014c"; + when x"1a4" => DATA <= x"9011"; + when x"1a5" => DATA <= x"0a82"; + when x"1a6" => DATA <= x"2017"; + when x"1a7" => DATA <= x"000d"; + when x"1a8" => DATA <= x"02f9"; + when x"1a9" => DATA <= x"0ac2"; + when x"1aa" => DATA <= x"0087"; + when x"1ab" => DATA <= x"10a6"; + when x"1ac" => DATA <= x"1066"; + when x"1ad" => DATA <= x"1026"; + when x"1ae" => DATA <= x"15c0"; + when x"1af" => DATA <= x"000c"; + when x"1b0" => DATA <= x"09f7"; + when x"1b1" => DATA <= x"0314"; + when x"1b2" => DATA <= x"1081"; + when x"1b3" => DATA <= x"15c2"; + when x"1b4" => DATA <= x"0004"; + when x"1b5" => DATA <= x"09f7"; + when x"1b6" => DATA <= x"02ee"; + when x"1b7" => DATA <= x"1580"; + when x"1b8" => DATA <= x"09f7"; + when x"1b9" => DATA <= x"030a"; when x"1ba" => DATA <= x"09f7"; - when x"1bb" => DATA <= x"02de"; - when x"1bc" => DATA <= x"1580"; - when x"1bd" => DATA <= x"09f7"; - when x"1be" => DATA <= x"02d8"; - when x"1bf" => DATA <= x"0bc0"; - when x"1c0" => DATA <= x"0206"; - when x"1c1" => DATA <= x"09f7"; - when x"1c2" => DATA <= x"02ce"; + when x"1bb" => DATA <= x"011c"; + when x"1bc" => DATA <= x"1026"; + when x"1bd" => DATA <= x"15c2"; + when x"1be" => DATA <= x"0004"; + when x"1bf" => DATA <= x"0133"; + when x"1c0" => DATA <= x"1026"; + when x"1c1" => DATA <= x"15c0"; + when x"1c2" => DATA <= x"0012"; when x"1c3" => DATA <= x"09f7"; - when x"1c4" => DATA <= x"00f8"; - when x"1c5" => DATA <= x"0a00"; - when x"1c6" => DATA <= x"0087"; - when x"1c7" => DATA <= x"1066"; - when x"1c8" => DATA <= x"09f7"; - when x"1c9" => DATA <= x"0292"; + when x"1c4" => DATA <= x"02f4"; + when x"1c5" => DATA <= x"1580"; + when x"1c6" => DATA <= x"09f7"; + when x"1c7" => DATA <= x"02ee"; + when x"1c8" => DATA <= x"0bc0"; + when x"1c9" => DATA <= x"0206"; when x"1ca" => DATA <= x"09f7"; - when x"1cb" => DATA <= x"00ea"; - when x"1cc" => DATA <= x"1581"; - when x"1cd" => DATA <= x"0087"; - when x"1ce" => DATA <= x"10a6"; - when x"1cf" => DATA <= x"1066"; - when x"1d0" => DATA <= x"1026"; - when x"1d1" => DATA <= x"15c0"; - when x"1d2" => DATA <= x"0014"; + when x"1cb" => DATA <= x"02e4"; + when x"1cc" => DATA <= x"09f7"; + when x"1cd" => DATA <= x"00f8"; + when x"1ce" => DATA <= x"0a00"; + when x"1cf" => DATA <= x"0087"; + when x"1d0" => DATA <= x"1066"; + when x"1d1" => DATA <= x"09f7"; + when x"1d2" => DATA <= x"02a8"; when x"1d3" => DATA <= x"09f7"; - when x"1d4" => DATA <= x"02ac"; - when x"1d5" => DATA <= x"65c1"; - when x"1d6" => DATA <= x"0002"; - when x"1d7" => DATA <= x"15c2"; - when x"1d8" => DATA <= x"0010"; - when x"1d9" => DATA <= x"09f7"; - when x"1da" => DATA <= x"027e"; - when x"1db" => DATA <= x"09f7"; - when x"1dc" => DATA <= x"fce6"; - when x"1dd" => DATA <= x"09f7"; - when x"1de" => DATA <= x"0268"; - when x"1df" => DATA <= x"1580"; - when x"1e0" => DATA <= x"09f7"; - when x"1e1" => DATA <= x"0292"; + when x"1d4" => DATA <= x"00ea"; + when x"1d5" => DATA <= x"1581"; + when x"1d6" => DATA <= x"0087"; + when x"1d7" => DATA <= x"10a6"; + when x"1d8" => DATA <= x"1066"; + when x"1d9" => DATA <= x"1026"; + when x"1da" => DATA <= x"15c0"; + when x"1db" => DATA <= x"0014"; + when x"1dc" => DATA <= x"09f7"; + when x"1dd" => DATA <= x"02c2"; + when x"1de" => DATA <= x"65c1"; + when x"1df" => DATA <= x"0002"; + when x"1e0" => DATA <= x"15c2"; + when x"1e1" => DATA <= x"0010"; when x"1e2" => DATA <= x"09f7"; - when x"1e3" => DATA <= x"00ba"; - when x"1e4" => DATA <= x"1381"; - when x"1e5" => DATA <= x"1026"; - when x"1e6" => DATA <= x"65c1"; - when x"1e7" => DATA <= x"0002"; - when x"1e8" => DATA <= x"15c2"; - when x"1e9" => DATA <= x"0010"; - when x"1ea" => DATA <= x"09f7"; - when x"1eb" => DATA <= x"026a"; - when x"1ec" => DATA <= x"1580"; - when x"1ed" => DATA <= x"1581"; - when x"1ee" => DATA <= x"1582"; - when x"1ef" => DATA <= x"0087"; - when x"1f0" => DATA <= x"8bc9"; - when x"1f1" => DATA <= x"0205"; - when x"1f2" => DATA <= x"0bc0"; - when x"1f3" => DATA <= x"0303"; - when x"1f4" => DATA <= x"2017"; - when x"1f5" => DATA <= x"0005"; - when x"1f6" => DATA <= x"8713"; - when x"1f7" => DATA <= x"10a6"; - when x"1f8" => DATA <= x"1026"; - when x"1f9" => DATA <= x"15c0"; - when x"1fa" => DATA <= x"0016"; - when x"1fb" => DATA <= x"09f7"; - when x"1fc" => DATA <= x"025c"; - when x"1fd" => DATA <= x"15c2"; - when x"1fe" => DATA <= x"000d"; - when x"1ff" => DATA <= x"09f7"; - when x"200" => DATA <= x"0232"; - when x"201" => DATA <= x"1580"; - when x"202" => DATA <= x"09f7"; - when x"203" => DATA <= x"024e"; - when x"204" => DATA <= x"15c2"; - when x"205" => DATA <= x"000d"; - when x"206" => DATA <= x"09f7"; - when x"207" => DATA <= x"0232"; - when x"208" => DATA <= x"1582"; - when x"209" => DATA <= x"0133"; - when x"20a" => DATA <= x"10a6"; - when x"20b" => DATA <= x"1026"; - when x"20c" => DATA <= x"1066"; - when x"20d" => DATA <= x"0a81"; - when x"20e" => DATA <= x"09f7"; - when x"20f" => DATA <= x"fc84"; - when x"210" => DATA <= x"1042"; - when x"211" => DATA <= x"1581"; - when x"212" => DATA <= x"2397"; - when x"213" => DATA <= x"0003"; - when x"214" => DATA <= x"8604"; - when x"215" => DATA <= x"9480"; - when x"216" => DATA <= x"09f7"; - when x"217" => DATA <= x"008c"; - when x"218" => DATA <= x"0104"; - when x"219" => DATA <= x"09f7"; - when x"21a" => DATA <= x"003e"; - when x"21b" => DATA <= x"870d"; - when x"21c" => DATA <= x"9012"; - when x"21d" => DATA <= x"8bf1"; - when x"21e" => DATA <= x"0005"; - when x"21f" => DATA <= x"0202"; - when x"220" => DATA <= x"8af1"; - when x"221" => DATA <= x"0006"; - when x"222" => DATA <= x"8af1"; - when x"223" => DATA <= x"0005"; - when x"224" => DATA <= x"02ed"; - when x"225" => DATA <= x"8bf1"; - when x"226" => DATA <= x"0006"; - when x"227" => DATA <= x"02ea"; - when x"228" => DATA <= x"00a1"; - when x"229" => DATA <= x"90b1"; - when x"22a" => DATA <= x"0001"; - when x"22b" => DATA <= x"00c2"; - when x"22c" => DATA <= x"90b1"; - when x"22d" => DATA <= x"0002"; - when x"22e" => DATA <= x"0bd6"; - when x"22f" => DATA <= x"1582"; - when x"230" => DATA <= x"15c0"; - when x"231" => DATA <= x"0000"; - when x"232" => DATA <= x"0087"; - when x"233" => DATA <= x"0bc1"; - when x"234" => DATA <= x"0305"; - when x"235" => DATA <= x"15c0"; - when x"236" => DATA <= x"000e"; - when x"237" => DATA <= x"09f7"; - when x"238" => DATA <= x"01de"; - when x"239" => DATA <= x"0103"; - when x"23a" => DATA <= x"0a00"; - when x"23b" => DATA <= x"09f7"; - when x"23c" => DATA <= x"01dc"; - when x"23d" => DATA <= x"09f7"; - when x"23e" => DATA <= x"0004"; - when x"23f" => DATA <= x"65c0"; - when x"240" => DATA <= x"ff80"; - when x"241" => DATA <= x"97c0"; - when x"242" => DATA <= x"fff4"; - when x"243" => DATA <= x"80fd"; - when x"244" => DATA <= x"97c0"; - when x"245" => DATA <= x"fff6"; - when x"246" => DATA <= x"0087"; - when x"247" => DATA <= x"0bc1"; - when x"248" => DATA <= x"0315"; - when x"249" => DATA <= x"1026"; - when x"24a" => DATA <= x"15c0"; - when x"24b" => DATA <= x"0010"; - when x"24c" => DATA <= x"09f7"; - when x"24d" => DATA <= x"01b4"; - when x"24e" => DATA <= x"1380"; - when x"24f" => DATA <= x"09f7"; - when x"250" => DATA <= x"01b4"; - when x"251" => DATA <= x"09f7"; - when x"252" => DATA <= x"ffdc"; - when x"253" => DATA <= x"1580"; - when x"254" => DATA <= x"0087"; - when x"255" => DATA <= x"25c0"; - when x"256" => DATA <= x"000d"; - when x"257" => DATA <= x"0206"; - when x"258" => DATA <= x"15c0"; - when x"259" => DATA <= x"000a"; + when x"1e3" => DATA <= x"0294"; + when x"1e4" => DATA <= x"09f7"; + when x"1e5" => DATA <= x"fcd2"; + when x"1e6" => DATA <= x"09f7"; + when x"1e7" => DATA <= x"027e"; + when x"1e8" => DATA <= x"1580"; + when x"1e9" => DATA <= x"09f7"; + when x"1ea" => DATA <= x"02a8"; + when x"1eb" => DATA <= x"09f7"; + when x"1ec" => DATA <= x"00ba"; + when x"1ed" => DATA <= x"1381"; + when x"1ee" => DATA <= x"1026"; + when x"1ef" => DATA <= x"65c1"; + when x"1f0" => DATA <= x"0002"; + when x"1f1" => DATA <= x"15c2"; + when x"1f2" => DATA <= x"0010"; + when x"1f3" => DATA <= x"09f7"; + when x"1f4" => DATA <= x"0280"; + when x"1f5" => DATA <= x"1580"; + when x"1f6" => DATA <= x"1581"; + when x"1f7" => DATA <= x"1582"; + when x"1f8" => DATA <= x"0087"; + when x"1f9" => DATA <= x"8bc9"; + when x"1fa" => DATA <= x"0205"; + when x"1fb" => DATA <= x"0bc0"; + when x"1fc" => DATA <= x"0303"; + when x"1fd" => DATA <= x"2017"; + when x"1fe" => DATA <= x"0005"; + when x"1ff" => DATA <= x"8713"; + when x"200" => DATA <= x"10a6"; + when x"201" => DATA <= x"1026"; + when x"202" => DATA <= x"15c0"; + when x"203" => DATA <= x"0016"; + when x"204" => DATA <= x"09f7"; + when x"205" => DATA <= x"0272"; + when x"206" => DATA <= x"15c2"; + when x"207" => DATA <= x"000d"; + when x"208" => DATA <= x"09f7"; + when x"209" => DATA <= x"0248"; + when x"20a" => DATA <= x"1580"; + when x"20b" => DATA <= x"09f7"; + when x"20c" => DATA <= x"0264"; + when x"20d" => DATA <= x"15c2"; + when x"20e" => DATA <= x"000d"; + when x"20f" => DATA <= x"09f7"; + when x"210" => DATA <= x"0248"; + when x"211" => DATA <= x"1582"; + when x"212" => DATA <= x"0133"; + when x"213" => DATA <= x"10a6"; + when x"214" => DATA <= x"1026"; + when x"215" => DATA <= x"1066"; + when x"216" => DATA <= x"0a81"; + when x"217" => DATA <= x"09f7"; + when x"218" => DATA <= x"fc70"; + when x"219" => DATA <= x"1042"; + when x"21a" => DATA <= x"1581"; + when x"21b" => DATA <= x"2397"; + when x"21c" => DATA <= x"0003"; + when x"21d" => DATA <= x"8604"; + when x"21e" => DATA <= x"9480"; + when x"21f" => DATA <= x"09f7"; + when x"220" => DATA <= x"008c"; + when x"221" => DATA <= x"0104"; + when x"222" => DATA <= x"09f7"; + when x"223" => DATA <= x"003e"; + when x"224" => DATA <= x"870d"; + when x"225" => DATA <= x"9012"; + when x"226" => DATA <= x"8bf1"; + when x"227" => DATA <= x"0005"; + when x"228" => DATA <= x"0202"; + when x"229" => DATA <= x"8af1"; + when x"22a" => DATA <= x"0006"; + when x"22b" => DATA <= x"8af1"; + when x"22c" => DATA <= x"0005"; + when x"22d" => DATA <= x"02ed"; + when x"22e" => DATA <= x"8bf1"; + when x"22f" => DATA <= x"0006"; + when x"230" => DATA <= x"02ea"; + when x"231" => DATA <= x"00a1"; + when x"232" => DATA <= x"90b1"; + when x"233" => DATA <= x"0001"; + when x"234" => DATA <= x"00c2"; + when x"235" => DATA <= x"90b1"; + when x"236" => DATA <= x"0002"; + when x"237" => DATA <= x"0bd6"; + when x"238" => DATA <= x"1582"; + when x"239" => DATA <= x"15c0"; + when x"23a" => DATA <= x"0000"; + when x"23b" => DATA <= x"0087"; + when x"23c" => DATA <= x"0bc1"; + when x"23d" => DATA <= x"0305"; + when x"23e" => DATA <= x"15c0"; + when x"23f" => DATA <= x"000e"; + when x"240" => DATA <= x"09f7"; + when x"241" => DATA <= x"01f4"; + when x"242" => DATA <= x"0103"; + when x"243" => DATA <= x"0a00"; + when x"244" => DATA <= x"09f7"; + when x"245" => DATA <= x"01f2"; + when x"246" => DATA <= x"09f7"; + when x"247" => DATA <= x"0004"; + when x"248" => DATA <= x"65c0"; + when x"249" => DATA <= x"ff80"; + when x"24a" => DATA <= x"97c0"; + when x"24b" => DATA <= x"fff4"; + when x"24c" => DATA <= x"80fd"; + when x"24d" => DATA <= x"97c0"; + when x"24e" => DATA <= x"fff6"; + when x"24f" => DATA <= x"0087"; + when x"250" => DATA <= x"0bc1"; + when x"251" => DATA <= x"0315"; + when x"252" => DATA <= x"1026"; + when x"253" => DATA <= x"15c0"; + when x"254" => DATA <= x"0010"; + when x"255" => DATA <= x"09f7"; + when x"256" => DATA <= x"01ca"; + when x"257" => DATA <= x"1380"; + when x"258" => DATA <= x"09f7"; + when x"259" => DATA <= x"01ca"; when x"25a" => DATA <= x"09f7"; - when x"25b" => DATA <= x"0004"; - when x"25c" => DATA <= x"15c0"; - when x"25d" => DATA <= x"000d"; - when x"25e" => DATA <= x"1026"; - when x"25f" => DATA <= x"97c0"; - when x"260" => DATA <= x"fff0"; - when x"261" => DATA <= x"45c0"; - when x"262" => DATA <= x"00bf"; - when x"263" => DATA <= x"03fb"; - when x"264" => DATA <= x"1580"; - when x"265" => DATA <= x"901f"; - when x"266" => DATA <= x"fff2"; - when x"267" => DATA <= x"0087"; - when x"268" => DATA <= x"45f6"; + when x"25b" => DATA <= x"ffdc"; + when x"25c" => DATA <= x"1580"; + when x"25d" => DATA <= x"0087"; + when x"25e" => DATA <= x"25c0"; + when x"25f" => DATA <= x"000d"; + when x"260" => DATA <= x"0206"; + when x"261" => DATA <= x"15c0"; + when x"262" => DATA <= x"000a"; + when x"263" => DATA <= x"09f7"; + when x"264" => DATA <= x"0004"; + when x"265" => DATA <= x"15c0"; + when x"266" => DATA <= x"000d"; + when x"267" => DATA <= x"1026"; + when x"268" => DATA <= x"97c0"; when x"269" => DATA <= x"fff0"; - when x"26a" => DATA <= x"0002"; - when x"26b" => DATA <= x"17e6"; - when x"26c" => DATA <= x"f5e8"; - when x"26d" => DATA <= x"17e6"; - when x"26e" => DATA <= x"f5f4"; - when x"26f" => DATA <= x"119f"; - when x"270" => DATA <= x"f5f4"; - when x"271" => DATA <= x"15df"; - when x"272" => DATA <= x"fd1a"; - when x"273" => DATA <= x"f5e8"; - when x"274" => DATA <= x"1026"; - when x"275" => DATA <= x"1026"; - when x"276" => DATA <= x"1d80"; - when x"277" => DATA <= x"0008"; - when x"278" => DATA <= x"1c00"; - when x"279" => DATA <= x"fffe"; - when x"27a" => DATA <= x"45c0"; - when x"27b" => DATA <= x"ff00"; - when x"27c" => DATA <= x"6000"; - when x"27d" => DATA <= x"67c0"; - when x"27e" => DATA <= x"f5f6"; - when x"27f" => DATA <= x"1236"; - when x"280" => DATA <= x"0002"; - when x"281" => DATA <= x"1580"; - when x"282" => DATA <= x"09de"; - when x"283" => DATA <= x"8509"; - when x"284" => DATA <= x"8603"; - when x"285" => DATA <= x"55f6"; - when x"286" => DATA <= x"0001"; - when x"287" => DATA <= x"0006"; - when x"288" => DATA <= x"159f"; - when x"289" => DATA <= x"f5f4"; - when x"28a" => DATA <= x"159f"; - when x"28b" => DATA <= x"f5e8"; + when x"26a" => DATA <= x"45c0"; + when x"26b" => DATA <= x"00bf"; + when x"26c" => DATA <= x"03fb"; + when x"26d" => DATA <= x"1580"; + when x"26e" => DATA <= x"901f"; + when x"26f" => DATA <= x"fff2"; + when x"270" => DATA <= x"0087"; + when x"271" => DATA <= x"880f"; + when x"272" => DATA <= x"42ff"; + when x"273" => DATA <= x"6461"; + when x"274" => DATA <= x"0000"; + when x"275" => DATA <= x"45f6"; + when x"276" => DATA <= x"fff0"; + when x"277" => DATA <= x"0002"; + when x"278" => DATA <= x"17e6"; + when x"279" => DATA <= x"f5e0"; + when x"27a" => DATA <= x"17e6"; + when x"27b" => DATA <= x"f5ec"; + when x"27c" => DATA <= x"119f"; + when x"27d" => DATA <= x"f5ec"; + when x"27e" => DATA <= x"15df"; + when x"27f" => DATA <= x"fd20"; + when x"280" => DATA <= x"f5e0"; + when x"281" => DATA <= x"0be6"; + when x"282" => DATA <= x"1026"; + when x"283" => DATA <= x"1d80"; + when x"284" => DATA <= x"0008"; + when x"285" => DATA <= x"1800"; + when x"286" => DATA <= x"45c0"; + when x"287" => DATA <= x"ff00"; + when x"288" => DATA <= x"6000"; + when x"289" => DATA <= x"67c0"; + when x"28a" => DATA <= x"f5ee"; + when x"28b" => DATA <= x"1236"; when x"28c" => DATA <= x"0002"; - when x"28d" => DATA <= x"17c6"; - when x"28e" => DATA <= x"f5f4"; - when x"28f" => DATA <= x"55f6"; - when x"290" => DATA <= x"0002"; - when x"291" => DATA <= x"0006"; - when x"292" => DATA <= x"01f5"; - when x"293" => DATA <= x"0bd6"; - when x"294" => DATA <= x"159f"; - when x"295" => DATA <= x"f5f4"; - when x"296" => DATA <= x"159f"; - when x"297" => DATA <= x"f5e8"; - when x"298" => DATA <= x"1380"; - when x"299" => DATA <= x"17ce"; - when x"29a" => DATA <= x"f5e8"; - when x"29b" => DATA <= x"0002"; - when x"29c" => DATA <= x"0bd6"; - when x"29d" => DATA <= x"159f"; - when x"29e" => DATA <= x"f5f4"; - when x"29f" => DATA <= x"159f"; - when x"2a0" => DATA <= x"f5e8"; - when x"2a1" => DATA <= x"1026"; - when x"2a2" => DATA <= x"810d"; - when x"2a3" => DATA <= x"2017"; - when x"2a4" => DATA <= x"0100"; - when x"2a5" => DATA <= x"8608"; - when x"2a6" => DATA <= x"6000"; - when x"2a7" => DATA <= x"67c0"; - when x"2a8" => DATA <= x"f5f6"; - when x"2a9" => DATA <= x"1226"; - when x"2aa" => DATA <= x"0bc1"; - when x"2ab" => DATA <= x"0301"; - when x"2ac" => DATA <= x"1048"; - when x"2ad" => DATA <= x"1581"; - when x"2ae" => DATA <= x"1580"; - when x"2af" => DATA <= x"0002"; - when x"2b0" => DATA <= x"0a40"; - when x"2b1" => DATA <= x"2017"; - when x"2b2" => DATA <= x"0006"; - when x"2b3" => DATA <= x"86fa"; - when x"2b4" => DATA <= x"6000"; - when x"2b5" => DATA <= x"6000"; - when x"2b6" => DATA <= x"65c0"; - when x"2b7" => DATA <= x"f5e0"; - when x"2b8" => DATA <= x"1226"; - when x"2b9" => DATA <= x"0bc1"; - when x"2ba" => DATA <= x"0301"; - when x"2bb" => DATA <= x"1048"; - when x"2bc" => DATA <= x"0bd0"; - when x"2bd" => DATA <= x"1226"; - when x"2be" => DATA <= x"0bc2"; - when x"2bf" => DATA <= x"0301"; - when x"2c0" => DATA <= x"1088"; - when x"2c1" => DATA <= x"1582"; - when x"2c2" => DATA <= x"1581"; - when x"2c3" => DATA <= x"1580"; - when x"2c4" => DATA <= x"0002"; - when x"2c5" => DATA <= x"2017"; - when x"2c6" => DATA <= x"0001"; - when x"2c7" => DATA <= x"0306"; - when x"2c8" => DATA <= x"2017"; - when x"2c9" => DATA <= x"0002"; - when x"2ca" => DATA <= x"0314"; - when x"2cb" => DATA <= x"0087"; - when x"2cc" => DATA <= x"007f"; - when x"2cd" => DATA <= x"f844"; - when x"2ce" => DATA <= x"15df"; - when x"2cf" => DATA <= x"fcd0"; - when x"2d0" => DATA <= x"0018"; - when x"2d1" => DATA <= x"0a1f"; - when x"2d2" => DATA <= x"001a"; - when x"2d3" => DATA <= x"15df"; - when x"2d4" => DATA <= x"ffd4"; - when x"2d5" => DATA <= x"0080"; - when x"2d6" => DATA <= x"15df"; - when x"2d7" => DATA <= x"00e0"; - when x"2d8" => DATA <= x"0082"; - when x"2d9" => DATA <= x"15df"; - when x"2da" => DATA <= x"fe82"; - when x"2db" => DATA <= x"0084"; - when x"2dc" => DATA <= x"15df"; - when x"2dd" => DATA <= x"00c0"; - when x"2de" => DATA <= x"0086"; - when x"2df" => DATA <= x"15c2"; - when x"2e0" => DATA <= x"f5e0"; - when x"2e1" => DATA <= x"15c1"; - when x"2e2" => DATA <= x"fde4"; - when x"2e3" => DATA <= x"15c0"; - when x"2e4" => DATA <= x"0020"; - when x"2e5" => DATA <= x"17e6"; - when x"2e6" => DATA <= x"f5fc"; - when x"2e7" => DATA <= x"1452"; - when x"2e8" => DATA <= x"0ac0"; - when x"2e9" => DATA <= x"02fd"; - when x"2ea" => DATA <= x"159f"; - when x"2eb" => DATA <= x"f5fc"; - when x"2ec" => DATA <= x"15c0"; - when x"2ed" => DATA <= x"00f0"; - when x"2ee" => DATA <= x"1252"; - when x"2ef" => DATA <= x"0ac0"; - when x"2f0" => DATA <= x"02fd"; - when x"2f1" => DATA <= x"0087"; - when x"2f2" => DATA <= x"f83c"; - when x"2f3" => DATA <= x"0000"; - when x"2f4" => DATA <= x"f898"; - when x"2f5" => DATA <= x"f5ff"; - when x"2f6" => DATA <= x"f882"; - when x"2f7" => DATA <= x"f500"; - when x"2f8" => DATA <= x"fd96"; - when x"2f9" => DATA <= x"0100"; - when x"2fa" => DATA <= x"feba"; - when x"2fb" => DATA <= x"f500"; - when x"2fc" => DATA <= x"0000"; - when x"2fd" => DATA <= x"f600"; - when x"2fe" => DATA <= x"0000"; - when x"2ff" => DATA <= x"0000"; - when x"300" => DATA <= x"f81c"; - when x"301" => DATA <= x"0000"; - when x"302" => DATA <= x"fd98"; - when x"303" => DATA <= x"f8c0"; - when x"304" => DATA <= x"f9c6"; - when x"305" => DATA <= x"fa58"; - when x"306" => DATA <= x"fcbc"; - when x"307" => DATA <= x"fcb0"; - when x"308" => DATA <= x"fc74"; - when x"309" => DATA <= x"fb9c"; - when x"30a" => DATA <= x"fb3a"; - when x"30b" => DATA <= x"fc66"; - when x"30c" => DATA <= x"fc8e"; - when x"30d" => DATA <= x"fbe0"; - when x"30e" => DATA <= x"fb6e"; - when x"30f" => DATA <= x"fd8a"; - when x"310" => DATA <= x"fd38"; - when x"311" => DATA <= x"fd26"; - when x"312" => DATA <= x"fd96"; - when x"313" => DATA <= x"9440"; - when x"314" => DATA <= x"09f7"; - when x"315" => DATA <= x"002a"; - when x"316" => DATA <= x"2017"; - when x"317" => DATA <= x"000d"; - when x"318" => DATA <= x"02fa"; - when x"319" => DATA <= x"0087"; - when x"31a" => DATA <= x"6081"; - when x"31b" => DATA <= x"9840"; - when x"31c" => DATA <= x"09f7"; - when x"31d" => DATA <= x"001a"; - when x"31e" => DATA <= x"0ac2"; - when x"31f" => DATA <= x"02fb"; - when x"320" => DATA <= x"0087"; - when x"321" => DATA <= x"6081"; - when x"322" => DATA <= x"09f7"; - when x"323" => DATA <= x"fe3a"; - when x"324" => DATA <= x"9021"; - when x"325" => DATA <= x"0ac2"; - when x"326" => DATA <= x"02fb"; - when x"327" => DATA <= x"0087"; + when x"28d" => DATA <= x"1580"; + when x"28e" => DATA <= x"09de"; + when x"28f" => DATA <= x"8405"; + when x"290" => DATA <= x"17c6"; + when x"291" => DATA <= x"f5ec"; + when x"292" => DATA <= x"55f6"; + when x"293" => DATA <= x"0002"; + when x"294" => DATA <= x"0006"; + when x"295" => DATA <= x"8603"; + when x"296" => DATA <= x"55f6"; + when x"297" => DATA <= x"0001"; + when x"298" => DATA <= x"0006"; + when x"299" => DATA <= x"159f"; + when x"29a" => DATA <= x"f5ec"; + when x"29b" => DATA <= x"159f"; + when x"29c" => DATA <= x"f5e0"; + when x"29d" => DATA <= x"0002"; + when x"29e" => DATA <= x"1d80"; + when x"29f" => DATA <= x"0006"; + when x"2a0" => DATA <= x"1db6"; -- was 17f6 + when x"2a1" => DATA <= x"0004"; -- was f5e0 + when x"2a2" => DATA <= x"0006"; + when x"2a3" => DATA <= x"0087"; + when x"2a4" => DATA <= x"0bd6"; + when x"2a5" => DATA <= x"159f"; + when x"2a6" => DATA <= x"f5ec"; + when x"2a7" => DATA <= x"159f"; + when x"2a8" => DATA <= x"f5e0"; + when x"2a9" => DATA <= x"1026"; + when x"2aa" => DATA <= x"810b"; + when x"2ab" => DATA <= x"2017"; + when x"2ac" => DATA <= x"0100"; + when x"2ad" => DATA <= x"861b"; + when x"2ae" => DATA <= x"6000"; + when x"2af" => DATA <= x"67c0"; + when x"2b0" => DATA <= x"f5ee"; + when x"2b1" => DATA <= x"1226"; + when x"2b2" => DATA <= x"0bc1"; + when x"2b3" => DATA <= x"0314"; + when x"2b4" => DATA <= x"1048"; + when x"2b5" => DATA <= x"0112"; + when x"2b6" => DATA <= x"0a40"; + when x"2b7" => DATA <= x"2017"; + when x"2b8" => DATA <= x"0006"; + when x"2b9" => DATA <= x"860f"; + when x"2ba" => DATA <= x"6000"; + when x"2bb" => DATA <= x"6000"; + when x"2bc" => DATA <= x"65c0"; + when x"2bd" => DATA <= x"f5d8"; + when x"2be" => DATA <= x"1226"; + when x"2bf" => DATA <= x"0bc1"; + when x"2c0" => DATA <= x"0301"; + when x"2c1" => DATA <= x"1048"; + when x"2c2" => DATA <= x"0bd0"; + when x"2c3" => DATA <= x"1226"; + when x"2c4" => DATA <= x"0bc2"; + when x"2c5" => DATA <= x"0301"; + when x"2c6" => DATA <= x"1088"; + when x"2c7" => DATA <= x"1582"; + when x"2c8" => DATA <= x"1581"; + when x"2c9" => DATA <= x"1580"; + when x"2ca" => DATA <= x"0002"; + when x"2cb" => DATA <= x"0bc0"; + when x"2cc" => DATA <= x"0306"; + when x"2cd" => DATA <= x"2017"; + when x"2ce" => DATA <= x"0001"; + when x"2cf" => DATA <= x"0306"; + when x"2d0" => DATA <= x"2017"; + when x"2d1" => DATA <= x"0004"; + when x"2d2" => DATA <= x"871c"; + when x"2d3" => DATA <= x"0087"; + when x"2d4" => DATA <= x"007f"; + when x"2d5" => DATA <= x"f82c"; + when x"2d6" => DATA <= x"0a00"; + when x"2d7" => DATA <= x"15d0"; + when x"2d8" => DATA <= x"ffda"; + when x"2d9" => DATA <= x"0a10"; + when x"2da" => DATA <= x"2017"; + when x"2db" => DATA <= x"0100"; + when x"2dc" => DATA <= x"02fa"; + when x"2dd" => DATA <= x"15df"; + when x"2de" => DATA <= x"fce2"; + when x"2df" => DATA <= x"001c"; + when x"2e0" => DATA <= x"15df"; + when x"2e1" => DATA <= x"fcea"; + when x"2e2" => DATA <= x"0018"; + when x"2e3" => DATA <= x"15df"; + when x"2e4" => DATA <= x"ffd6"; + when x"2e5" => DATA <= x"0080"; + when x"2e6" => DATA <= x"15df"; + when x"2e7" => DATA <= x"00e0"; + when x"2e8" => DATA <= x"0082"; + when x"2e9" => DATA <= x"15df"; + when x"2ea" => DATA <= x"feaa"; + when x"2eb" => DATA <= x"0084"; + when x"2ec" => DATA <= x"15df"; + when x"2ed" => DATA <= x"00c0"; + when x"2ee" => DATA <= x"0086"; + when x"2ef" => DATA <= x"15c2"; + when x"2f0" => DATA <= x"f5d8"; + when x"2f1" => DATA <= x"15c1"; + when x"2f2" => DATA <= x"fe04"; + when x"2f3" => DATA <= x"15c0"; + when x"2f4" => DATA <= x"0024"; + when x"2f5" => DATA <= x"17e6"; + when x"2f6" => DATA <= x"f5fc"; + when x"2f7" => DATA <= x"1452"; + when x"2f8" => DATA <= x"0ac0"; + when x"2f9" => DATA <= x"02fd"; + when x"2fa" => DATA <= x"159f"; + when x"2fb" => DATA <= x"f5fc"; + when x"2fc" => DATA <= x"15c0"; + when x"2fd" => DATA <= x"00f0"; + when x"2fe" => DATA <= x"1252"; + when x"2ff" => DATA <= x"0ac0"; + when x"300" => DATA <= x"02fd"; + when x"301" => DATA <= x"0087"; + when x"302" => DATA <= x"f83c"; + when x"303" => DATA <= x"0000"; + when x"304" => DATA <= x"f896"; + when x"305" => DATA <= x"f5ff"; + when x"306" => DATA <= x"f880"; + when x"307" => DATA <= x"f500"; + when x"308" => DATA <= x"fda6"; + when x"309" => DATA <= x"0000"; + when x"30a" => DATA <= x"ffda"; + when x"30b" => DATA <= x"0000"; + when x"30c" => DATA <= x"0000"; + when x"30d" => DATA <= x"f600"; + when x"30e" => DATA <= x"0000"; + when x"30f" => DATA <= x"f804"; + when x"310" => DATA <= x"0100"; + when x"311" => DATA <= x"f500"; + when x"312" => DATA <= x"0000"; + when x"313" => DATA <= x"0000"; + when x"314" => DATA <= x"f81c"; + when x"315" => DATA <= x"0000"; + when x"316" => DATA <= x"fda8"; + when x"317" => DATA <= x"f8be"; + when x"318" => DATA <= x"f9f0"; + when x"319" => DATA <= x"fa74"; + when x"31a" => DATA <= x"fcce"; + when x"31b" => DATA <= x"fcc2"; + when x"31c" => DATA <= x"fc86"; + when x"31d" => DATA <= x"fbae"; + when x"31e" => DATA <= x"fb56"; + when x"31f" => DATA <= x"fc78"; + when x"320" => DATA <= x"fca0"; + when x"321" => DATA <= x"fbf2"; + when x"322" => DATA <= x"fb80"; + when x"323" => DATA <= x"fd96"; + when x"324" => DATA <= x"fd48"; + when x"325" => DATA <= x"fd3c"; + when x"326" => DATA <= x"fda6"; + when x"327" => DATA <= x"9440"; when x"328" => DATA <= x"09f7"; - when x"329" => DATA <= x"0002"; - when x"32a" => DATA <= x"1040"; - when x"32b" => DATA <= x"1026"; - when x"32c" => DATA <= x"97c0"; - when x"32d" => DATA <= x"fff4"; - when x"32e" => DATA <= x"45c0"; - when x"32f" => DATA <= x"00bf"; - when x"330" => DATA <= x"03fb"; - when x"331" => DATA <= x"1580"; - when x"332" => DATA <= x"901f"; - when x"333" => DATA <= x"fff6"; + when x"329" => DATA <= x"002a"; + when x"32a" => DATA <= x"2017"; + when x"32b" => DATA <= x"000d"; + when x"32c" => DATA <= x"02fa"; + when x"32d" => DATA <= x"0087"; + when x"32e" => DATA <= x"6081"; + when x"32f" => DATA <= x"9840"; + when x"330" => DATA <= x"09f7"; + when x"331" => DATA <= x"001a"; + when x"332" => DATA <= x"0ac2"; + when x"333" => DATA <= x"02fb"; when x"334" => DATA <= x"0087"; - when x"335" => DATA <= x"97c0"; - when x"336" => DATA <= x"fff0"; - when x"337" => DATA <= x"80fd"; - when x"338" => DATA <= x"97c0"; - when x"339" => DATA <= x"fff2"; - when x"33a" => DATA <= x"0087"; - when x"33b" => DATA <= x"97c0"; - when x"33c" => DATA <= x"fffc"; - when x"33d" => DATA <= x"80fd"; - when x"33e" => DATA <= x"97c0"; - when x"33f" => DATA <= x"fffe"; - when x"340" => DATA <= x"0087"; - when x"341" => DATA <= x"1026"; - when x"342" => DATA <= x"97c0"; - when x"343" => DATA <= x"fffc"; - when x"344" => DATA <= x"811d"; - when x"345" => DATA <= x"97c0"; - when x"346" => DATA <= x"fff0"; - when x"347" => DATA <= x"8103"; - when x"348" => DATA <= x"1580"; - when x"349" => DATA <= x"007f"; - when x"34a" => DATA <= x"f75a"; - when x"34b" => DATA <= x"97c0"; - when x"34c" => DATA <= x"fff2"; - when x"34d" => DATA <= x"8110"; - when x"34e" => DATA <= x"1066"; - when x"34f" => DATA <= x"10a6"; - when x"350" => DATA <= x"09f7"; - when x"351" => DATA <= x"ffc6"; - when x"352" => DATA <= x"1002"; - when x"353" => DATA <= x"09f7"; - when x"354" => DATA <= x"ffc0"; - when x"355" => DATA <= x"1001"; - when x"356" => DATA <= x"09f7"; - when x"357" => DATA <= x"ffba"; - when x"358" => DATA <= x"09ff"; - when x"359" => DATA <= x"f738"; - when x"35a" => DATA <= x"1582"; - when x"35b" => DATA <= x"1581"; + when x"335" => DATA <= x"6081"; + when x"336" => DATA <= x"09f7"; + when x"337" => DATA <= x"fe24"; + when x"338" => DATA <= x"9021"; + when x"339" => DATA <= x"0ac2"; + when x"33a" => DATA <= x"02fb"; + when x"33b" => DATA <= x"0087"; + when x"33c" => DATA <= x"09f7"; + when x"33d" => DATA <= x"0002"; + when x"33e" => DATA <= x"1040"; + when x"33f" => DATA <= x"1026"; + when x"340" => DATA <= x"97c0"; + when x"341" => DATA <= x"fff4"; + when x"342" => DATA <= x"45c0"; + when x"343" => DATA <= x"00bf"; + when x"344" => DATA <= x"03fb"; + when x"345" => DATA <= x"1580"; + when x"346" => DATA <= x"901f"; + when x"347" => DATA <= x"fff6"; + when x"348" => DATA <= x"0087"; + when x"349" => DATA <= x"97c0"; + when x"34a" => DATA <= x"fff0"; + when x"34b" => DATA <= x"80fd"; + when x"34c" => DATA <= x"97c0"; + when x"34d" => DATA <= x"fff2"; + when x"34e" => DATA <= x"0087"; + when x"34f" => DATA <= x"97c0"; + when x"350" => DATA <= x"fffc"; + when x"351" => DATA <= x"80fd"; + when x"352" => DATA <= x"97c0"; + when x"353" => DATA <= x"fffe"; + when x"354" => DATA <= x"0087"; + when x"355" => DATA <= x"1026"; + when x"356" => DATA <= x"97c0"; + when x"357" => DATA <= x"fffc"; + when x"358" => DATA <= x"811c"; + when x"359" => DATA <= x"97c0"; + when x"35a" => DATA <= x"fff0"; + when x"35b" => DATA <= x"8103"; when x"35c" => DATA <= x"1580"; - when x"35d" => DATA <= x"0002"; - when x"35e" => DATA <= x"09ff"; - when x"35f" => DATA <= x"f724"; - when x"360" => DATA <= x"1580"; - when x"361" => DATA <= x"0002"; - when x"362" => DATA <= x"97c0"; - when x"363" => DATA <= x"fffe"; - when x"364" => DATA <= x"8016"; - when x"365" => DATA <= x"1066"; - when x"366" => DATA <= x"09f7"; - when x"367" => DATA <= x"fdb2"; - when x"368" => DATA <= x"17c1"; - when x"369" => DATA <= x"f5ea"; + when x"35d" => DATA <= x"007f"; + when x"35e" => DATA <= x"f72a"; + when x"35f" => DATA <= x"97c0"; + when x"360" => DATA <= x"fff2"; + when x"361" => DATA <= x"8110"; + when x"362" => DATA <= x"1066"; + when x"363" => DATA <= x"10a6"; + when x"364" => DATA <= x"09f7"; + when x"365" => DATA <= x"ffc6"; + when x"366" => DATA <= x"1002"; + when x"367" => DATA <= x"09f7"; + when x"368" => DATA <= x"ffc0"; + when x"369" => DATA <= x"1001"; when x"36a" => DATA <= x"09f7"; - when x"36b" => DATA <= x"fdaa"; - when x"36c" => DATA <= x"9011"; - when x"36d" => DATA <= x"09f7"; - when x"36e" => DATA <= x"fda4"; - when x"36f" => DATA <= x"9011"; - when x"370" => DATA <= x"02fc"; - when x"371" => DATA <= x"1581"; - when x"372" => DATA <= x"1580"; - when x"373" => DATA <= x"17c0"; - when x"374" => DATA <= x"f5ea"; - when x"375" => DATA <= x"17ce"; - when x"376" => DATA <= x"f5e8"; - when x"377" => DATA <= x"0002"; - when x"378" => DATA <= x"1580"; - when x"379" => DATA <= x"007f"; - when x"37a" => DATA <= x"f6f2"; - when x"37b" => DATA <= x"1026"; - when x"37c" => DATA <= x"09f7"; - when x"37d" => DATA <= x"ff7a"; - when x"37e" => DATA <= x"1580"; - when x"37f" => DATA <= x"2017"; - when x"380" => DATA <= x"0005"; - when x"381" => DATA <= x"0332"; - when x"382" => DATA <= x"1026"; - when x"383" => DATA <= x"09f7"; - when x"384" => DATA <= x"ff6c"; - when x"385" => DATA <= x"901f"; - when x"386" => DATA <= x"f5fb"; - when x"387" => DATA <= x"09f7"; - when x"388" => DATA <= x"ff64"; - when x"389" => DATA <= x"901f"; - when x"38a" => DATA <= x"f5fa"; - when x"38b" => DATA <= x"09f7"; - when x"38c" => DATA <= x"ff5c"; - when x"38d" => DATA <= x"901f"; - when x"38e" => DATA <= x"f5f9"; - when x"38f" => DATA <= x"09f7"; - when x"390" => DATA <= x"ff54"; - when x"391" => DATA <= x"901f"; - when x"392" => DATA <= x"f5f8"; - when x"393" => DATA <= x"97c0"; - when x"394" => DATA <= x"fffa"; - when x"395" => DATA <= x"97c0"; - when x"396" => DATA <= x"fffa"; - when x"397" => DATA <= x"09f7"; - when x"398" => DATA <= x"ff44"; - when x"399" => DATA <= x"1580"; - when x"39a" => DATA <= x"6000"; - when x"39b" => DATA <= x"1c1f"; - when x"39c" => DATA <= x"ffda"; - when x"39d" => DATA <= x"0080"; - when x"39e" => DATA <= x"1066"; - when x"39f" => DATA <= x"15c1"; - when x"3a0" => DATA <= x"0100"; - when x"3a1" => DATA <= x"2017"; - when x"3a2" => DATA <= x"000c"; - when x"3a3" => DATA <= x"870f"; - when x"3a4" => DATA <= x"0211"; - when x"3a5" => DATA <= x"17c0"; - when x"3a6" => DATA <= x"f5f8"; - when x"3a7" => DATA <= x"8bdf"; - when x"3a8" => DATA <= x"fff8"; - when x"3a9" => DATA <= x"80fd"; - when x"3aa" => DATA <= x"941f"; - when x"3ab" => DATA <= x"fffa"; - when x"3ac" => DATA <= x"0ac1"; - when x"3ad" => DATA <= x"02f9"; - when x"3ae" => DATA <= x"8bdf"; - when x"3af" => DATA <= x"fff8"; - when x"3b0" => DATA <= x"80fd"; - when x"3b1" => DATA <= x"8a1f"; - when x"3b2" => DATA <= x"fffa"; - when x"3b3" => DATA <= x"1581"; - when x"3b4" => DATA <= x"1580"; - when x"3b5" => DATA <= x"0002"; - when x"3b6" => DATA <= x"17c0"; - when x"3b7" => DATA <= x"f5f8"; - when x"3b8" => DATA <= x"8bdf"; - when x"3b9" => DATA <= x"fff8"; - when x"3ba" => DATA <= x"80fd"; - when x"3bb" => DATA <= x"97d0"; - when x"3bc" => DATA <= x"fffa"; - when x"3bd" => DATA <= x"0ac1"; - when x"3be" => DATA <= x"02f9"; - when x"3bf" => DATA <= x"1581"; - when x"3c0" => DATA <= x"1580"; - when x"3c1" => DATA <= x"0002"; - when x"3c2" => DATA <= x"1026"; - when x"3c3" => DATA <= x"17c0"; - when x"3c4" => DATA <= x"f5f8"; - when x"3c5" => DATA <= x"941f"; - when x"3c6" => DATA <= x"fffa"; - when x"3c7" => DATA <= x"101f"; - when x"3c8" => DATA <= x"f5f8"; - when x"3c9" => DATA <= x"1580"; - when x"3ca" => DATA <= x"0002"; - when x"3cb" => DATA <= x"1026"; - when x"3cc" => DATA <= x"17c0"; - when x"3cd" => DATA <= x"f5f8"; - when x"3ce" => DATA <= x"97d0"; - when x"3cf" => DATA <= x"fffa"; - when x"3d0" => DATA <= x"101f"; + when x"36b" => DATA <= x"ffba"; + when x"36c" => DATA <= x"09ff"; + when x"36d" => DATA <= x"f708"; + when x"36e" => DATA <= x"1582"; + when x"36f" => DATA <= x"1581"; + when x"370" => DATA <= x"1580"; + when x"371" => DATA <= x"0002"; + when x"372" => DATA <= x"09ff"; + when x"373" => DATA <= x"f6f4"; + when x"374" => DATA <= x"0156"; + when x"375" => DATA <= x"97c0"; + when x"376" => DATA <= x"fffe"; + when x"377" => DATA <= x"8013"; + when x"378" => DATA <= x"1066"; + when x"379" => DATA <= x"09f7"; + when x"37a" => DATA <= x"fd9e"; + when x"37b" => DATA <= x"17c1"; + when x"37c" => DATA <= x"f5e2"; + when x"37d" => DATA <= x"09f7"; + when x"37e" => DATA <= x"fd96"; + when x"37f" => DATA <= x"9011"; + when x"380" => DATA <= x"09f7"; + when x"381" => DATA <= x"fd90"; + when x"382" => DATA <= x"9011"; + when x"383" => DATA <= x"02fc"; + when x"384" => DATA <= x"1581"; + when x"385" => DATA <= x"1580"; + when x"386" => DATA <= x"17c0"; + when x"387" => DATA <= x"f5e2"; + when x"388" => DATA <= x"17ce"; + when x"389" => DATA <= x"f5e0"; + when x"38a" => DATA <= x"0002"; + when x"38b" => DATA <= x"1066"; + when x"38c" => DATA <= x"1001"; + when x"38d" => DATA <= x"09f7"; + when x"38e" => DATA <= x"ff80"; + when x"38f" => DATA <= x"2057"; + when x"390" => DATA <= x"0005"; + when x"391" => DATA <= x"03dd"; + when x"392" => DATA <= x"09f7"; + when x"393" => DATA <= x"ff76"; + when x"394" => DATA <= x"901f"; + when x"395" => DATA <= x"f5fb"; + when x"396" => DATA <= x"09f7"; + when x"397" => DATA <= x"ff6e"; + when x"398" => DATA <= x"901f"; + when x"399" => DATA <= x"f5fa"; + when x"39a" => DATA <= x"09f7"; + when x"39b" => DATA <= x"ff66"; + when x"39c" => DATA <= x"901f"; + when x"39d" => DATA <= x"f5f9"; + when x"39e" => DATA <= x"09f7"; + when x"39f" => DATA <= x"ff5e"; + when x"3a0" => DATA <= x"901f"; + when x"3a1" => DATA <= x"f5f8"; + when x"3a2" => DATA <= x"97c0"; + when x"3a3" => DATA <= x"fffa"; + when x"3a4" => DATA <= x"97c0"; + when x"3a5" => DATA <= x"fffa"; + when x"3a6" => DATA <= x"09f7"; + when x"3a7" => DATA <= x"ff4e"; + when x"3a8" => DATA <= x"6041"; + when x"3a9" => DATA <= x"1c5f"; + when x"3aa" => DATA <= x"ffdc"; + when x"3ab" => DATA <= x"0080"; + when x"3ac" => DATA <= x"17c0"; + when x"3ad" => DATA <= x"f5f8"; + when x"3ae" => DATA <= x"2057"; + when x"3af" => DATA <= x"000c"; + when x"3b0" => DATA <= x"87be"; + when x"3b1" => DATA <= x"030a"; + when x"3b2" => DATA <= x"15c1"; + when x"3b3" => DATA <= x"0100"; + when x"3b4" => DATA <= x"8bdf"; + when x"3b5" => DATA <= x"fff8"; + when x"3b6" => DATA <= x"80fd"; + when x"3b7" => DATA <= x"97d0"; + when x"3b8" => DATA <= x"fffa"; + when x"3b9" => DATA <= x"0ac1"; + when x"3ba" => DATA <= x"02f9"; + when x"3bb" => DATA <= x"010e"; + when x"3bc" => DATA <= x"15c1"; + when x"3bd" => DATA <= x"0100"; + when x"3be" => DATA <= x"8bdf"; + when x"3bf" => DATA <= x"fff8"; + when x"3c0" => DATA <= x"80fd"; + when x"3c1" => DATA <= x"941f"; + when x"3c2" => DATA <= x"fffa"; + when x"3c3" => DATA <= x"0ac1"; + when x"3c4" => DATA <= x"02f9"; + when x"3c5" => DATA <= x"8bdf"; + when x"3c6" => DATA <= x"fff8"; + when x"3c7" => DATA <= x"80fd"; + when x"3c8" => DATA <= x"8a1f"; + when x"3c9" => DATA <= x"fffa"; + when x"3ca" => DATA <= x"1581"; + when x"3cb" => DATA <= x"101f"; + when x"3cc" => DATA <= x"f5f8"; + when x"3cd" => DATA <= x"1580"; + when x"3ce" => DATA <= x"0002"; + when x"3cf" => DATA <= x"1026"; + when x"3d0" => DATA <= x"17c0"; when x"3d1" => DATA <= x"f5f8"; - when x"3d2" => DATA <= x"1580"; - when x"3d3" => DATA <= x"0002"; - when x"3d4" => DATA <= x"1026"; - when x"3d5" => DATA <= x"17c0"; - when x"3d6" => DATA <= x"f5f8"; - when x"3d7" => DATA <= x"941f"; - when x"3d8" => DATA <= x"fffa"; - when x"3d9" => DATA <= x"941f"; - when x"3da" => DATA <= x"fffa"; - when x"3db" => DATA <= x"101f"; - when x"3dc" => DATA <= x"f5f8"; - when x"3dd" => DATA <= x"1580"; - when x"3de" => DATA <= x"0002"; + when x"3d2" => DATA <= x"97d0"; + when x"3d3" => DATA <= x"fffa"; + when x"3d4" => DATA <= x"97d0"; + when x"3d5" => DATA <= x"fffa"; + when x"3d6" => DATA <= x"01f4"; + when x"3d7" => DATA <= x"1026"; + when x"3d8" => DATA <= x"17c0"; + when x"3d9" => DATA <= x"f5f8"; + when x"3da" => DATA <= x"941f"; + when x"3db" => DATA <= x"fffa"; + when x"3dc" => DATA <= x"941f"; + when x"3dd" => DATA <= x"fffa"; + when x"3de" => DATA <= x"01ec"; when x"3df" => DATA <= x"1026"; when x"3e0" => DATA <= x"17c0"; when x"3e1" => DATA <= x"f5f8"; when x"3e2" => DATA <= x"97d0"; when x"3e3" => DATA <= x"fffa"; - when x"3e4" => DATA <= x"97d0"; - when x"3e5" => DATA <= x"fffa"; - when x"3e6" => DATA <= x"101f"; + when x"3e4" => DATA <= x"01e6"; + when x"3e5" => DATA <= x"1026"; + when x"3e6" => DATA <= x"17c0"; when x"3e7" => DATA <= x"f5f8"; - when x"3e8" => DATA <= x"1580"; - when x"3e9" => DATA <= x"0002"; - when x"3ea" => DATA <= x"8a1f"; - when x"3eb" => DATA <= x"fffa"; - when x"3ec" => DATA <= x"0002"; - when x"3ed" => DATA <= x"ff84"; - when x"3ee" => DATA <= x"ff96"; - when x"3ef" => DATA <= x"ffa8"; - when x"3f0" => DATA <= x"ffbe"; - when x"3f1" => DATA <= x"ffd4"; - when x"3f2" => DATA <= x"ffd4"; - when x"3f3" => DATA <= x"ffd4"; - when x"3f4" => DATA <= x"ffd4"; - when x"3f5" => DATA <= x"0000"; + when x"3e8" => DATA <= x"941f"; + when x"3e9" => DATA <= x"fffa"; + when x"3ea" => DATA <= x"01e0"; + when x"3eb" => DATA <= x"8a1f"; + when x"3ec" => DATA <= x"fffa"; + when x"3ed" => DATA <= x"0002"; + when x"3ee" => DATA <= x"ffca"; + when x"3ef" => DATA <= x"ffbe"; + when x"3f0" => DATA <= x"ffae"; + when x"3f1" => DATA <= x"ff9e"; + when x"3f2" => DATA <= x"ffd6"; + when x"3f3" => DATA <= x"ffd6"; + when x"3f4" => DATA <= x"ffd6"; + when x"3f5" => DATA <= x"ffd6"; when x"3f6" => DATA <= x"0000"; when x"3f7" => DATA <= x"0000"; when x"3f8" => DATA <= x"0000";