Tube Test Programs ================== J.G.Harston - jgh@mdfs.net 70 Camm Street, Walkley, Sheffield S6 3TR PDP11 Test11 should do ---------------------- PDP11>*test11 this is the command line PDP11 Tube test program R0=&0001 R1=&F500 R2=&0000 R3=&0000 R4=&0000 R5=&0BBC R6=&F5D0 R7=&4050 MEMBOT=&0100 MEMTOP=&F500 PROG=&4000 CMD=>this is the command line< PDP11>* R0 should be 1 to indicate code with a header R1 points to the command line R5 is &BBC to indicate a BBC host R6 is the stack, it will be somewhere just below &F5E0 on the private stack R7 is the program counter, it will be a couple of dozen bytes from the start of the code MEMBOT with the current client should be &100 as it only runs in System mode and the hardware vectors are at &0000-&00FF. MEMTOP will be the start of the client's workspace at &F500 unless system extensions have been loaded to high memory, moving MEMTOP downwards - think of a top-down PAGE. PROG is where the current program was entered. The test code is written to run from &4000 to be in the middle of memory across most CoPros to test 'Not XXX code' checking. The command line should be everything after the command being run. Leading spaces should be removed. Trailing spaces may or may not be removed. At any point where Test11 is paused, pressing Break should return to the caller, for example the supervisor if called from the supervisor. The code is running as a transient, so it should not be re-entered as though it is the current program. If you run Test11 from PDP BASIC, pressing Break while paused should return to PDP BASIC. If you run code with a non-PDP11 header (such as Test09, Test65, etc), you should get the 'Not PDP11 code' error, and the supervisor is entered. When you run bad code the supervisor has to be entered, as the client has to assume that the current error handler has been overwritten by the newly-loaded code, and so has to drop out to the supervisor. 6809 Test09 should do --------------------- 6809>*test09 this is the command line 6809 Tube test program A=01 X=FF28 U=FFB9 DP=00 B=00 Y=4000 S=F7F8 CC=01 MEMBOT=&0000 MEMTOP=&F800 CMD=>this is the command line< A should be 1 to indicate code with a header X points to the command line CC should be 01 to indicate CarrySet, code entered as *command, not from RESET S is the stack, it will be just under MEMTOP with a client that runs in RAM B,DP,U are currently reserved, at the moment Y happens to hold the entry address MEMBOT should be &0000, MEMTOP should be &F800 with a client that runs from RAM. The command line should be everything after the command being run. Leading spaces should be removed. Trailing spaces may or may not be removed. The 6809 client understands *RUN so LPTR should point to the parameters regardless of using *RUN, *command, */command, */ command, etc. 6809 BIOS entries: INCH (press a key): 20 INCHE (press a key): !21 INCHK (press a key): 04 until keypress then 00 OUTCH: @ABCDEFGHIJHKLMNOPQRSTUVWXYZ[\]^_ PDATA: PDATA text PCRLF: (move to next line) PSTRG: (print on next line( PSTRG text These are standard 6809 BIOS entries. INCH and INCHE will display the code of the key pressed, ENCHE echos, so will display the keypress as well. INCHK loops until a key is pressed. OUTCH sends the 32 upper case characters. PDATE, PRCRLF and PSTRG print strings in various ways. BBC MOS entries: PRHEX: 000102030405060708090A0B0C0D PR2HEX: 0000 010e 021c 032a 0438 0546 PRTEXT: This is using PRTEXT PRSTRING: PRSTRING test OSINIT: BRKV=xxxx ESCFLG=xxxx ERRJMP: save BRKV, claim BRKV, generate error ERRJMP: caught error: FF Test error message ERRJMP: restore BRKV PRHEX should display 00 to 0D from the A register in hex, PR2HEX displays multiples of &010E from the X register in hex. PRTEXT prints an inline zero-teminated string, PRSTRING prints a zero-terminated string pointed to by X. They both use the same code, called differently. ERRJMP tests asking for BRKV by calling OSINIT/INITERR, claiming it, making an error, catching it, and restoring BRKV OS_CLI *help tube 6809 Emulator 0.11 (Q)uit or (R)eturn OSQUIT 6809>* OS_CLI tests issuing a *command, in lower case to test case matching, with a lower case parameter to test parameter matching. OSQUIT should then return to the caller - in the current implementation this will always enter the supervisor. At any point where Test09 is paused, pressing Break should return to the caller, for example the supervisor if called from the supervisor. The code is running as a transient, so it should not be re-entered as though it is the current program. If you run Test09 from 6809 BASIC, pressing Break while paused should return to 6809 BASIC. If you run code with a non-6809 header (such as Test65, Test11, etc), you should get the 'Not 6809 code' error, and the supervisor is entered. When you run bad code the supervisor has to be entered, as the client has to assume that the current error handler has been overwritten by the newly-loaded code, and so has to drop out to the supervisor. 6502 Test65 should do --------------------- >*test65 65x02 Tube test program A=&01 X=&00 Y=&40 S=&01F8 P=&73 MEMBOT=&0800 MEMTOP=&8000 A should be 1 to indicate code with a header X and Y are not set to anything in particular S is the system stack and should be around &01F8 P is the flags, it should be odd to indicate the carry flag is set for code entered from a *command. MEMBOT should be &0800, MEMTOP will typically by &8000 if run from LoBasic, &B800 if run from HiBasic, &F800 if run from the supervisor. The command line is read manually using OSARGS, and is not passed to the code directly. TUBE MOS entries: PRHEX: 000102030405060708090A0B0C0D PR2HEX: 0000 0302 0604 0906 0C08 PRTEXT: This is using PRTEXT PRSTRING: This is using PRSTRING ERRJMP: save BRKV, claim BRKV, generate error ERRJMP: caught error: FF Test error message ERRJMP: restore BRKV If using Tube Client 1.10 or earlier, the printing tests are skipped as these entries are not present. PRHEX prints from the A register &00 to &0D in hex. PR2HEX prints from the XY registers, multiples of &0302. PRTEXT prints a zero-terminated inline sptring, and PRSTRING prints a zero-terminated string pointed to by XY. ERRJMP tests claiming BRKV, claiming it, making an error, catching it, and restoring BRKV OS_CLI *help tube 6809 Emulator 0.11 (Q)uit or (R)eturn OSQUIT 6809>* OS_CLI tests issuing a *command, in lower case to test case matching, with a lower case parameter to test parameter matching. OSQUIT should then return to the caller - in the current implementation this will always enter the supervisor. With a Tube client version 1.10 or earlier the test code simply returns to the caller. At any point where Test65 is paused, pressing Break should return to the caller, for example the supervisor if called from the supervisor. The code is running as a transient, so it should not be re-entered as though it is the current program. If you run Test65 from 6502 BASIC, pressing Break while paused should return to 6502 BASIC. If you run code with a non-6502 header (such as Test09, Test11, etc), you should get the 'This is not 6502 code' error, and the supervisor is entered. When you run bad code the supervisor has to be entered, as the client has to assume that the current error handler has been overwritten by the newly-loaded code, and so has to drop out to the supervisor. ARM TestARM should do --------------------- >*testarm this is the command line ARM Test Program R0= &00000000 R1= &00000B80 ...etc... R14=&038183B4 OS_GetEnv: MEMBOT=&00008000 MEMTOP=&000A8000 CMD=>testarm this is the command line< Will not work on Sprow ARM CoPro. Data transfer tests ------------------- The simplest way to do this is to run a version of BASIC for the CoPro, and attempt loading and saving of BASIC programs and data. The program 'Environ' will examine the environment the program is running on and display various information. The program 'FSTests' will do various filing system tests, mainly OSARGS, OSFILE and OSGBPB.