0000 83E0 0024      DATA >83E0,>0024		Reset Interrupt
0004 83C0 0900      DATA >83C0,>0900
0008 83C0 0A92      DATA >83C0,>0A92
000C 30             BYTE >30			Clock Speed (3.0 MHz)
000D AA             BYTE >AA
000E 0460 02B2      B    @>02B2			Keyboard scan routine
0012 0008           DATA >0008
0014 1E00           SBZ  0
0016 0460 007A      B    @>007A
001A 1E00           SBZ  0
001C 0460 0078      B    @>0078
0020 0460 04B2      B    @>04B2                 Function-4 detection

*************************************************************************
*									*
*			MAIN CONSOLE ROUTINE				*
*									*
*************************************************************************

*************************************************************************
*									*
*  GPL Instruction >0B - EXIT						*
*									*
*     Return control to the system monitor.				*
*									*
*************************************************************************

0024 020D 9800      LI   R13,>9800		GROM Read Data
0028 020E 0100      LI   R14,>0100		System Flags
002C 020F 8C02      LI   R15,VDPWA		VDP Write Address
0030 0200 0020      LI   R0,>0020
0034 1013           JMP  >005C

0036 1000           DATA >1000

0038 1E00           SBZ  0
003A 02E0 280A      LWPI >280A
003E 0380           RTWP

0040 280A           DATA >280A		XOP 0 Workspace Address
0042 0C1C           DATA >0C1C		XOP 0 Program Counter
0044 FFD8           DATA >FFD8		XOP 1 Workspace Address
0046 FFF8           DATA >FFF8		XOP 1 Program Counter
0048 83A0           DATA >83A0		XOP 2 Workspace Address
004A 8300           DATA >8300		XOP 2 Program Counter
004C 1100           DATA >1100

*************************************************************************
*									*
*  GPL Instruction >F8,>F9,>FA,>FB - UNUSED (yea right)			*
*									*
*************************************************************************

004E 06A0 0864      BL   @>0864
0052 06A0 0864      BL   @>0864
0056 C90D 8300      MOV  R13,@>8300(R4)
005A C342           MOV  R2,R13

*************************************************************************
*									*
*  GPL interpreter - reading from GROM					*
*									*
*************************************************************************

005C D11D           MOVB *R13,R4
005E C180           MOV  R0,R6
0060 DB46 0402      MOVB R6,@>0402(R13)		Set GROM read address
0064 DB60 83ED 0402 MOVB @>83ED,@>0402(R13)
006A 5820 011B 837C SZCB @>011B,@>837C		Clear COND bit in GPL status
0070 0300 0002      LIMI >0002
0074 0300 0000      LIMI >0000
0078 D25D           MOVB *R13,R9
007A 1105           JLT  >0086
007C D109           MOVB R9,R4		GPL Instructions >00 - >7F
007E 09C4           SRL  R4,12
0080 C164 0C36      MOV  @>0C36(R4),R5
0084 0455           B    *R5

0086 04C4           CLR  R4		GPL Instructions >80 - >FF
0088 C149           MOV  R9,R5
008A 0245 0100      ANDI R5,>0100
008E 06A0 077A      BL   @>077A
0092 06C4           SWPB R4
0094 C0C1           MOV  R1,R3
0096 C080           MOV  R0,R2
0098 0289 A000      CI   R9,>A000
009C 1A09           JL   >00B0
009E 2260 0030      COC  @>0030,9
00A2 160C           JNE  >00BC
00A4 C04D           MOV  R13,R1
00A6 D011           MOVB *R1,R0
00A8 0601           DEC  R1
00AA 06A0 07AA      BL   @>07AA
00AE 1008           JMP  >00C0

*************************************************************************
*									*
*  GPL Instructions >80 - >9F						*
*									*
*************************************************************************

00B0 C209           MOV  R9,R8
00B2 0988           SRL  R8,8
00B4 0700           SETO R0
00B6 C228 0BFE      MOV  @>0BFE(R8),R8
00BA 0458           B    *R8

00BC 06A0 077A      BL   @>077A
00C0 C209           MOV  R9,R8
00C2 0998           SRL  R8,9
00C4 C228 0C4E      MOV  @>0C4E(R8),R8
00C8 8002           C    R2,R0
00CA 0458           B    *R8

*************************************************************************
*									*
*  GPL Instruction >D0,>D1,>D2,>D3 - Compare greater or equal		*
*									*
*************************************************************************

00CC 11CE           JLT  >006A
00CE F820 011B 837C SOCB @>011B,@>837C		Set COND bit in GPL status
00D4 10CD           JMP  >0070

*************************************************************************
*									*
*  GPL Instruction >C4,>C5,>C6,>C7 - Compare high			*
*									*
*************************************************************************

00D6 1BFB           JH   >00CE
00D8 10C8           JMP  >006A

*************************************************************************
*									*
*  GPL Instruction >C8,>C9,>CA,>CB - Compare high or equal		*
*									*
*************************************************************************

00DA 14F9           JHE  >00CE
00DC 10C6           JMP  >006A

*************************************************************************
*									*
*  GPL Instruction >CC,>CD,>CE,>CF - Compare Greater Than		*
*									*
*************************************************************************

00DE 15F7           JGT  >00CE
00E0 10C4           JMP  >006A

*************************************************************************
*									*
*  GPL Instruction >D8,>D9,>DA,>DB - CLOG				*
*									*
*************************************************************************

00E2 0540           INV  R0
00E4 4080           SZC  R0,R2
00E6 13F3           JEQ  >00CE
00E8 10C0           JMP  >006A

*************************************************************************
*									*
*  GPL Instruction >8E - Compare Zero					*
*									*
*************************************************************************

00EA C082           MOV  R2,R2

*************************************************************************
*									*
*  GPL Instruction >D4,>D5,>D6,>D7 - Compare Equal			*
*									*
*************************************************************************

00EC 02C4           STST R4
00EE D804 837C      MOVB R4,@>837C
00F2 10BE           JMP  >0070

*************************************************************************
*									*
*  GPL Instruction >09 - Test Logical High Bit				*
*  GPL Instruction >0A - Test Arithmetic Greater Than Bit		*
*  GPL Instruction >0C - Test Carry Bit					*
*  GPL Instruction >0D - Test Overflow Bit				*
*									*
*************************************************************************

00F4 C009           MOV  R9,R0
00F6 0AC0           SLA  R0,12
00F8 09D0           SRL  R0,13
00FA D160 837C      MOVB @>837C,R5
00FE 0A05           SLA  R5,0
0100 18E6           JOC  >00CE
0102 10B3           JMP  >006A

*************************************************************************
*									*
*  GPL Instruction >05 - Branch						*
*									*
*************************************************************************

0104 D19D           MOVB *R13,R6	Get destination address in R6
0106 1000           NOP
0108 D81D 83ED      MOVB *R13,@>83ED
010C 10A9           JMP  >0060

*************************************************************************
*									*
*  GPL Instructions >60 - >7F - Branch on set				*
*									*
*     The first three bits of the instruction are the opcode.  The	*
*  last five bits are the high order destination address.  The		*
*  operand contains the low byte of the destination address		*
*									*
*************************************************************************

010E D120 837C      MOVB @>837C,R4	Get GPL status register
0112 0A24           SLA  R4,2		Check COND bit
0114 1106           JLT  >0122
0116 D11D           MOVB *R13,R4	Skip past operand
0118 10A8           JMP  >006A

*************************************************************************
*									*
*  GPL Instructions >60 - >7F - Branch on reset				*
*									*
*     The first three bits of the instruction are the opcode.  The	*
*  last five bits are the high order destination address.  The		*
*  operand contains the low byte of the destination address		*
*									*
*************************************************************************

011A D120 837C      MOVB @>837C,R4	Get GPL status register
011E 0A24           SLA  R4,2		Check COND bit
0120 11FA           JLT  >0116
0122 D81D 83F3      MOVB *R13,@>83F3	Get branch address in low byte of R9
0126 0249 1FFF      ANDI R9,>1FFF
012A D1AD 0002      MOVB @>0002(R13),R6
012E 0246 E000      ANDI R6,>E000
0132 E189           SOC  R9,R6
0134 1095           JMP  >0060

*************************************************************************
*									*
*  GPL Instruction >80 - Absolute Value					*
*									*
*  Definition:  Replace the GD with the absolute value of the		*
*               GD. Does not affect status bits.			*
*									*
*************************************************************************

0136 0742           ABS  R2
0138 107A           JMP  >022E

*************************************************************************
*									*
*  GPL Instruction >82 - Negate						*
*									*
*  Definition:  Replace the GD with its two's complement value.		*
*               Does not affect atatus bits.				*
*									*
*************************************************************************

013A 0502           NEG  R2
013C 1078           JMP  >022E

*************************************************************************
*									*
*  GPL Instruction >86 - Clear Location					*
*									*
*  Definition:  Replace the GD with a zero. Does not affect		*
*               status bits.						*
*									*
*************************************************************************

013E 0702           SETO R2

*************************************************************************
*									*
*  GPL Instruction >84 - Invert						*
*									*
*  Definition:  Replace the GD with its one's complement value.		*
*               Does not affect status bits.				*
*									*
*************************************************************************

0140 0542           INV  R2
0142 1075           JMP  >022E

*************************************************************************
*									*
*  GPL Instruction >88 - Fetch						*
*									*
*  Definition:  Retrieves a byte of data pointed to by the return	*
*               address on the subroutine stack and increments		*
*               this return address by 1.				*
*									*
*************************************************************************

0144 C184           MOV  R4,R6
0146 06A0 0864      BL   @>0864
014A 0644           DECT R4
014C 06A0 0848      BL   @>0848
0150 D09D           MOVB *R13,R2
0152 0882           SRA  R2,8
0154 05A4 8300      INC  @>8300(R4)
0158 05C4           INCT R4
015A 06A0 084C      BL   @>084C
015E C106           MOV  R6,R4
0160 1066           JMP  >022E

*************************************************************************
*									*
*  GPL Instruction >8A - Case						*
*									*
*  Definition:  Add two times the value of the operand to the		*
*               current GROM Program Counter. Reset condition bit	*
*               in status.						*
*									*
*************************************************************************

0162 0602           DEC  R2
0164 1782           JNC  >006A
0166 D15D           MOVB *R13,R5
0168 1000           NOP
016A D15D           MOVB *R13,R5
016C 10FA           JMP  >0162

*************************************************************************
*									*
*  GPL Instruction >8C - Push Onto Data Stack				*
*									*
*  Definition:  Increment the data stack pointer & push the		*
*               one byte operand onto it. (Opposite of instruction	*
*               POP). No status bits are affected.			*
*									*
*************************************************************************

016E B80E 8372      AB   R14,@>8372
0172 D1A0 8372      MOVB @>8372,R6
0176 0986           SRL  R6,8
0178 D9A0 83E5 8300 MOVB @>83E5,@>8300(R6)
017E 0460 0070      B    @>0070

*************************************************************************
*									*
*  GPL Instruction >96 - Decrement by Two				*
*									*
*  Definition:  Replace the GD with the GD minus two. The result	*
*               is compared with zero and the status bits are set/	*
*               reset to indicate the result of this comparison.	*
*									*
*************************************************************************

0182 09E0           SRL  R0,14

*************************************************************************
*									*
*  GPL Instruction >94 - Increment by Two				*
*									*
*  Definition:  Replace the GD with the GD plus two. The result		*
*               is compared with zero and the status bits are set/	*
*               reset to indicate the result of this comparison.	*
*									*
*************************************************************************

0184 0600           DEC  R0

*************************************************************************
*									*
*  GPL Instruction >90 - Increment by one				*
*		   >A4,>A5,>A6,>A7 - SUB
*									*
*  Definition:  Replace the GD with the GD plus one. The result		*
*               is compared with zero and the status bits are		*
*               set/reset to indicate the result of this comparion.	*
*									*
*************************************************************************

0186 0500           NEG  R0

*************************************************************************
*									*
*  GPL Instruction >A0,>A1,>A2,>A3 - ADD				*
*									*
*  Definition:  Replace GD with the sum of the GS and GD.		*
*               Compare the result to zero and set/reset status		*
*               bits to indicate this result.				*
*									*
*  GPL Instruction >92 - Decrement by One				*
*									*
*  Definition:  Replace the GD with GD minus one.  The result is	*
*               compared with zero & the status bits are set/reset	*
*               to indicate the result of this comparison.		*
*									*
*  Note:  To avoid confusion - if the instruction is >92, R0 is set to	*
*	  -1.  If the instruction is >A0 or >A1, R0 is the operand.	*
*			You're welcome - DJN				*
*									*
*************************************************************************

0188 D145           MOVB R5,R5
018A 134B           JEQ  >0222
018C A080           A    R0,R2
018E 104C           JMP  >0228

*************************************************************************
*									*
*  GPL Instruction >B0,>B1,>B2,>B3 - Logical AND			*
*									*
*  Definition:  Perform a bit-by-bit AND operation of the 8		*
*               (16) bits in GS with the GD and store the result	*
*               in the GD. The result is compared to zero and the	*
*               status bits are set/reset to indicate the result.	*
*									*
*************************************************************************

0190 0540           INV  R0
0192 4080           SZC  R0,R2
0194 1049           JMP  >0228

*************************************************************************
*									*
*  GPL Instruction >B4,>B5,>B6,>B7 - Logical OR				*
*									*
*  Definition:  Replace the GD with the GD OR'd with the GS.		*
*               Compare the result to zero & set/reset the		*
*               status bits to indicate this result.			*
*									*
*************************************************************************

0196 E080           SOC  R0,R2
0198 1047           JMP  >0228

*************************************************************************
*									*
*  GPL Instruction >B8,>B9,>BA,>BB - Exclusive OR			*
*									*
*  Definition:  Exclusively OR the GS and GD and replace the GD		*
*               with the result. The result is compared to zero		*
*               and the status bits are set/reset to indicate the	*
*               result.							*
*									*
*************************************************************************

019A 2880           XOR  R0,R2
019C 1045           JMP  >0228

*************************************************************************
*									*
*  GPL Instruction >BC,>BD,>BE,>BF - Store				*
*									*
*  Definition:  Replace the GD with the GS. The result is compared	*
*		to zero and the status bits are set/reset to indicate	*
*		the result.						*
*									*
*************************************************************************

019E C080           MOV  R0,R2
01A0 1046           JMP  >022E

*************************************************************************
*									*
*  GPL Instruction >C0,>C1,>C2,>C3 - EX					*
*									*
*  Definition:  The contents of the first operand is exchanged		*
*               with the contents of the second operand. No status	*
*               bits are affected.					*
*									*
*************************************************************************

01A2 C242           MOV  R2,R9
01A4 C080           MOV  R0,R2
01A6 06A0 0232      BL   @>0232
01AA 06C4           SWPB R4
01AC C0C1           MOV  R1,R3
01AE 101B           JMP  >01E6

*************************************************************************
*									*
*  GPL Instruction >DC,>DD,>DE,>DF - Shift Right Arithmatic		*
*									*
*************************************************************************

01B0 0802           SRA  R2,0
01B2 103D           JMP  >022E

*************************************************************************
*									*
*  GPL Instruction >E0,>E1,>E2,>E3 - Shift Left Logical			*
*									*
*  Definition:  Shift the (GD) left for the (GS) number of bits.	*
*               Fill in the vacated bits with logical zeros.		*
*               Status is not affected.					*
*									*
*************************************************************************

01B4 0A02           SLA  R2,0
01B6 103B           JMP  >022E

*************************************************************************
*									*
*  GPL Instruction >E4,>E5,>E6,>EE - Shift Right Logical		*
*									*
*  Definition:  Shift the (GD) right for the (GS) number of bits.	*
*               Fill in the vacated bits with logical zeros.		*
*               Status is not affected.					*
*									*
*************************************************************************

01B8 D145           MOVB R5,R5
01BA 1601           JNE  >01BE
01BC 7082           SB   R2,R2		If this is a byte operation, clear
					the high byte of R2 so we don't get
					errant bits coming into the low byte
01BE 0902           SRL  R2,0
01C0 1036           JMP  >022E

*************************************************************************
*									*
*  GPL Instruction >E8,>E9,>EA,>EB - Shift Right Circular		*
*									*
*  Definition:  Shift the (GD) right for the (GS) number of bits.	*
*		Wrap around the bits. Status is not affected.		*
*									*
*************************************************************************

01C2 D145           MOVB R5,R5
01C4 1602           JNE  >01CA
01C6 D0A0 83E5      MOVB @>83E5,R2	If this is a byte operation,
					duplicate the low order byte of R2
					in the high order byte of R2
01CA 0B02           SRC  R2,0
01CC 1030           JMP  >022E

*************************************************************************
*									*
*  GPL Instruction >A8,>A9,>AA,>AB - Multiply				*
*									*
*  Definition: Multiply the GD by the GS. In the single byte		*
*              MUL, both operands are single byte values but		*
*              the result is stored in a double byte location		*
*              at GD. The 8 most significant bits are stored in		*
*              the GD. In the double byte DMUL, both operands		*
*              are double byte values and the result is a four		*
*              byte value at GD. No status bits are affected.		*
*              The multiply is an unsigned type.			*
*									*
*************************************************************************

01CE C202           MOV  R2,R8
01D0 D145           MOVB R5,R5
01D2 1601           JNE  >01D6
01D4 7208           SB   R8,R8
01D6 3A00           MPY  R0,8
01D8 D145           MOVB R5,R5
01DA 1602           JNE  >01E0
01DC D809 83F1      MOVB R9,@>83F1
01E0 C088           MOV  R8,R2
01E2 06A0 0232      BL   @>0232
01E6 C089           MOV  R9,R2
01E8 1022           JMP  >022E

*************************************************************************
*									*
*  GPL Instruction >AC,>AD,>AE,>AF - Divide				*
*									*
*  Definition:  Replace the GD with the quotient and remainder of	*
*               GD divided by GS. Compare the result to zero and	*
*               set/reset status bits to indicate the result.		*
*               The divide is of the signed type.			*
*    									*
*************************************************************************

01EA D805 837C      MOVB R5,@>837C
01EE C202           MOV  R2,R8
01F0 C080           MOV  R0,R2
01F2 C043           MOV  R3,R1
01F4 0581           INC  R1
01F6 D145           MOVB R5,R5
01F8 1301           JEQ  >01FC
01FA 0581           INC  R1
01FC D104           MOVB R4,R4
01FE 1303           JEQ  >0206
0200 06A0 07FA      BL   @>07FA
0204 1002           JMP  >020A
0206 06A0 07A8      BL   @>07A8
020A C240           MOV  R0,R9
020C D145           MOVB R5,R5
020E 1603           JNE  >0216
0210 D260 83F1      MOVB @>83F1,R9
0214 0888           SRA  R8,8
0216 3E02           DIV  R2,8
0218 19E3           JNO  >01E0
021A F820 0013 837C SOCB @>0013,@>837C
0220 10DF           JMP  >01E0
0222 B820 83E1 83E5 AB   @>83E1,@>83E5
0228 02CB           STST R11
022A D80B 837C      MOVB R11,@>837C
022E 020B 0070      LI   R11,>0070
0232 D104           MOVB R4,R4
0234 130F           JEQ  >0254
0236 D7E0 83E7      MOVB @>83E7,*R15
023A 0263 4000      ORI  R3,>4000
023E D7C3           MOVB R3,*R15
0240 D145           MOVB R5,R5
0242 1303           JEQ  >024A
0244 DBC2 FFFE      MOVB R2,@>FFFE(R15)
0248 0583           INC  R3
024A DBE0 83E5 FFFE MOVB @>83E5,@>FFFE(R15)
0250 0583           INC  R3
0252 045B           RT

0254 D145           MOVB R5,R5
0256 1301           JEQ  >025A
0258 DCC2           MOVB R2,*R3+
025A 06C2           SWPB R2
025C DCC2           MOVB R2,*R3+
025E 0283 837E      CI   R3,>837E
0262 16F7           JNE  >0252
0264 C18B           MOV  R11,R6
0266 06A0 0880      BL   @>0880
026A DBC2 FFFE      MOVB R2,@>FFFE(R15)
026E 0456           B    *R6

*************************************************************************
*									*
*  GPL INSTRUCTIONS >00 - >1F						*
*									*
*	R9 holds the GPL instruction in the upper byte			*
*									*
*************************************************************************

0270 0A39           SLA  R9,3
0272 09A9           SRL  R9,10
0274 C129 0C3E      MOV  @>0C3E(R9),R4
0278 0454           B    *R4

*************************************************************************
*									*
*  GPL Instruction >02 - Generate Random Number				*
*									*
*    Generates a random number between 0 and ARG, inclusive and stores	*
*  it in >8375.  Default is 255.					*
*									*
*************************************************************************

027A 0204 6FE5      LI   R4,>6FE5
027E 3920 83C0      MPY  @>83C0,4
0282 0225 7AB9      AI   R5,>7AB9
0286 C805 83C0      MOV  R5,@>83C0
028A D19D           MOVB *R13,R6
028C 0986           SRL  R6,8
028E 0586           INC  R6
0290 04C4           CLR  R4
0292 06C5           SWPB R5
0294 3D06           DIV  R6,4
0296 D820 83EB 8378 MOVB @>83EB,@>8378
029C 1006           JMP  >02AA

*************************************************************************
*									*
*  GPL Instruction >04 - Load backdrop color				*
*									*
*************************************************************************

029E 0207 8700      LI   R7,>8700
02A2 D81D 83EF      MOVB *R13,@>83EF
02A6 06A0 089A      BL   @>089A
02AA 0460 0070      B    @>0070

*************************************************************************
*									*
*  GPL Instruction >03 - Scan Keyboard					*
*									*
*************************************************************************

02AE 020B 0070      LI   R11,>0070

*************************************************************************
*									*
*  			KEYBOARD SCAN ROUTINE				*
*									*
*************************************************************************

02B2 C80B 83D8      MOV  R11,@>83D8
02B6 06A0 0864      BL   @>0864
02BA 04CC           CLR  R12
02BC 1D15           SBO  21
02BE D160 8374      MOVB @>8374,R5
02C2 0985           SRL  R5,8
02C4 C185           MOV  R5,R6
02C6 1312           JEQ  >02EC
02C8 0200 0FFF      LI   R0,>0FFF
02CC 0606           DEC  R6
02CE 1312           JEQ  >02F4
02D0 0200 F0FF      LI   R0,>F0FF
02D4 0606           DEC  R6
02D6 130E           JEQ  >02F4
02D8 0606           DEC  R6
02DA 8806 0072      C    R6,@>0072
02DE 1B51           JH   >0382
02E0 D806 8374      MOVB R6,@>8374
02E4 06C6           SWPB R6
02E6 D806 83C6      MOVB R6,@>83C6
02EA 04C5           CLR  R5
02EC 04C0           CLR  R0
02EE 04C6           CLR  R6
02F0 101E           JMP  >032E
02F2 2925           DATA >2925
02F4 020C 0024      LI   R12,>0024
02F8 30E5 0405      LDCR @>0405(R5),3
02FC 020C 0006      LI   R12,>0006
0300 04C3           CLR  R3
0302 0704           SETO R4
0304 3544           STCR R4,5
0306 0994           SRL  R4,9
0308 1803           JOC  >0310
030A D825 02F1 83E7 MOVB @>02F1(R5),@>83E7
0310 0A14           SLA  R4,1
0312 0224 16E0      AI   R4,>16E0
0316 DB44 0402      MOVB R4,@>0402(R13)
031A DB60 83E9 0402 MOVB @>83E9,@>0402(R13)
0320 1000           NOP
0322 D81D 8376      MOVB *R13,@>8376
0326 D81D 8377      MOVB *R13,@>8377
032A C0C3           MOV  R3,R3
032C 163E           JNE  >03AA
032E 0201 0005      LI   R1,>0005
0332 04C2           CLR  R2
0334 04C7           CLR  R7
0336 020C 0024      LI   R12,>0024
033A 06C1           SWPB R1
033C 30C1           LDCR R1,3
033E 06C1           SWPB R1
0340 020C 0006      LI   R12,>0006
0344 0704           SETO R4
0346 3604           STCR R4,8
0348 0544           INV  R4
034A C041           MOV  R1,R1
034C 1603           JNE  >0354
034E D1C4           MOVB R4,R7
0350 0244 0F00      ANDI R4,>0F00
0354 4100           SZC  R0,R4
0356 1311           JEQ  >037A
0358 C041           MOV  R1,R1
035A 1602           JNE  >0360
035C C145           MOV  R5,R5
035E 160D           JNE  >037A
0360 C082           MOV  R2,R2
0362 160B           JNE  >037A
0364 0702           SETO R2
0366 C0C1           MOV  R1,R3
0368 0A33           SLA  R3,3
036A 0603           DEC  R3
036C 0583           INC  R3
036E 0A14           SLA  R4,1
0370 17FD           JNC  >036C
0372 C041           MOV  R1,R1
0374 1302           JEQ  >037A
0376 0201 0001      LI   R1,>0001
037A 0601           DEC  R1
037C 18DC           JOC  >0336
037E C082           MOV  R2,R2
0380 1614           JNE  >03AA
0382 04C6           CLR  R6
0384 D806 83C7      MOVB R6,@>83C7
0388 0700           SETO R0
038A 9940 83C8      CB   R0,@>83C8(R5)
038E 1302           JEQ  >0394
0390 06A0 0498      BL   @>0498			Delay 0.0025 sec
0394 D800 83C8      MOVB R0,@>83C8
0398 D940 83C8      MOVB R0,@>83C8(R5)
039C C145           MOV  R5,R5
039E 166C           JNE  >0478
03A0 D800 83C9      MOVB R0,@>83C9
03A4 D800 83CA      MOVB R0,@>83CA
03A8 1067           JMP  >0478
03AA 9960 83E7 83C8 CB   @>83E7,@>83C8(R5)
03B0 131A           JEQ  >03E6
03B2 0206 2000      LI   R6,>2000
03B6 06A0 0498      BL   @>0498			Delay 0.0025 sec
03BA D820 83E7 83C8 MOVB @>83E7,@>83C8
03C0 D960 83E7 83C8 MOVB @>83E7,@>83C8(R5)
03C6 C145           MOV  R5,R5
03C8 160C           JNE  >03E2
03CA C303           MOV  R3,R12
03CC 022C FFF8      AI   R12,>FFF8
03D0 1108           JLT  >03E2
03D2 0201 0002      LI   R1,>0002
03D6 093C           SRL  R12,3
03D8 1801           JOC  >03DC
03DA 0601           DEC  R1
03DC D860 83E7 83C8 MOVB @>83E7,@>83C8(R1)
03E2 D807 83C7      MOVB R7,@>83C7
03E6 D1E0 83C7      MOVB @>83C7,R7
03EA 0201 17C0      LI   R1,>17C0
03EE C145           MOV  R5,R5
03F0 160E           JNE  >040E
03F2 0201 1790      LI   R1,>1790
03F6 0A27           SLA  R7,2
03F8 180A           JOC  >040E
03FA 0201 1760      LI   R1,>1760
03FE 09F7           SRL  R7,15
0400 1806           JOC  >040E
0402 0201 1730      LI   R1,>1730
0406 0607           DEC  R7
0408 1302           JEQ  >040E
040A 0201 1700      LI   R1,>1700
040E A043           A    R3,R1
0410 DB41 0402      MOVB R1,@>0402(R13)
0414 DB60 83E3 0402 MOVB @>83E3,@>0402(R13)
041A 1000           NOP
041C D01D           MOVB *R13,R0
041E C145           MOV  R5,R5
0420 162B           JNE  >0478
0422 D820 83C6 83E7 MOVB @>83C6,@>83E7
0428 06A0 04A2      BL   @>04A2
042C 617A           DATA >617A
042E 160A           JNE  >0444
0430 04CC           CLR  R12
0432 C0C3           MOV  R3,R3
0434 1304           JEQ  >043E
0436 1E15           SBZ  21
0438 0BEC           SRC  R12,14
043A 1F07           TB   7
043C 1302           JEQ  >0442
043E 7020 03B4      SB   @>03B4,R0
0442 1D15           SBO  21
0444 C0C3           MOV  R3,R3
0446 1607           JNE  >0456
0448 06A0 04A2      BL   @>04A2
044C 101F           DATA >101F
044E 1399           JEQ  >0382
0450 9800 0587      CB   R0,@>0587
0454 1B96           JH   >0382
0456 0603           DEC  R3
0458 160F           JNE  >0478
045A 9800 0025      CB   R0,@>0025
045E 130C           JEQ  >0478
0460 9800 02CA      CB   R0,@>02CA
0464 1B03           JH   >046C
0466 F020 0470      SOCB @>0470,R0
046A 1006           JMP  >0478
046C 06A0 04A2      BL   @>04A2
0470 809F           DATA >809F
0472 1602           JNE  >0478
0474 5020 0470      SZCB @>0470,R0
0478 D800 8375      MOVB R0,@>8375
047C 06A0 0842      BL   @>0842
0480 D806 837C      MOVB R6,@>837C
0484 1306           JEQ  >0492
0486 D7E0 83D4      MOVB @>83D4,*R15	Restore VDP R1
048A 04E0 83D6      CLR  @>83D6		Reset clear screen count down timer
048E D7E0 0B61      MOVB @>0B61,*R15
0492 C2E0 83D8      MOV  @>83D8,R11
0496 045B           RT

* Some sort of delay routine.  R12 = >04E2 = 1250.
* ( 1250 iterations ) X ( 6 cycles / iteration )
* -------------------------------------------------- = 0.0025 sec
*                  ( 3Mhz )
*
0498 020C 04E2      LI   R12,>04E2
049C 060C           DEC  R12
049E 16FE           JNE  >049C
04A0 045B           RT

04A2 C33B           MOV  *R11+,R12
04A4 9300           CB   R0,R12
04A6 1A04           JL   >04B0
04A8 9800 83F9      CB   R0,@>83F9
04AC 1B01           JH   >04B0
04AE 9000           CB   R0,R0
04B0 045B           RT

04B2 020C 0024      LI   R12,>0024
04B6 30E0 0012      LDCR @>0012,3
04BA 0B7C           SRC  R12,7
04BC 020C 0006      LI   R12,>0006
04C0 360C           STCR R12,8
04C2 2720 0036      CZC  @>0036,12
04C6 160A           JNE  >04DC
04C8 020C 0024      LI   R12,>0024
04CC 30E0 0074      LDCR @>0074,3
04D0 0B7C           SRC  R12,7
04D2 020C 0006      LI   R12,>0006
04D6 360C           STCR R12,8
04D8 2720 0036      CZC  @>0036,12
04DC 045B           RT

*************************************************************************
*									*
*  GPL Instruction >08 - Formatted Block Move				*
*									*
*************************************************************************

04DE 04C9           CLR  R9
04E0 04C3           CLR  R3
04E2 06A0 0880      BL   @>0880
04E6 D21D           MOVB *R13,R8
04E8 020C 8373      LI   R12,>8373
04EC C148           MOV  R8,R5
04EE 0A38           SLA  R8,3
04F0 09B8           SRL  R8,11
04F2 0548           INV  R8
04F4 09C5           SRL  R5,12
04F6 C165 0CDC      MOV  @>0CDC(R5),R5
04FA 0202 050A      LI   R2,>050A
04FE 0704           SETO R4
0500 0455           B    *R5

*************************************************************************
*									*
*  GPL Instruction >E4,>E5						*
*									*
*************************************************************************

0502 0A54           SLA  R4,5

*************************************************************************
*									*
*  GPL Instruction >E2,E3						*
*									*
*************************************************************************

0504 8CB2           C    *R2+,*R2+
0506 1001           JMP  >050A

*************************************************************************
*									*
*  GPL Instruction >E0,>E1						*
*									*
*************************************************************************

0508 0A54           SLA  R4,5

*************************************************************************
*									*
*  GPL Instruction >DE,>DF						*
*									*
*************************************************************************

050A D19D           MOVB *R13,R6
050C A183           A    R3,R6
050E DBC6 FFFE      MOVB R6,@>FFFE(R15)
0512 61C4           S    R4,R7
0514 0287 0320      CI   R7,>0320
0518 1405           JHE  >0524
051A 0287 0300      CI   R7,>0300
051E 1A02           JL   >0524
0520 0227 FD00      AI   R7,>FD00
0524 06A0 05B8      BL   @>05B8
0528 06A0 0880      BL   @>0880
052C 0588           INC  R8
052E 13DB           JEQ  >04E6
0530 0452           B    *R2

*************************************************************************
*									*
*  GPL Instruction >E8,>E9						*
*									*
*************************************************************************

0532 0A58           SLA  R8,5

*************************************************************************
*									*
*  GPL Instruction >E6,>E7						*
*									*
*************************************************************************

0534 61C8           S    R8,R7
0536 0708           SETO R8
0538 10F0           JMP  >051A

*************************************************************************
*									*
*  GPL Instruction >E8,>EB						*
*									*
*************************************************************************

053A 0589           INC  R9
053C 05DC           INCT *R12
053E D19C           MOVB *R12,R6
0540 0986           SRL  R6,8
0542 D9A0 83F1 8300 MOVB @>83F1,@>8300(R6)
0548 10CE           JMP  >04E6
054A 065C           DECT *R12
054C 0609           DEC  R9
054E 10CB           JMP  >04E6
0550 C249           MOV  R9,R9
0552 1330           JEQ  >05B4
0554 D11D           MOVB *R13,R4
0556 D19C           MOVB *R12,R6
0558 D15D           MOVB *R13,R5
055A 0986           SRL  R6,8
055C B98E 8300      AB   R14,@>8300(R6)
0560 13F4           JEQ  >054A
0562 DB44 0402      MOVB R4,@>0402(R13)
0566 DB45 0402      MOVB R5,@>0402(R13)
056A 10BD           JMP  >04E6

*************************************************************************
*									*
*  GPL Instruction >EC,>ED - COINCIDENCE				*
*									*
*  Definition:  The Source operand must indicate a Y,X byte		*
*               pair for object 1; likewise, the Destination		*
*               operand indicates the Y,X byte pair for object 2;	*
*               COINC sets the status equal bit if the objects		*
*               are in coincidence; otherwise it resets the		*
*               status equal bit.					*
*									*
*************************************************************************

056C 0288 FFE4      CI   R8,>FFE4
0570 13EF           JEQ  >0550
0572 1511           JGT  >0596
0574 C04D           MOV  R13,R1
0576 0288 FFE2      CI   R8,>FFE2
057A 1309           JEQ  >058E
057C 150A           JGT  >0592
057E 06A0 05B8      BL   @>05B8

0582 0508           NEG  R8
0584 DA1D 835F      MOVB *R13,@>835F(R8)
0588 06A0 0880      BL   @>0880
058C 10AC           JMP  >04E6
058E 06A0 0778      BL   @>0778
0592 D0D1           MOVB *R1,R3
0594 10A8           JMP  >04E6
0596 06A0 0778      BL   @>0778
059A 0202 059E      LI   R2,>059E
059E D1B1           MOVB *R1+,R6
05A0 10B5           JMP  >050C

*************************************************************************
*									*
*  GPL Instruction >07 - LOAD SCREEN					*
*									*
*     Fill screen with next character					*
*									*
*************************************************************************

05A2 D15D           MOVB *R13,R5
05A4 06A0 08A4      BL   @>08A4		Set VDP write address to >0000
05A8 0207 0300      LI   R7,>0300
05AC DBC5 FFFE      MOVB R5,@>FFFE(R15)
05B0 0607           DEC  R7
05B2 16FC           JNE  >05AC
05B4 020B 0070      LI   R11,>0070
05B8 0A37           SLA  R7,3
05BA D807 837E      MOVB R7,@>837E
05BE 0A87           SLA  R7,8
05C0 0937           SRL  R7,3
05C2 D807 837F      MOVB R7,@>837F
05C6 045B           RT

*************************************************************************
*									*
*  GPL Instruction >F6 - I/O						*
*									*
*************************************************************************

05C8 C080           MOV  R0,R2
05CA C043           MOV  R3,R1
05CC A082           A    R2,R2
05CE C122 0CEC      MOV  @>0CEC(R2),R4
05D2 04C9           CLR  R9
05D4 0454           B    *R4

*************************************************************************
*									*
*  GPL Instruction >F0,>F1						*
*									*
*************************************************************************

05D6 024E FFFE      ANDI R14,>FFFE
05DA E380           SOC  R0,R14
05DC C813 83CC      MOV  *R3,@>83CC
05E0 D80E 83CE      MOVB R14,@>83CE
05E4 0460 0070      B    @>0070

*************************************************************************
*									*
*  GPL Instruction >F2,>F3						*
*									*
*************************************************************************

05E8 0589           INC  R9

*************************************************************************
*									*
*  GPL Instruction >F4,>F5						*
*									*
*************************************************************************

05EA C331           MOV  *R1+,R12
05EC A30C           A    R12,R12
05EE 04C2           CLR  R2
05F0 D0B1           MOVB *R1+,R2
05F2 0A42           SLA  R2,4
05F4 E242           SOC  R2,R9
05F6 0B69           SRC  R9,6
05F8 0269 3012      ORI  R9,>3012
05FC D091           MOVB *R1,R2
05FE 06C2           SWPB R2
0600 0222 8300      AI   R2,>8300
0604 0489           X    R9
0606 10EE           JMP  >05E4

*************************************************************************
*									*
*  GPL Instruction >0F - Execute Machine Instruction (XMLLNK)		*
*									*
*************************************************************************

0608 D25D           MOVB *R13,R9
060A C109           MOV  R9,R4
060C 09C9           SRL  R9,12
060E 0A19           SLA  R9,1
0610 0A44           SLA  R4,4
0612 09B4           SRL  R4,11
0614 A129 0CFA      A    @>0CFA(R9),R4
0618 C114           MOV  *R4,R4
061A 0694           BL   *R4
061C 10E3           JMP  >05E4

*************************************************************************
*									*
*  GPL Instruction >20 - Block move					*
*  									*
*  Move the specified number of bytes from source to the destination	*
*	OPERAND 1 - Number of bytes to move				*
*	OPERAND 2 - Source address					*
*	OPERAND 3 - Destination Address					*
*									*
*  Register use:                                                        *
*	R5 = 0 for single byte, <> 0 for double byte			*
*	R8 = Number of bytes to move					*
*	R9 = Copy of the op code					*
*									*
*************************************************************************

061E D14E           MOVB R14,R5
0620 0999           SRL  R9,9
0622 1804           JOC  >062C
0624 06A0 077A      BL   @>077A		The number of bytes is indirect
0628 C200           MOV  R0,R8
062A 1004           JMP  >0634
062C D21D           MOVB *R13,R8	Get the number of bytes in R8
062E 0AF4           SLA  R4,15		delay
0630 D81D 83F1      MOVB *R13,@>83F1	Get the rest of # of bytes in R8
0634 04C4           CLR  R4
0636 0AC9           SLA  R9,12
0638 06A0 0758      BL   @>0758
063C C081           MOV  R1,R2
063E B249           AB   R9,R9
0640 1702           JNC  >0646
0642 0224 0003      AI   R4,>0003
0646 C1C4           MOV  R4,R7
0648 04C4           CLR  R4
064A 06A0 0758      BL   @>0758
064E A104           A    R4,R4
0650 C1A4 0CCE      MOV  @>0CCE(R4),R6
0654 A1C7           A    R7,R7
0656 C1E7 0CD4      MOV  @>0CD4(R7),R7
065A 06A0 0864      BL   @>0864
065E 0456           B    *R6

*************************************************************************
*									*
*  GPL Instruction >D0,>D1						*
*									*
*************************************************************************

* Read a byte from RAM pointed to by R1 and put in into R11
* Then jump to a section of code that will store R11 somewhere.
*
0660 D2F1           MOVB *R1+,R11
0662 0457           B    *R7

*************************************************************************
*									*
*  GPL Instruction >D4,>D5						*
*									*
*************************************************************************

0664 D7E0 83E3      MOVB @>83E3,*R15
0668 D7C1           MOVB R1,*R15
066A 0581           INC  R1
066C D2EF FBFE      MOVB @>FBFE(R15),R11
0670 0457           B    *R7

*************************************************************************
*									*
*  GPL Instruction >D2,>D3						*
*									*
*************************************************************************

* Read a byte GROM pointed to by R1 and store it in R11
* Then jump to a section of code that will store R11 somewhere.
*

0672 DB41 0402      MOVB R1,@>0402(R13)
0676 DB60 83E3 0402 MOVB @>83E3,@>0402(R13)
067C 0581           INC  R1
067E D2DD           MOVB *R13,R11
0680 0457           B    *R7

*************************************************************************
*									*
*  GPL Instruction >D6,>D7						*
*									*
*************************************************************************

* Store the byte in R11 in CPU RAM pointed to by R2
*
0682 DC8B           MOVB R11,*R2+
0684 1022           JMP  >06CA

*************************************************************************
*									*
*  GPL Instruction >D8,>D9						*
*									*
*************************************************************************

* Store the byte in R11 in GRAM pointed to by R2
*
0686 DB42 0402      MOVB R2,@>0402(R13)
068A DB60 83E5 0402 MOVB @>83E5,@>0402(R13)
0690 0582           INC  R2
0692 DB4B 0400      MOVB R11,@>0400(R13)
0696 1019           JMP  >06CA

*************************************************************************
*									*
*  GPL Instruction >DC,>DD						*
*									*
*************************************************************************

0698 93A0 83E5      CB   @>83E5,R14
069C 1607           JNE  >06AC
069E 23A0 0012      COC  @>0012,14
06A2 1602           JNE  >06A8
06A4 026B 8000      ORI  R11,>8000
06A8 D80B 83D4      MOVB R11,@>83D4
06AC D7CB           MOVB R11,*R15
06AE 0262 0080      ORI  R2,>0080
06B2 D7E0 83E5      MOVB @>83E5,*R15
06B6 0582           INC  R2
06B8 1008           JMP  >06CA

*************************************************************************
*									*
*  GPL Instruction >DA,>DB						*
*									*
*************************************************************************

06BA D7E0 83E5      MOVB @>83E5,*R15
06BE 0262 4000      ORI  R2,>4000
06C2 D7C2           MOVB R2,*R15
06C4 0582           INC  R2
06C6 DBCB FFFE      MOVB R11,@>FFFE(R15)
06CA 0608           DEC  R8
06CC 15C8           JGT  >065E
06CE 0460 083E      B    @>083E

*************************************************************************
*									*
*  GPL Instruction >ED - COINC 						*
*									*
*************************************************************************

06D2 C200           MOV  R0,R8
06D4 C0C8           MOV  R8,R3
06D6 70C2           SB   R2,R3
06D8 06C8           SWPB R8
06DA 06C2           SWPB R2
06DC 7202           SB   R2,R8
06DE D01D           MOVB *R13,R0
06E0 0980           SRL  R0,8
06E2 D15D           MOVB *R13,R5
06E4 06C5           SWPB R5
06E6 D15D           MOVB *R13,R5
06E8 06C5           SWPB R5
06EA 06A0 0864      BL   @>0864
06EE DB45 0402      MOVB R5,@>0402(R13)
06F2 06C5           SWPB R5
06F4 DB45 0402      MOVB R5,@>0402(R13)
06F8 06C5           SWPB R5
06FA D09D           MOVB *R13,R2
06FC 1000           NOP
06FE D05D           MOVB *R13,R1
0700 1000           NOP
0702 D19D           MOVB *R13,R6
0704 1000           NOP
0706 D1DD           MOVB *R13,R7
0708 C000           MOV  R0,R0
070A 1302           JEQ  >0710
070C 0803           SRA  R3,0
070E 0808           SRA  R8,0
0710 B207           AB   R7,R8
0712 111E           JLT  >0750
0714 B0C6           AB   R6,R3
0716 111C           JLT  >0750
0718 9083           CB   R3,R2
071A 151A           JGT  >0750
071C 9048           CB   R8,R1
071E 1518           JGT  >0750
0720 0981           SRL  R1,8
0722 0581           INC  R1
0724 0983           SRL  R3,8
0726 3843           MPY  R3,1
0728 0988           SRL  R8,8
072A A088           A    R8,R2
072C C002           MOV  R2,R0
072E 0242 FFF8      ANDI R2,>FFF8
0732 6002           S    R2,R0
0734 0832           SRA  R2,3
0736 A085           A    R5,R2
0738 8CB2           C    *R2+,*R2+
073A DB42 0402      MOVB R2,@>0402(R13)
073E 0580           INC  R0
0740 DB60 83E5 0402 MOVB @>83E5,@>0402(R13)
0746 0202 2000      LI   R2,>2000
074A D0DD           MOVB *R13,R3
074C 0A03           SLA  R3,0
074E 1801           JOC  >0752
0750 04C2           CLR  R2
0752 D802 837C      MOVB R2,@>837C
0756 10BB           JMP  >06CE

0758 B249           AB   R9,R9
075A 180F           JOC  >077A		Jump if GD is not in ROM
075C D0DD           MOVB *R13,R3	GD is in GROM, put in R3
075E 0584           INC  R4
0760 D81D 83E7      MOVB *R13,@>83E7
0764 C30B           MOV  R11,R12
0766 B249           AB   R9,R9
0768 1704           JNC  >0772		Jump if not a VDP register
076A D05D           MOVB *R13,R1
076C 06A0 077E      BL   @>077E
0770 A0C0           A    R0,R3
0772 C043           MOV  R3,R1
0774 0919           SRL  R9,1
0776 045C           B    *R12

0778 04C5           CLR  R5

077A D05D           MOVB *R13,R1
077C 111E           JLT  >07BA		Jump if not Direct Addressing (83xx)
077E 0981           SRL  R1,8
0780 0221 8300      AI   R1,>8300	Add our base address
0784 0281 837D      CI   R1,>837D
0788 160F           JNE  >07A8
078A 04CA           CLR  R10
078C C18B           MOV  R11,R6
078E 06A0 0884      BL   @>0884
0792 C2C6           MOV  R6,R11
0794 D02F FBFE      MOVB @>FBFE(R15),R0
0798 23A0 0072      COC  @>0072,14
079C 1603           JNE  >07A4
079E 1701           JNC  >07A2
07A0 0A40           SLA  R0,4
07A2 0940           SRL  R0,4
07A4 D800 837D      MOVB R0,@>837D
07A8 D011           MOVB *R1,R0
07AA D145           MOVB R5,R5
07AC 1602           JNE  >07B2
07AE 0880           SRA  R0,8
07B0 045B           RT
07B2 D821 0001 83E1 MOVB @>0001(R1),@>83E1
07B8 045B           RT

07BA D81D 83E3      MOVB *R13,@>83E3	Fill in rest of R1
07BE C281           MOV  R1,R10
07C0 0241 0FFF      ANDI R1,>0FFF
07C4 0281 0F00      CI   R1,>0F00	Check for extended address
07C8 1103           JLT  >07D0
07CA 0A81           SLA  R1,8
07CC D81D 83E3      MOVB *R13,@>83E3	Get 2nd byte of extended address
07D0 0A2A           SLA  R10,2		Check for Indexed
07D2 1708           JNC  >07E4		Branch if not indexed
07D4 D19D           MOVB *R13,R6	Get index value
07D6 0986           SRL  R6,8
07D8 D026 8300      MOVB @>8300(R6),R0
07DC D826 8301 83E1 MOVB @>8301(R6),@>83E1
07E2 A040           A    R0,R1		Add value to our address
07E4 0A1A           SLA  R10,1		Check if VDP RAM
07E6 1715           JNC  >0812		Branch if CPU RAM
07E8 05C4           INCT R4
07EA 0A1A           SLA  R10,1		Check for DIRECT/INDIRECT
07EC 1706           JNC  >07FA		Jump if direct
07EE D021 8300      MOVB @>8300(R1),R0	VDP INDIRECT addressing
07F2 D821 8301 83E1 MOVB @>8301(R1),@>83E1
07F8 C040           MOV  R0,R1
07FA D7E0 83E3      MOVB @>83E3,*R15	VDP DIRECT addressing
07FE D7C1           MOVB R1,*R15	finish setting VDP read address
0800 0A80           SLA  R0,8
0802 D02F FBFE      MOVB @>FBFE(R15),R0	get byte of data from VDP RAM
0806 D145           MOVB R5,R5		check flags
0808 13D2           JEQ  >07AE		Single byte operand
080A D82F FBFE 83E1 MOVB @>FBFE(R15),@>83E1   Double byte operand
0810 045B           RT

0812 0A1A           SLA  R10,1		Get operand from CPU RAM
0814 17B5           JNC  >0780		Jump if direct addressing
0816 0281 007C      CI   R1,>007C	CPU/Indirect addressing
081A 1605           JNE  >0826
081C D060 8372      MOVB @>8372,R1
0820 780E 8372      SB   R14,@>8372
0824 10AC           JMP  >077E
0826 D061 8300      MOVB @>8300(R1),R1
082A 10A9           JMP  >077E

082C 06A0 0842      BL   @>0842
0830 C364 8300      MOV  @>8300(R4),R13
0834 DB44 0400      MOVB R4,@>0400(R13)

*************************************************************************
*									*
*  GPL Instruction >00 - Return from subroutine				*
*									*
*************************************************************************

0838 5820 011B 837C SZCB @>011B,@>837C	Clear COND bit in GPL status register

*************************************************************************
*									*
*  GPL Instruction >01 - Return from subroutine (save condition)	*
*									*
*************************************************************************

083E 020B 0070      LI   R11,>0070

0842 D120 8373      MOVB @>8373,R4	Restore GROM address
0846 0984           SRL  R4,8
0848 0660 8373      DECT @>8373
084C DB64 8300 0402 MOVB @>8300(R4),@>0402(R13)
0852 DB64 8301 0402 MOVB @>8301(R4),@>0402(R13)
0858 045B           RT

*************************************************************************
*									*
*  GPL Instruction >06 - Call subroutine				*
*									*
*************************************************************************

085A D19D           MOVB *R13,R6	Get destination address in R6
085C 020B 0060      LI   R11,>0060
0860 D81D 83ED      MOVB *R13,@>83ED
0864 05E0 8373      INCT @>8373		Save GROM address on stack
0868 D120 8373      MOVB @>8373,R4
086C 0984           SRL  R4,8
086E D92D 0002 8300 MOVB @>0002(R13),@>8300(R4)
0874 D92D 0002 8301 MOVB @>0002(R13),@>8301(R4)
087A 0624 8300      DEC  @>8300(R4)
087E 045B           RT

0880 020A 4000      LI   R10,>4000
0884 D1E0 837F      MOVB @>837F,R7
0888 23A0 0072      COC  @>0072,14
088C 130E           JEQ  >08AA
088E 0A37           SLA  R7,3
0890 0987           SRL  R7,8
0892 D1E0 837E      MOVB @>837E,R7
0896 0937           SRL  R7,3
0898 A1CA           A    R10,R7
089A D7E0 83EF      MOVB @>83EF,*R15
089E D7C7           MOVB R7,*R15
08A0 61CA           S    R10,R7
08A2 045B           RT

08A4 0207 4000      LI   R7,>4000
08A8 10F8           JMP  >089A
08AA D020 837E      MOVB @>837E,R0
08AE C200           MOV  R0,R8
08B0 0A58           SLA  R8,5
08B2 09D8           SRL  R8,13
08B4 09B0           SRL  R0,11
08B6 0A80           SLA  R0,8
08B8 A008           A    R8,R0
08BA C207           MOV  R7,R8
08BC 0247 3E00      ANDI R7,>3E00
08C0 0967           SRL  R7,6
08C2 A1C0           A    R0,R7
08C4 0227 0800      AI   R7,>0800
08C8 D7E0 83EF      MOVB @>83EF,*R15
08CC 0A88           SLA  R8,8
08CE D7C7           MOVB R7,*R15
08D0 028B 026A      CI   R11,>026A
08D4 16E6           JNE  >08A2
08D6 D02F FBFE      MOVB @>FBFE(R15),R0
08DA D220 837D      MOVB @>837D,R8
08DE 0248 0F00      ANDI R8,>0F00
08E2 1804           JOC  >08EC
08E4 0240 0F00      ANDI R0,>0F00
08E8 0A48           SLA  R8,4
08EA 1002           JMP  >08F0
08EC 0240 F000      ANDI R0,>F000
08F0 0267 4000      ORI  R7,>4000
08F4 06A0 089A      BL   @>089A
08F8 A008           A    R8,R0
08FA DBC0 FFFE      MOVB R0,@>FFFE(R15)
08FE 0456           B    *R6

*************************************************************************
*									*
*  			INTERRUPT ROUTINE				*
*									*
*************************************************************************

0900 0300 0000      LIMI >0000
0904 02E0 83E0      LWPI >83E0
0908 04CC           CLR  R12
090A 23A0 0032      COC  @>0032,14
090E 1602           JNE  >0914
0910 0460 1404      B    @>1404
0914 1F02           TB   2		VDP Vertical Synchronization
0916 1619           JNE  >094A
0918 020C 0F00      LI   R12,>0F00	Check our peripheral cards for
091C 1D01           SBO  1		interrupt routines
091E 1E00           SBZ  0
0920 022C 0100      AI   R12,>0100
0924 028C 2000      CI   R12,>2000
0928 130E           JEQ  >0946
092A 1D00           SBO  0		Turn on ROM
092C 9820 4000 000D CB   @>4000,@>000D	Is there a card present?
0932 16F5           JNE  >091E		If not, look for next card
0934 C0A0 400C      MOV  @>400C,R2	Does card have an interrupt routine?
0938 13F2           JEQ  >091E		If not, check next card
093A C002           MOV  R2,R0
093C C0A2 0002      MOV  @>0002(R2),R2
0940 0692           BL   *R2		Call the card's interrupt routine
0942 C090           MOV  *R0,R2
0944 10F9           JMP  >0938		OK, We called all the interrupt routines.
0946 0460 0AB8      B    @>0AB8

094A 1D02           SBO  2
094C D060 83C2      MOVB @>83C2,R1	Check our flags to see what we have to
0950 0A11           SLA  R1,1		do on the interrupt
0952 1702           JNC  >0958
0954 0460 0A84      B    @>0A84
0958 0A11           SLA  R1,1
095A 1846           JOC  >09E8

095C D320 837A      MOVB @>837A,R12		Sprite Update
0960 1343           JEQ  >09E8
0962 098C           SRL  R12,8
0964 0202 8800      LI   R2,VDPRD
0968 0203 8C00      LI   R3,VDPWD
096C 0208 0780      LI   R8,>0780
0970 D7E0 83F1      MOVB @>83F1,*R15
0974 D7C8           MOVB R8,*R15
0976 04C4           CLR  R4
0978 D112           MOVB *R2,R4
097A 04C6           CLR  R6
097C D192           MOVB *R2,R6
097E 0844           SRA  R4,4
0980 D152           MOVB *R2,R5
0982 0845           SRA  R5,4
0984 A144           A    R4,R5
0986 D1D2           MOVB *R2,R7
0988 0846           SRA  R6,4
098A 0847           SRA  R7,4
098C A1C6           A    R6,R7
098E 0228 FB80      AI   R8,>FB80
0992 D7E0 83F1      MOVB @>83F1,*R15
0996 D7C8           MOVB R8,*R15
0998 04C4           CLR  R4
099A D112           MOVB *R2,R4
099C A105           A    R5,R4
099E 0284 C0FF      CI   R4,>C0FF
09A2 1209           JLE  >09B6
09A4 0284 E000      CI   R4,>E000
09A8 1B06           JH   >09B6
09AA C145           MOV  R5,R5
09AC 1502           JGT  >09B2
09AE 0224 C000      AI   R4,>C000
09B2 0224 2000      AI   R4,>2000
09B6 04C6           CLR  R6
09B8 D192           MOVB *R2,R6
09BA A187           A    R7,R6
09BC 0268 4000      ORI  R8,>4000
09C0 D7E0 83F1      MOVB @>83F1,*R15
09C4 D7C8           MOVB R8,*R15
09C6 D4C4           MOVB R4,*R3
09C8 0228 0482      AI   R8,>0482
09CC D4C6           MOVB R6,*R3
09CE 06C5           SWPB R5
09D0 D7E0 83F1      MOVB @>83F1,*R15
09D4 D7C8           MOVB R8,*R15
09D6 0945           SRL  R5,4
09D8 D4C5           MOVB R5,*R3
09DA 06C7           SWPB R7
09DC 0947           SRL  R7,4
09DE D4C7           MOVB R7,*R3
09E0 0228 C002      AI   R8,>C002
09E4 060C           DEC  R12
09E6 15C4           JGT  >0970

09E8 0A11           SLA  R1,1
09EA 183D           JOC  >0A66
09EC D0A0 83CE      MOVB @>83CE,R2	Sound list processor
09F0 133A           JEQ  >0A66
09F2 780E 83CE      SB   R14,@>83CE
09F6 1637           JNE  >0A66
09F8 C0E0 83CC      MOV  @>83CC,R3	Get address of sound block
09FC C14E           MOV  R14,R5	     Check to see if block is in GROM or VDP RAM
09FE 0915           SRL  R5,1
0A00 180A           JOC  >0A16
0A02 06A0 0864      BL   @>0864
0A06 0205 0402      LI   R5,>0402
0A0A A14D           A    R13,R5
0A0C D543           MOVB R3,*R5		Set GROM read address to R3
0A0E D560 83E7      MOVB @>83E7,*R5
0A12 C18D           MOV  R13,R6
0A14 1007           JMP  >0A24
0A16 0205 8C02      LI   R5,VDPWA	Block is in VDP RAM
0A1A D560 83E7      MOVB @>83E7,*R5
0A1E D543           MOVB R3,*R5
0A20 0206 8800      LI   R6,VDPRD
0A24 D216           MOVB *R6,R8
0A26 130F           JEQ  >0A46		Sound block is in another address
0A28 9220 0A9C      CB   @>0A9C,R8	(>FF)
0A2C 130A           JEQ  >0A42
0A2E 0988           SRL  R8,8
0A30 A0C8           A    R8,R3
0A32 D816 8400      MOVB *R6,@>8400
0A36 0608           DEC  R8
0A38 16FC           JNE  >0A32
0A3A 05C3           INCT R3
0A3C D096           MOVB *R6,R2
0A3E 1309           JEQ  >0A52
0A40 1009           JMP  >0A54
0A42 2BA0 0378      XOR  @>0378,14	Switch from GROM to VDP or vice versa
0A46 D0D6           MOVB *R6,R3
0A48 0202 0100      LI   R2,>0100
0A4C D816 83E7      MOVB *R6,@>83E7
0A50 1001           JMP  >0A54
0A52 7082           SB   R2,R2
0A54 C803 83CC      MOV  R3,@>83CC
0A58 D802 83CE      MOVB R2,@>83CE
0A5C 0285 8C02      CI   R5,VDPWA
0A60 1302           JEQ  >0A66
0A62 06A0 0842      BL   @>0842

0A66 0A11           SLA  R1,1		Check for QUIT key pressed
0A68 180D           JOC  >0A84
0A6A 020C 0024      LI   R12,>0024
0A6E 30E0 0012      LDCR @>0012,3
0A72 0B7C           SRC  R12,7
0A74 020C 0006      LI   R12,>0006
0A78 3605           STCR R5,8
0A7A 2560 004C      CZC  @>004C,5
0A7E 1602           JNE  >0A84
0A80 0420 0000      BLWP @>0000

0A84 D82F FC00 837B MOVB @>FC00(R15),@>837B
0A8A 02E0 83C0      LWPI >83C0
0A8E 05CB           INCT R11		Check to see if we need to
0A90 160B           JNE  >0AA8		clear the screen
0A92 D30A           MOVB R10,R12
0A94 098C           SRL  R12,8
0A96 026C 8160      ORI  R12,>8160
0A9A 024C FFBF      ANDI R12,>FFBF
0A9E D820 83D9 8C02 MOVB @>83D9,@VDPWA
0AA4 D80C 8C02      MOVB R12,@VDPWA
0AA8 02E0 83E0      LWPI >83E0
0AAC B80E 8379      AB   R14,@>8379

0AB0 C320 83C4      MOV  @>83C4,R12		Call user-written interrupt
0AB4 1301           JEQ  >0AB8
0AB6 069C           BL   *R12
0AB8 04C8           CLR  R8
0ABA 02E0 83C0      LWPI >83C0
0ABE 0380           RTWP

*************************************************************************
*									*
*  This routine calls all the power up routines on all the peripheral 	*
*  cards.								*
*									*
*************************************************************************

0AC0 04C1           CLR  R1
0AC2 C320 83D0      MOV  @>83D0,R12
0AC6 1618           JNE  >0AF8
0AC8 020C 0F00      LI   R12,>0F00
0ACC C30C           MOV  R12,R12
0ACE 1301           JEQ  >0AD2
0AD0 1E00           SBZ  0
0AD2 022C 0100      AI   R12,>0100
0AD6 04E0 83D0      CLR  @>83D0
0ADA 028C 2000      CI   R12,>2000
0ADE 1320           JEQ  >0B20
0AE0 C80C 83D0      MOV  R12,@>83D0
0AE4 1D00           SBO  0
0AE6 0202 4000      LI   R2,>4000
0AEA 9812 000D      CB   *R2,@>000D	* Check for valid ID
0AEE 16EE           JNE  >0ACC
0AF0 B820 836D 83E5 AB   @>836D,@>83E5  * Add @>836D to R2
0AF6 1003           JMP  >0AFE
0AF8 C0A0 83D2      MOV  @>83D2,R2
0AFC 1D00           SBO  0
0AFE C092           MOV  *R2,R2
0B00 13E5           JEQ  >0ACC
0B02 C802 83D2      MOV  R2,@>83D2
0B06 05C2           INCT R2
0B08 C272           MOV  *R2+,R9
0B0A 06A0 0BE8      BL   @>0BE8
0B0E 10F4           JMP  >0AF8

0B10 0581           INC  R1
0B12 0699           BL   *R9
0B14 10F1           JMP  >0AF8
0B16 1E00           SBZ  0
0B18 1001           JMP  >0B1C
0B1A 04D8           CLR  *R8
0B1C 06A0 0842      BL   @>0842
0B20 0460 006A      B    @>006A

0B24 0207 83D2      LI   R7,>83D2	GROM and RAM search pointers
0B28 0208 83D0      LI   R8,>83D0
0B2C 06A0 0864      BL   @>0864		Save GROM address
0B30 C057           MOV  *R7,R1
0B32 C098           MOV  *R8,R2
0B34 1604           JNE  >0B3E
0B36 0202 9800      LI   R2,>9800
0B3A 0201 E000      LI   R1,>E000
0B3E 2460 0128      CZC  @>0128,1
0B42 160E           JNE  >0B60
0B44 C602           MOV  R2,*R8
0B46 D881 0402      MOVB R1,@>0402(R2)
0B4A D8A0 83E3 0402 MOVB @>83E3,@>0402(R2)
0B50 B820 836D 83E3 AB   @>836D,@>83E3
0B56 D801 83CB      MOVB R1,@>83CB
0B5A 9812 000D      CB   *R2,@>000D	* Check GROM for valid ID
0B5E 1632           JNE  >0BC4
0B60 D881 0402      MOVB R1,@>0402(R2)
0B64 D8A0 83E3 0402 MOVB @>83E3,@>0402(R2)
0B6A 0A4A           SLA  R10,4
0B6C D0D2           MOVB *R2,R3
0B6E 1000           NOP
0B70 D812 83E7      MOVB *R2,@>83E7
0B74 C5C3           MOV  R3,*R7
0B76 1326           JEQ  >0BC4
0B78 05C3           INCT R3
0B7A D883 0402      MOVB R3,@>0402(R2)
0B7E D8A0 83E7 0402 MOVB @>83E7,@>0402(R2)
0B84 1000           NOP
0B86 D252           MOVB *R2,R9
0B88 0A4A           SLA  R10,4
0B8A D812 83F3      MOVB *R2,@>83F3
0B8E 06A0 0BE8      BL   @>0BE8
0B92 10CE           JMP  >0B30
0B94 B820 0030 8372 AB   @>0030,@>8372
0B9A B80E 836C      AB   R14,@>836C
0B9E D120 8372      MOVB @>8372,R4
0BA2 0984           SRL  R4,8
0BA4 0643           DECT R3
0BA6 9820 836D 0C04 CB   @>836D,@>0C04
0BAC 1601           JNE  >0BB0
0BAE C243           MOV  R3,R9
0BB0 D909 8300      MOVB R9,@>8300(R4)
0BB4 D920 83F3 8301 MOVB @>83F3,@>8301(R4)
0BBA C342           MOV  R2,R13
0BBC 06A0 0842      BL   @>0842
0BC0 0460 00CE      B    @>00CE
0BC4 04C1           CLR  R1
0BC6 D060 83CB      MOVB @>83CB,R1
0BCA 0221 E000      AI   R1,>E000
0BCE C5C1           MOV  R1,*R7
0BD0 0281 E000      CI   R1,>E000
0BD4 16B4           JNE  >0B3E
0BD6 8CB2           C    *R2+,*R2+
0BD8 C602           MOV  R2,*R8
0BDA 0282 9840      CI   R2,>9840
0BDE 139D           JEQ  >0B1A
0BE0 D160 8355      MOVB @>8355,R5
0BE4 16AA           JNE  >0B3A
0BE6 109A           JMP  >0B1C
0BE8 D160 8355      MOVB @>8355,R5
0BEC 130D           JEQ  >0C08
0BEE 9485           CB   R5,*R2
0BF0 160C           JNE  >0C0A
0BF2 0985           SRL  R5,8
0BF4 0206 834A      LI   R6,FAC
0BF8 0282 9800      CI   R2,>9800
0BFC 1401           JHE  >0C00

0BFE 0582           INC  R2
0C00 94B6           CB   <something>
0C02 1603           JNE  >0C0A
0C04 0605           DEC  R5
0C06 16F8           JNE  >0BF8

0C08 05CB           INCT R11
0C0A 045B           RT

*************************************************************************
*									*
* GPL Instruction >F0,>F1,>F2,>F3 - UNUSED (yea, right)			*
*                 >FC,>FD,>FE,>FF - UNUSED (yea, right)			*
*									*
*************************************************************************

0C0C 06A0 0C28      BLWP @>0C28		Turn on card at >1B00
0C10 0460 4020      B    @>4020		Some sort of specific card?

*************************************************************************
*									*
*		GPL instruction >1F
*									*
*************************************************************************

0C14 06A0 0C28      BL   @>0C28		Turn on card at >1B00
0C18 0460 401C      B    @>401C		Branch to some specific routine?

* XOP 0

0C1C 02E0 2800      LWPI >2800		Use low memory for workspace?

0C20 06A0 0C28      BL   @>0C28		This looks like a very useless routine made
0C24 0460 4028      B    @>4028		for a specific, but unknown peripheral card
0C28 020C 1B00      LI   R12,>1B00
0C2C 1D00           SBO  0
0C2E 045B           RT

0C30 0000           ILLEGAL OBJECT CODE
0C32 0000           ILLEGAL OBJECT CODE
0C34 0000           ILLEGAL OBJECT CODE

*************************************************************************
*									*
*  Jump table for GPL instructions					*
*									*
*************************************************************************

0C36 0270           DATA >0270		Instruction >00 - >1F
0C38 061E           DATA >061E		Instruction >20 - >3F MOVE
0C3A 011A           DATA >011A		Instruction >40 - >5F BR
0C3C 010E           DATA >010E		Instruction >60 - >7F BS
0C3E 0838           DATA >0838		Instruction >00
0C40 083E           DATA >083E		Instruction >01
0C42 027A           DATA >027A		Instruction >02
0C44 02AE           DATA >02AE		Instruction >03
0C46 029E           DATA >029E		Instruction >04
0C48 0104           DATA >0104		Instruction >05
0C4A 085A           DATA >085A		Instruction >06
0C4C 05A2           DATA >05A2		Instruction >07
0C4E 04DE           DATA >04DE		Instruction >08
0C50 00F4           DATA >00F4          Instruction >09
0C52 00F4           DATA >00F4          Instruction >0A
0C54 0024           DATA >0024          Instruction >0B
0C56 00F4           DATA >00F4          Instruction >0C
0C58 00F4           DATA >00F4          Instruction >0D
0C5A 18C8           DATA >18C8          Instruction >0E
0C5C 0608           DATA >0608          Instruction >0F
0C5E 1920           DATA >1920          Instruction >10
0C60 1968           DATA >1968          Instruction >11
0C62 19F0           DATA >19F0          Instruction >12
0C64 082C           DATA >082C          Instruction >13
0C66 0C0C           DATA >0C0C          Instruction >14
0C68 0C0C           DATA >0C0C          Instruction >15
0C6A 0C0C           DATA >0C0C          Instruction >16
0C6C 0C0C           DATA >0C0C          Instruction >17
0C6E 0C0C           DATA >0C0C          Instruction >18
0C70 0C0C           DATA >0C0C          Instruction >19
0C72 0C0C           DATA >0C0C          Instruction >1A
0C74 0C0C           DATA >0C0C          Instruction >1B
0C76 0C0C           DATA >0C0C          Instruction >1C
0C78 0C0C           DATA >0C0C          Instruction >1D
0C7A 0C0C           DATA >0C0C          Instruction >1E
0C7C 0C14           DATA >0C14          Instruction >1F

0C7E 0136           DATA >0136          Instruction >80
0C80 013A           DATA >013A          Instruction >82
0C82 0140           DATA >0140          Instruction >84
0C84 013E           DATA >013E          Instruction >86
0C86 0144           DATA >0144          Instruction >88
0C88 0162           DATA >0162          Instruction >8A
0C8A 016E           DATA >016E          Instruction >8C
0C8C 00EA           DATA >00EA          Instruction >8E
0C8E 0186           DATA >0186          Instruction >90
0C90 0188           DATA >0188          Instruction >92
0C92 0184           DATA >0184          Instruction >94
0C94 0182           DATA >0182          Instruction >96
0C96 0C0C           DATA >0C0C          Instruction >98
0C98 0C0C           DATA >0C0C          Instruction >9A
0C9A 0C0C           DATA >0C0C          Instruction >9C
0C9C 0C0C           DATA >0C0C          Instruction >9E

0C9E 0188           DATA >0188          Instruction >A0,A1,A2,A3 - Add
0CA0 0186           DATA >0186          Instruction >A4,A5,A6,A7 - Sub
0CA2 01CE           DATA >01CE          Instruction >A8,A9,AA,AB - Mul
0CA4 01EA           DATA >01EA          Instruction >AC,AD,AE,AF - Div
0CA6 0190           DATA >0190          Instruction >B0,B1,B2,B3 - And
0CA8 0196           DATA >0196          Instruction >B4,B5,B6,B7 - Or
0CAA 019A           DATA >019A          Instruction >B8,B9,BA,BB - XOR
0CAC 019E           DATA >019E          Instruction >BC,BD,BE,BF - ST
0CAE 01A2           DATA >01A2          Instruction >C0,C1,C2,C3 - EX
0CB0 00D6           DATA >00D6          Instruction >C4,C5,C6,C7 - CH
0CB2 00DA           DATA >00DA          Instruction >C8,C9,CA,CB - CHE
0CB4 00DE           DATA >00DE          Instruction >CC,CD,CE,CF - CGT
0CB6 00CC           DATA >00CC          Instruction >D0,D1,D2,D3 - CGE
0CB8 00EC           DATA >00EC          Instruction >D4,D5,D6,D7 - CEQ
0CBA 00E2           DATA >00E2          Instruction >D8,D9,DA,DB - CLOG
0CBC 01B0           DATA >01B0          Instruction >DC,DD,DE,DF - SRA
0CBE 01B4           DATA >01B4          Instruction >E0,E1,E2,E3 - SLL
0CC0 01B8           DATA >01B8          Instruction >E4,E5,E6,E7 - SRL
0CC2 01C2           DATA >01C2          Instruction >E8,E9,EA,EB - SRC
0CC4 06D2           DATA >06D2          Instruction >ED          - COINC
0CC6 0C0C           DATA >0C0C          Instruction >F0,F1,F2,F3 - UNUSED
0CC8 05C8           DATA >05C8          Instruction >F6          - I/O
0CCA 004E           DATA >004E          Instruction >F8,F9,FA,FB - UNUSED
0CCC 0C0C           DATA >0C0C          Instruction >FC,FD,FE,FF - UNUSED

0CCE 0660           DATA >0660
0CD0 0672           DATA >0672
0CD2 0664           DATA >0664

0CD4 0682           DATA >0682
0CD6 0686           DATA >0686
0CD8 06BA           DATA >06BA
0CDA 0698           DATA >0698
0CDC 050A           DATA >050A
0CDE 0508           DATA >0508
0CE0 0504           DATA >0504
0CE2 0502           DATA >0502
0CE4 0534           DATA >0534
0CE6 0532           DATA >0532
0CE8 053A           DATA >053A
0CEA 056C           DATA >056C
0CEC 05D6           DATA >05D6
0CEE 05D6           DATA >05D6
0CF0 05E8           DATA >05E8
0CF2 05EA           DATA >05EA
0CF4 1346           DATA >1346
0CF6 142E           DATA >142E
0CF8 1426           DATA >1426

*************************************************************************
*									*
*			XMLLNK TABLES					*
*									*
*************************************************************************

0CFA 0D1A           DATA >0D1A	Points to floating point routines table
0CFC 12A0           DATA >12A0	Points to conversion and TI Basic routines table
0CFE 2000           DATA >2000	Points to table in memory expansion unit
0D00 3FC0           DATA >3FC0	Points to TI Basic enhancement table
0D02 3FE0           DATA >3FE0	Points to TI Basic enhancement table
0D04 4010           DATA >4010	Points to peripheral ROM routines table
0D06 4030           DATA >4030	Points to peripheral ROM routines table
0D08 6010           DATA >6010	Points to Command Module ROM routines table
0D0A 6030           DATA >6030	Points to Command Module ROM routines table
0D0C 7000           DATA >7000
0D0E 8000           DATA >8000
0D10 A000           DATA >A000
0D12 B000           DATA >B000
0D14 C000           DATA >C000
0D16 D000           DATA >D000
0D18 8300           DATA >8300

*************************************************************************
*									*
*		    FLOATING POINT ROUTINES TABLE			*
*									*
*************************************************************************

0D1A 0000           DATA >0000		System Reset
0D1C 0F54           DATA >0F54		Undocumented
0D1E 0FB2           DATA >0FB2		Undocumented
0D20 0FA4           DATA >0FA4		Undocumented
0D22 0FC2           DATA >0FC2		Undocumented
0D24 0FCC           DATA >0FCC		Undocumented
0D26 0D80           DATA >0D80	(FADD)	Add 2 floating point numbers
0D28 0D7C           DATA >0D7C	(FSUB)	Subtract 2 floating point numbers
0D2A 0E88           DATA >0E88	(FMUL)	Multiply 2 floating point numbers
0D2C 0FF4           DATA >0FF4	(FDIV)	Divide 2 floating point numbers
0D2E 0D3A           DATA >0D3A	(FCOM)	Compare 2 floating point numbers
0D30 0D84           DATA >0D84	(SADD)	Add using a stack in VDP RAM
0D32 0D74           DATA >0D74	(SSUB)	Subtract using a stack in VDP RAM
0D34 0E8C           DATA >0E8C	(SMUL)	Multiply using a stack in VDP RAM
0D36 0FF8           DATA >0FF8	(SDIV)	Divide using a stack in VDP RAM
0D38 0D46           DATA >0D46	(SCOMP)	Compare using a stack in VDP RAM

*************************************************************************
*									*
*  FCOM - Compare two floating point numbers				*
*  									*
*     This routine compares the two floating point numbers at FAC and	*
*  ARG and sets the status bits.					*
*									*
*************************************************************************

0D3A C28B           MOV  R11,R10
0D3C 0203 0FAA      LI   R3,>0FAA
0D40 1007           JMP  >0D50
0D42 C0CB           MOV  R11,R3
0D44 1003           JMP  >0D4C
0D46 0203 0FAA      LI   R3,>0FAA

*************************************************************************
*									*
*  SCOMP - Compare using a stack in VDP RAM				*
*  									*
*    This routines compares two floating point numbers.  One is in	*
*  FAC and the other is in VDP RAM and pointed to by VSPTR.		*
*									*
*************************************************************************

0D4A C28B           MOV  R11,R10
0D4C 06A0 1FA8      BL   @>1FA8
0D50 0207 835C      LI   R7,ARG
0D54 0205 834A      LI   R5,FAC
0D58 8D57           C    *R7,*R5+
0D5A 160B           JNE  >0D72
0D5C C1B7           MOV  *R7+,R6
0D5E 1309           JEQ  >0D72
0D60 1503           JGT  >0D68
0D62 C185           MOV  R5,R6
0D64 C147           MOV  R7,R5
0D66 C1C6           MOV  R6,R7
0D68 8D77           C    *R7+,*R5+
0D6A 1603           JNE  >0D72
0D6C 8D77           C    *R7+,*R5+
0D6E 1601           JNE  >0D72
0D70 8557           C    *R7,*R5
0D72 0453           B    *R3

*************************************************************************
*									*
*  SSUB - Subtract two floating point numbers using a stack		*
*  									*
*    This routines subtracts two floating point numbers.  One is in	*
*  FAC and the other is in VDP RAM and pointed to by VSPTR.		*
*									*
*  FAC := VSPTR^ - FAC							*
*									*
*************************************************************************

0D74 C28B           MOV  R11,R10
0D76 06A0 1FA8      BL   @>1FA8
0D7A C2CA           MOV  R10,R11

*************************************************************************
*									*
*  FSUB - Subtract two floating point numbers				*
*  									*
*    This routine subtracts two floating point numbers.  It does this	*
*  by negating the number in FAC and using the FADD routine.		*
*  									*
*  FAC := ARG - FAC							*
*									*
*************************************************************************

0D7C 0520 834A      NEG  @FAC

*************************************************************************
*									*
*  FADD - Add two floating point numbers				*
*  									*
*    This routine adds two floating point numbers.			*
*  									*
*  FAC := ARG + FAC							*
*									*
*************************************************************************

0D80 C28B           MOV  R11,R10
0D82 1003           JMP  >0D8A

*************************************************************************
*									*
*  SADD - Add two floating point numbers using a stack in VDP RAM	*
*  									*
*  FAC := VSPTR^ + ARG							*
*									*
*************************************************************************

0D84 C28B           MOV  R11,R10
0D86 06A0 1FA8      BL   @>1FA8
0D8A C1E0 835C      MOV  @ARG,R7
0D8E 130A           JEQ  >0DA4
0D90 C220 834A      MOV  @FAC,R8
0D94 1609           JNE  >0DA8
0D96 0201 FFF8      LI   R1,>FFF8		Move ARG to FAC
0D9A C861 8364 8352 MOV  @>8364(R1),@>8352(R1)
0DA0 05C1           INCT R1
0DA2 11FB           JLT  >0D9A
0DA4 0460 0FA6      B    @>0FA6
0DA8 29C8           XOR  R8,7
0DAA 0760 834A      ABS  @FAC	
0DAE 0760 835C      ABS  @ARG
0DB2 0203 FFF8      LI   R3,>FFF8
0DB6 88E3 8352 8364 C    @>8352(R3),@>8364(R3)
0DBC 150E           JGT  >0DDA
0DBE 1103           JLT  >0DC6
0DC0 05C3           INCT R3
0DC2 16F9           JNE  >0DB6
0DC4 100A           JMP  >0DDA
0DC6 C023 8364      MOV  @>8364(R3),R0
0DCA C8E3 8352 8364 MOV  @>8352(R3),@>8364(R3)
0DD0 C8C0 8352      MOV  R0,@>8352(R3)
0DD4 05C3           INCT R3
0DD6 16F7           JNE  >0DC6
0DD8 2A07           XOR  R7,8
0DDA 04C5           CLR  R5
0DDC 04E0 8352      CLR  @>8352
0DE0 04E0 8364      CLR  @>8364
0DE4 D808 8375      MOVB R8,@>8375
0DE8 04C6           CLR  R6
0DEA D820 834A 83ED MOVB @FAC,@>83ED
0DF0 C806 8376      MOV  R6,@>8376
0DF4 D805 834A      MOVB R5,@FAC
0DF8 7820 835C 83ED SB   @ARG,@>83ED
0DFE 0286 0007      CI   R6,>0007
0E02 1540           JGT  >0E84
0E04 C006           MOV  R6,R0
0E06 0208 0100      LI   R8,>0100
0E0A 0209 6400      LI   R9,>6400
0E0E 0205 8353      LI   R5,>8353
0E12 0206 8365      LI   R6,>8365
0E16 6180           S    R0,R6
0E18 C100           MOV  R0,R4
0E1A 0224 FFF7      AI   R4,>FFF7
0E1E C047           MOV  R7,R1
0E20 1120           JLT  >0E62
0E22 B556           AB   *R6,*R5
0E24 9255           CB   *R5,R9
0E26 1A03           JL   >0E2E
0E28 7549           SB   R9,*R5
0E2A B948 FFFF      AB   R8,@>FFFF(R5)
0E2E 0605           DEC  R5
0E30 0606           DEC  R6
0E32 0584           INC  R4
0E34 11F6           JLT  >0E22
0E36 1002           JMP  >0E3C
0E38 0605           DEC  R5
0E3A B548           AB   R8,*R5
0E3C 7549           SB   R9,*R5
0E3E 15FC           JGT  >0E38
0E40 13FB           JEQ  >0E38
0E42 B549           AB   R9,*R5
0E44 D060 834A      MOVB @FAC,R1
0E48 130B           JEQ  >0E60
0E4A 05A0 8376      INC  @>8376
0E4E 0201 8352      LI   R1,>8352
0E52 0202 0009      LI   R2,>0009
0E56 D851 0001      MOVB *R1,@>0001(R1)
0E5A 0601           DEC  R1
0E5C 0602           DEC  R2
0E5E 16FB           JNE  >0E56
0E60 107A           JMP  >0F56
0E62 7556           SB   *R6,*R5
0E64 1504           JGT  >0E6E
0E66 1303           JEQ  >0E6E
0E68 B549           AB   R9,*R5
0E6A 7948 FFFF      SB   R8,@>FFFF(R5)
0E6E 0605           DEC  R5
0E70 0606           DEC  R6
0E72 0584           INC  R4
0E74 11F6           JLT  >0E62
0E76 1003           JMP  >0E7E
0E78 B549           AB   R9,*R5
0E7A 0605           DEC  R5
0E7C 7548           SB   R8,*R5
0E7E D115           MOVB *R5,R4
0E80 11FB           JLT  >0E78
0E82 104C           JMP  >0F1C
0E84 0460 0F86      B    @>0F86

*************************************************************************
*									*
*  FMUL - Multiply two floating point numbers				*
*  									*
*  FAC := ARG * FAC							*
*									*
*************************************************************************

0E88 C28B           MOV  R11,R10
0E8A 1003           JMP  >0E92

*************************************************************************
*									*
*  SMUL - Multiply two floating point numbers using a stack in VDP RAM	*
*  									*
*  FAC := VSPTR^ * FAC							*
*									*
*************************************************************************

0E8C C28B           MOV  R11,R10
0E8E 06A0 1FA8      BL   @>1FA8
0E92 0203 834A      LI   R3,FAC
0E96 0205 835C      LI   R5,ARG
0E9A C213           MOV  *R3,R8
0E9C 1346           JEQ  >0F2A
0E9E 2A15           XOR  *R5,8
0EA0 0755           ABS  *R5
0EA2 1343           JEQ  >0F2A
0EA4 0753           ABS  *R3
0EA6 04C9           CLR  R9
0EA8 D253           MOVB *R3,R9
0EAA B255           AB   *R5,R9
0EAC 06C9           SWPB R9
0EAE 0229 FFC1      AI   R9,>FFC1
0EB2 C809 8376      MOV  R9,@>8376
0EB6 D808 8375      MOVB R8,@>8375
0EBA 0205 8352      LI   R5,>8352
0EBE 04F5           CLR  *R5+
0EC0 0285 835A      CI   R5,>835A
0EC4 16FC           JNE  >0EBE
0EC6 0205 8352      LI   R5,>8352
0ECA 0605           DEC  R5
0ECC D015           MOVB *R5,R0
0ECE 13FD           JEQ  >0ECA
0ED0 0207 0008      LI   R7,>0008
0ED4 0607           DEC  R7
0ED6 D027 835C      MOVB @ARG(R7),R0
0EDA 13FC           JEQ  >0ED4
0EDC 04C0           CLR  R0
0EDE 3880           MPY  R0,2
0EE0 C185           MOV  R5,R6
0EE2 0208 83E1      LI   R8,>83E1
0EE6 0209 0064      LI   R9,>0064
0EEA C107           MOV  R7,R4
0EEC A187           A    R7,R6
0EEE D815 83E7      MOVB *R5,@>83E7
0EF2 D543           MOVB R3,*R5
0EF4 D624 835C      MOVB @ARG(R4),*R8
0EF8 3803           MPY  R3,0
0EFA D816 83E5      MOVB *R6,@>83E5
0EFE A042           A    R2,R1
0F00 3C09           DIV  R9,0
0F02 D5A0 83E3      MOVB @>83E3,*R6
0F06 0606           DEC  R6
0F08 B598           AB   *R8,*R6
0F0A 0604           DEC  R4
0F0C 15F3           JGT  >0EF4
0F0E 0606           DEC  R6
0F10 0605           DEC  R5
0F12 0285 834A      CI   R5,FAC
0F16 15E9           JGT  >0EEA
0F18 04E0 8354      CLR  @>8354
0F1C 0201 FFF7      LI   R1,>FFF7
0F20 D0A1 8354      MOVB @>8354(R1),R2
0F24 1607           JNE  >0F34
0F26 0581           INC  R1
0F28 11FB           JLT  >0F20

0F2A 04E0 834A      CLR  @FAC		Set the value at FAC to zero.
0F2E 04E0 834C      CLR  @>834C
0F32 1039           JMP  >0FA6

0F34 C001           MOV  R1,R0
0F36 0220 0009      AI   R0,>0009
0F3A 130D           JEQ  >0F56
0F3C 6800 8376      S    R0,@>8376
0F40 0202 834B      LI   R2,>834B
0F44 DCA1 8354      MOVB @>8354(R1),*R2+
0F48 0581           INC  R1
0F4A 11FC           JLT  >0F44
0F4C DC81           MOVB R1,*R2+
0F4E 0600           DEC  R0
0F50 15FD           JGT  >0F4C
0F52 1001           JMP  >0F56

*************************************************************************
*									*
*	Some sort of undocumented floating point routine 		*
*									*
*************************************************************************

0F54 C28B           MOV  R11,R10
0F56 0200 3200      LI   R0,>3200	50*256
0F5A 8020 8352      C    @>8352,R0
0F5E 1113           JLT  >0F86
0F60 0201 0007      LI   R1,>0007
0F64 0202 0100      LI   R2,>0100
0F68 0200 6400      LI   R0,>6400	100*256
0F6C B842 834A      AB   R2,@FAC(R1)
0F70 9021 834A      CB   @FAC(R1),R0
0F74 1A08           JL   >0F86
0F76 7840 834A      SB   R0,@FAC(R1)
0F7A 0601           DEC  R1
0F7C 15F7           JGT  >0F6C
0F7E 05A0 8376      INC  @>8376
0F82 D802 834B      MOVB R2,@>834B

0F86 C0E0 8376      MOV  @>8376,R3
0F8A 0283 0080      CI   R3,>0080
0F8E 141A           JHE  >0FC4
0F90 D820 83E7 834A MOVB @>83E7,@FAC
0F96 D0A0 8375      MOVB @>8375,R2
0F9A 0542           INV  R2
0F9C 1102           JLT  >0FA2
0F9E 0520 834A      NEG  @FAC
0FA2 1001           JMP  >0FA6

*************************************************************************
*									*
*	Some sort of undocumented floating point routine 		*
*									*
*  Compare the value at FAC to zero (integer) and store the status	*
*  in >837C								*
*									*
*************************************************************************

0FA4 C28B           MOV  R11,R10
0FA6 C060 834A      MOV  @FAC,R1
0FAA 02C2           STST R2
0FAC D802 837C      MOVB R2,@>837C
0FB0 045A           B    *R10

*************************************************************************
*									*
*	Some sort of undocumented floating point routine 		*
*									*
*************************************************************************

0FB2 C28B           MOV  R11,R10
0FB4 D060 8354      MOVB @>8354,R1	Get the error code
0FB8 0981           SRL  R1,8		Put it in the lower byte of R1
0FBA 10D4           JMP  >0F64

0FBC 0209 0200      LI   R9,>0200	Store a great number in FAC
0FC0 1008           JMP  >0FD2		and store a 2 at >8351

*************************************************************************
*									*
*	Some sort of undocumented floating point routine 		*
*									*
*  This routine will either set FAC to zero, or the greatest number	*
*  possible depending on the value at >8376 (EXP).			*
*									*
*************************************************************************

0FC2 C28B           MOV  R11,R10
0FC4 D0A0 8376      MOVB @>8376,R2
0FC8 11B0           JLT  >0F2A
0FCA 1001           JMP  >0FCE

*************************************************************************
*									*
*	Some sort of undocumented floating point routine 		*
*									*
*  It will store either the greatest positive number in FAC or the	*
*  greatest negative number in FAC depending on the value at >8375 (SGN)*
*									*
*************************************************************************

0FCC C28B           MOV  R11,R10
0FCE 0209 0100      LI   R9,>0100
0FD2 0200 809D      LI   R0,>809D
0FD6 D0A0 8375      MOVB @>8375,R2	(SGN)
0FDA 1101           JLT  >0FDE
0FDC 0500           NEG  R0
0FDE 0202 834A      LI   R2,FAC		Store +9.9999999999999x10^127 in FAC
0FE2 CC80           MOV  R0,*R2+
0FE4 0200 6363      LI   R0,>6363
0FE8 CC80           MOV  R0,*R2+
0FEA CC80           MOV  R0,*R2+
0FEC C480           MOV  R0,*R2
0FEE D809 8354      MOVB R9,@>8354	Error code 1 - Overflow
0FF2 10D9           JMP  >0FA6

*************************************************************************
*									*
*  FDIV - Divide two floating point numbers				*
*  									*
*  FAC := ARG / FAC							*
*									*
*************************************************************************

0FF4 C28B           MOV  R11,R10
0FF6 1003           JMP  >0FFE

*************************************************************************
*									*
*  SDIV - Divide two floating point numbers using a stack in VDP RAM	*
*  									*
*  FAC := VSPTR^ / FAC							*
*									*
*************************************************************************

0FF8 C28B           MOV  R11,R10
0FFA 06A0 1FA8      BL   @>1FA8
0FFE 0203 834A      LI   R3,FAC
1002 C213           MOV  *R3,R8
1004 0200 835C      LI   R0,ARG
1008 2A10           XOR  *R0,8
100A D808 8375      MOVB R8,@>8375
100E 0753           ABS  *R3
1010 13D5           JEQ  >0FBC
1012 0750           ABS  *R0
1014 138A           JEQ  >0F2A
1016 D250           MOVB *R0,R9
1018 7253           SB   *R3,R9
101A 0889           SRA  R9,8
101C 0229 0040      AI   R9,>0040
1020 C809 8376      MOV  R9,@>8376
1024 0204 0004      LI   R4,>0004
1028 0205 8364      LI   R5,>8364
102C C8F3 0008      MOV  *R3+,@>0008(R3)
1030 04F5           CLR  *R5+
1032 0604           DEC  R4
1034 15FB           JGT  >102C
1036 D804 835C      MOVB R4,@ARG
103A 0205 83E1      LI   R5,>83E1
103E 0206 83E3      LI   R6,>83E3
1042 0207 0064      LI   R7,>0064
1046 04C2           CLR  R2
1048 D820 8355 83E5 MOVB @>8355,@>83E5
104E 0282 0031      CI   R2,>0031
1052 151E           JGT  >1090
1054 0582           INC  R2
1056 04C3           CLR  R3
1058 C107           MOV  R7,R4
105A 3CC2           DIV  R2,3
105C 0209 835C      LI   R9,ARG
1060 0204 0008      LI   R4,>0008
1064 0604           DEC  R4
1066 0609           DEC  R9
1068 D019           MOVB *R9,R0
106A 13FC           JEQ  >1064
106C 04C0           CLR  R0
106E C080           MOV  R0,R2
1070 D559           MOVB *R9,*R5
1072 3803           MPY  R3,0
1074 A042           A    R2,R1
1076 3C07           DIV  R7,0
1078 D656           MOVB *R6,*R9
107A 0609           DEC  R9
107C 0604           DEC  R4
107E 15F7           JGT  >106E
1080 0289 8354      CI   R9,>8354
1084 1603           JNE  >108C
1086 0209 8364      LI   R9,>8364
108A 10EA           JMP  >1060
108C D815 835C      MOVB *R5,@ARG
1090 0206 0008      LI   R6,>0008
1094 0606           DEC  R6
1096 D026 8354      MOVB @>8354(R6),R0
109A 13FC           JEQ  >1094
109C 04C7           CLR  R7
109E D820 8355 83EF MOVB @>8355,@>83EF
10A4 C207           MOV  R7,R8
10A6 3A20 1044      MPY  @>1044,8
10AA D820 8356 83F1 MOVB @>8356,@>83F1
10B0 A248           A    R8,R9
10B2 0205 FFF7      LI   R5,>FFF7
10B6 020B 835C      LI   R11,ARG
10BA 04C2           CLR  R2
10BC D81B 83E5      MOVB *R11,@>83E5
10C0 38A0 1044      MPY  @>1044,2
10C4 04C0           CLR  R0
10C6 D82B 0001 83E1 MOVB @>0001(R11),@>83E1
10CC A0C0           A    R0,R3
10CE 3C87           DIV  R7,2
10D0 38E0 1044      MPY  @>1044,3
10D4 D82B 0002 83E1 MOVB @>0002(R11),@>83E1
10DA A100           A    R0,R4
10DC C002           MOV  R2,R0
10DE 3808           MPY  R8,0
10E0 8802 1044      C    R2,@>1044
10E4 1302           JEQ  >10EA
10E6 6044           S    R4,R1
10E8 1003           JMP  >10F0
10EA 6044           S    R4,R1
10EC 0602           DEC  R2
10EE 6049           S    R9,R1
10F0 15FD           JGT  >10EC
10F2 C082           MOV  R2,R2
10F4 1329           JEQ  >1148
10F6 04C3           CLR  R3
10F8 C106           MOV  R6,R4
10FA A2C6           A    R6,R11
10FC C0C0           MOV  R0,R3
10FE D824 8354 83E1 MOVB @>8354(R4),@>83E1
1104 3802           MPY  R2,0
1106 A043           A    R3,R1
1108 3C20 1044      DIV  @>1044,0
110C 76E0 83E3      SB   @>83E3,*R11
1110 1504           JGT  >111A
1112 1303           JEQ  >111A
1114 B6E0 1045      AB   @>1045,*R11
1118 0580           INC  R0
111A 060B           DEC  R11
111C 0604           DEC  R4
111E 15EE           JGT  >10FC
1120 76E0 83E1      SB   @>83E1,*R11
1124 1511           JGT  >1148
1126 1310           JEQ  >1148
1128 0602           DEC  R2
112A C106           MOV  R6,R4
112C A2C6           A    R6,R11
112E B6E4 8354      AB   @>8354(R4),*R11
1132 981B 1045      CB   *R11,@>1045
1136 1A05           JL   >1142
1138 76E0 1045      SB   @>1045,*R11
113C BAE0 0E59 FFFF AB   @>0E59,@>FFFF(R11)
1142 060B           DEC  R11
1144 0604           DEC  R4
1146 15F3           JGT  >112E
1148 D960 83E5 8354 MOVB @>83E5,@>8354(R5)
114E 058B           INC  R11
1150 0585           INC  R5
1152 11B3           JLT  >10BA
1154 0460 0F18      B    @>0F18
1158 3203           LDCR R3,8
115A 04C4           CLR  R4
115C 04C0           CLR  R0
115E C24B           MOV  R11,R9
1160 1008           JMP  >1172
1162 3920 117A      MPY  @>117A,4
1166 C104           MOV  R4,R4
1168 160D           JNE  >1184
116A 0580           INC  R0
116C A148           A    R8,R5
116E C105           MOV  R5,R4
1170 1109           JLT  >1184
1172 0693           BL   *R3
1174 0228 FFD0      AI   R8,>FFD0
1178 0288 000A      CI   R8,>000A
117C 1AF2           JL   >1162
117E C000           MOV  R0,R0
1180 1306           JEQ  >118E
1182 0459           B    *R9
1184 0209 1190      LI   R9,>1190
1188 10F4           JMP  >1172
118A 0460 0F2A      B    @>0F2A
118E 045A           B    *R10
1190 0606           DEC  R6
1192 C806 8356      MOV  R6,@>8356
1196 808C           C    R12,R2
1198 13F8           JEQ  >118A
119A C801 8376      MOV  R1,@>8376
119E 0460 0FC4      B    @>0FC4
11A2 D0E0 8389      MOVB @>8389,R3
11A6 1303           JEQ  >11AE
11A8 0203 1FDA      LI   R3,>1FDA
11AC 1002           JMP  >11B2

*************************************************************************
*									*
*  CSN - Convert string to number					*
*  									*
*  FAC + 12 is the address of the string in RAM				*
*  FAC is the result							*
*									*
*************************************************************************

11AE 0203 1FC8      LI   R3,>1FC8
11B2 C28B           MOV  R11,R10
11B4 C1A0 8356      MOV  @>8356,R6
11B8 0693           BL   *R3
11BA 04C7           CLR  R7
11BC C086           MOV  R6,R2
11BE 0288 002B      CI   R8,>002B
11C2 1304           JEQ  >11CC
11C4 0288 002D      CI   R8,>002D
11C8 1603           JNE  >11D0
11CA 0707           SETO R7
11CC 0582           INC  R2
11CE 0693           BL   *R3
11D0 0288 0030      CI   R8,>0030
11D4 13FC           JEQ  >11CE
11D6 D807 8375      MOVB R7,@>8375
11DA C306           MOV  R6,R12
11DC 060C           DEC  R12
11DE 0707           SETO R7
11E0 1002           JMP  >11E6
11E2 0587           INC  R7
11E4 0693           BL   *R3
11E6 0288 0030      CI   R8,>0030
11EA 1A03           JL   >11F2
11EC 0288 0039      CI   R8,>0039
11F0 12F8           JLE  >11E2
11F2 0288 002E      CI   R8,>002E
11F6 1614           JNE  >1220
11F8 0582           INC  R2
11FA C1C7           MOV  R7,R7
11FC 1102           JLT  >1202
11FE 1007           JMP  >120E
1200 0607           DEC  R7
1202 0693           BL   *R3
1204 0288 0030      CI   R8,>0030
1208 13FB           JEQ  >1200
120A 0606           DEC  R6
120C C306           MOV  R6,R12
120E 0693           BL   *R3
1210 0288 0030      CI   R8,>0030
1214 1A03           JL   >121C
1216 0288 0039      CI   R8,>0039
121A 12F9           JLE  >120E
121C 8086           C    R6,R2
121E 13B5           JEQ  >118A
1220 C086           MOV  R6,R2
1222 04C4           CLR  R4
1224 0602           DEC  R2
1226 04C1           CLR  R1
1228 0288 0045      CI   R8,>0045
122C 160F           JNE  >124C
122E 0693           BL   *R3
1230 0288 002B      CI   R8,>002B
1234 1306           JEQ  >1242
1236 0288 002D      CI   R8,>002D
123A 1602           JNE  >1240
123C 0601           DEC  R1
123E 1001           JMP  >1242
1240 0606           DEC  R6
1242 06A0 115A      BL   @>115A
1246 D041           MOVB R1,R1
1248 1301           JEQ  >124C
124A 0504           NEG  R4
124C 0606           DEC  R6
124E C806 8356      MOV  R6,@>8356
1252 808C           C    R12,R2
1254 139A           JEQ  >118A
1256 0224 0080      AI   R4,>0080
125A 04C1           CLR  R1
125C A107           A    R7,R4
125E C1C4           MOV  R4,R7
1260 0814           SRA  R4,1
1262 C804 8376      MOV  R4,@>8376
1266 0B17           SRC  R7,1
1268 0205 0008      LI   R5,>0008
126C 0200 834B      LI   R0,>834B
1270 C18C           MOV  R12,R6
1272 8086           C    R6,R2
1274 130F           JEQ  >1294
1276 0693           BL   *R3
1278 0288 002E      CI   R8,>002E
127C 13FA           JEQ  >1272
127E 0228 FFD0      AI   R8,>FFD0
1282 0547           INV  R7
1284 1105           JLT  >1290
1286 3A20 117A      MPY  @>117A,8
128A D060 83F3      MOVB @>83F3,R1
128E 10F1           JMP  >1272
1290 B060 83F1      AB   @>83F1,R1
1294 DC01           MOVB R1,*R0+
1296 04C1           CLR  R1
1298 0605           DEC  R5
129A 16EB           JNE  >1272
129C 0460 0F56      B    @>0F56

*************************************************************************
*									*
*		CONVERSION AND TI BASIC ROUTINES TABLE			*
*									*
*************************************************************************

12A0 11AE           DATA >11AE		Convert string to number
12A2 11A2           DATA >11A2
12A4 12B8           DATA >12B8		Convert floating point to integer
12A6 1648           DATA >1648
12A8 164E           DATA >164E
12AA 1642           DATA >1642
12AC 15D6           DATA >15D6
12AE 163C           DATA >163C
12B0 1F2E           DATA >1F2E
12B2 0AC0           DATA >0AC0		Call peripheral routine
12B4 0B24           DATA >0B24
12B6 1868           DATA >1868

*************************************************************************
*									*
*  CFI - Convert floating point to integer				*
*  									*
*  Input:	FAC is the floating point number to be converted	*
*  Output:	FAC = 1 word integer value				*
*  If there is an overflow, FAC + 10 (>8354) = >03			*
*									*
*************************************************************************

12B8 C120 834A      MOV  @FAC,R4
12BC 1342           JEQ  >1342          If number=0, we just return
12BE 04C0           CLR  R0             R0 will be the integer value
12C0 0202 834B      LI   R2,FAC+1
12C4 04C3           CLR  R3
12C6 0760 834A      ABS  @FAC
12CA 04C5           CLR  R5
12CC D160 834A      MOVB @FAC,R5
12D0 0285 3F00      CI   R5,>3F00       See if exponent = -1
12D4 1134           JLT  >133E          If less, return 0
12D6 1318           JEQ  >1308          If equal, check for rounding up
12D8 0285 4100      CI   R5,>4100       See if exponent = 1
12DC 1112           JLT  >1302             (1-99)
12DE 1308           JEQ  >12F0             (100-9,999)
12E0 0285 4200      CI   R5,>4200       See if exponent= 2
12E4 1B25           JH   >1330             (>999,999) Overflow
12E6 D832 83E1      MOVB *R2+,@>83E1    (10,000-999,999)
12EA 3820 1320      MPY  @>1320,0       Multiply by 100
12EE C001           MOV  R1,R0
12F0 D832 83E7      MOVB *R2+,@>83E7    Move to lower byte of R3
12F4 A003           A    R3,R0
12F6 3820 1320      MPY  @>1320,0       Multiply by 100
12FA C000           MOV  R0,R0          Check for overflow
12FC 1619           JNE  >1330
12FE C001           MOV  R1,R0
1300 1117           JLT  >1330          Overflow if R0 > 32767
1302 D832 83E7      MOVB *R2+,@>83E7    Move to lower byte of R3
1306 A003           A    R3,R0
1308 9832 1158      CB   *R2+,@>1158    See if fraction is 50 or above
130C 110B           JLT  >1324
130E 1509           JGT  >1322          If so, round up
1310 C104           MOV  R4,R4
1312 1507           JGT  >1322
1314 D0F2           MOVB *R2+,R3
1316 1605           JNE  >1322
1318 0282 8352      CI   R2,FAC+8
131C 1AFB           JL   >1314
131E 1002           JMP  >1324

1320 0064           DATA 100

1322 0580           INC  R0
1324 0280 8000      CI   R0,>8000
1328 1A07           JL   >1338
132A 1B02           JH   >1330
132C C104           MOV  R4,R4
132E 1106           JLT  >133C
1330 D820 1159 8354 MOVB @>1159,@FAC+10   Set overflow flag
1336 045B           RT

1338 0544           INV  R4
133A 1101           JLT  >133E
133C 0500           NEG  R0
133E C800 834A      MOV  R0,@FAC
1342 045B           RT

1344 0010           DATA >0010

*************************************************************************
*									*
*  GPL Instruction >F6,>F7 - I/O Instruction				*
*									*
*  Definition:  This is an extended instruction in the sense that	*
*               the action that occurs depends upon the value of	*
*               the IMM field. Specifically, this instruction		*
*               does SOUND , CRU input and output.			*
*									*
*************************************************************************

1346 04C0           CLR  R0
1348 0202 0300      LI   R2,>0300
134C 0208 1E19      LI   R8,>1E19
1350 0203 0023      LI   R3,>0023
1354 06A0 13BA      BL   @>13BA
1358 0200 13E2      LI   R0,>13E2
135C 0300 0001      LIMI >0001
1360 04C4           CLR  R4
1362 0690           BL   *R0
1364 0602           DEC  R2
1366 16FC           JNE  >1360
1368 0704           SETO R4
136A 0690           BL   *R0
136C C105           MOV  R5,R4
136E 06C4           SWPB R4
1370 0690           BL   *R0
1372 C105           MOV  R5,R4
1374 06C4           SWPB R4
1376 0690           BL   *R0
1378 04C9           CLR  R9
137A 0202 0008      LI   R2,>0008
137E 04C4           CLR  R4
1380 0690           BL   *R0
1382 0602           DEC  R2
1384 16FC           JNE  >137E
1386 0704           SETO R4
1388 0690           BL   *R0
138A D7E0 83F5      MOVB @>83F5,*R15
138E 0202 0040      LI   R2,>0040
1392 D7CA           MOVB R10,*R15
1394 04C7           CLR  R7
1396 04C4           CLR  R4
1398 D12F FBFE      MOVB @>FBFE(R15),R4
139C A1C4           A    R4,R7
139E 0690           BL   *R0
13A0 0602           DEC  R2
13A2 16F9           JNE  >1396
13A4 C107           MOV  R7,R4
13A6 0690           BL   *R0
13A8 0549           INV  R9
13AA 16E7           JNE  >137A
13AC 022A 0040      AI   R10,>0040
13B0 0605           DEC  R5
13B2 16E3           JNE  >137A
13B4 10FF           JMP  >13B4
13B6 0460 155E      B    @>155E
13BA C171           MOV  *R1+,R5
13BC 0225 003F      AI   R5,>003F
13C0 0965           SRL  R5,6
13C2 E011           SOC  *R1,R0
13C4 C280           MOV  R0,R10
13C6 D7E0 83E1      MOVB @>83E1,*R15
13CA 04C1           CLR  R1
13CC 04CC           CLR  R12
13CE D7C0           MOVB R0,*R15
13D0 E3A0 0032      SOC  @>0032,R14
13D4 1E02           SBZ  2
13D6 1E0C           SBZ  12
13D8 33C3           LDCR R3,15
13DA 1E00           SBZ  0
13DC 1E01           SBZ  1
13DE 1D03           SBO  3
13E0 045B           RT

13E2 0206 0008      LI   R6,>0008
13E6 0544           INV  R4
13E8 10FF           JMP  >13E8
13EA 0488           X    R8
13EC 2A20 135C      XOR  @>135C,8
13F0 10FF           JMP  >13F0
13F2 C104           MOV  R4,R4
13F4 1103           JLT  >13FC
13F6 0488           X    R8
13F8 2A20 135C      XOR  @>135C,8
13FC 0A14           SLA  R4,1
13FE 0606           DEC  R6
1400 16F3           JNE  >13E8
1402 045B           RT

1404 1E00           SBZ  0
1406 1D03           SBO  3
1408 C041           MOV  R1,R1
140A 1107           JLT  >141A
140C 02E0 83C0      LWPI >83C0
1410 881E 13F0      C    *R14,@>13F0
1414 1602           JNE  >141A
1416 05CE           INCT R14
1418 0380           RTWP

141A 02E0 83C0      LWPI >83C0
141E C3A0 83EC      MOV  @>83EC,R14
1422 10FA           JMP  >1418
1424 2100           DATA >2100

*************************************************************************
*									*
*************************************************************************

1426 E3A0 1344      SOC  @>1344,R14
142A 04C0           CLR  R0
142C 1004           JMP  >1436

*************************************************************************
*									*
*************************************************************************

142E 43A0 1344      SZC  @>1344,R14
1432 0200 4000      LI   R0,>4000
1436 0203 002B      LI   R3,>002B
143A 06A0 13BA      BL   @>13BA
143E C1CA           MOV  R10,R7
1440 04C0           CLR  R0
1442 D820 1443 837C MOVB @>1443,@>837C
1448 0208 7530      LI   R8,>7530
144C 0300 0001      LIMI >0001
1450 0206 1458      LI   R6,>1458
1454 0203 002B      LI   R3,>002B
1458 0241 00FF      ANDI R1,>00FF
145C 0608           DEC  R8
145E 137F           JEQ  >155E
1460 0202 0030      LI   R2,>0030
1464 C000           MOV  R0,R0
1466 1601           JNE  >146A
1468 A082           A    R2,R2
146A 06A0 1572      BL   @>1572
146E 1001           JMP  >1472
1470 10F3           JMP  >1458
1472 0602           DEC  R2
1474 16FA           JNE  >146A
1476 0209 7FFF      LI   R9,>7FFF
147A 0208 0008      LI   R8,>0008
147E 33C9           LDCR R9,15
1480 1E00           SBZ  0
1482 1D03           SBO  3
1484 06A0 15BA      BL   @>15BA
1488 1001           JMP  >148C
148A 10FC           JMP  >1484
148C 0608           DEC  R8
148E 16FA           JNE  >1484
1490 1D00           SBO  0
1492 37C3           STCR R3,15
1494 6243           S    R3,R9
1496 C0C9           MOV  R9,R3
1498 0A29           SLA  R9,2
149A A0C9           A    R9,R3
149C 0963           SRL  R3,6
149E 0263 0001      ORI  R3,>0001
14A2 020A 14B0      LI   R10,>14B0
14A6 0283 001F      CI   R3,>001F
14AA 11D4           JLT  >1454
14AC 0460 1580      B    @>1580
14B0 06A0 1572      BL   @>1572
14B4 10FD           JMP  >14B0
14B6 0202 0007      LI   R2,>0007
14BA 06A0 1572      BL   @>1572
14BE 10CC           JMP  >1458
14C0 0602           DEC  R2
14C2 16FB           JNE  >14BA
14C4 0206 14F8      LI   R6,>14F8
14C8 C000           MOV  R0,R0
14CA 1631           JNE  >152E
14CC D820 1424 837C MOVB @>1424,@>837C
14D2 C007           MOV  R7,R0
14D4 04C7           CLR  R7
14D6 06A0 15A0      BL   @>15A0
14DA 8105           C    R5,R4
14DC 1A40           JL   >155E
14DE C144           MOV  R4,R5
14E0 0585           INC  R5
14E2 0507           NEG  R7
14E4 06A0 15A0      BL   @>15A0
14E8 163A           JNE  >155E
14EA 101D           JMP  >1526
14EC 0247 00FF      ANDI R7,>00FF
14F0 0507           NEG  R7
14F2 06A0 15A0      BL   @>15A0
14F6 1307           JEQ  >1506
14F8 C145           MOV  R5,R5
14FA 1131           JLT  >155E
14FC D7E0 83E1      MOVB @>83E1,*R15
1500 0505           NEG  R5
1502 D7C0           MOVB R0,*R15
1504 10A1           JMP  >1448
1506 C145           MOV  R5,R5
1508 1108           JLT  >151A
150A 0202 0049      LI   R2,>0049
150E 0206 1516      LI   R6,>1516
1512 06A0 15A0      BL   @>15A0
1516 0602           DEC  R2
1518 16FA           JNE  >150E
151A 0220 0040      AI   R0,>0040
151E D7E0 83E1      MOVB @>83E1,*R15
1522 0745           ABS  R5
1524 D7C0           MOVB R0,*R15
1526 04C7           CLR  R7
1528 0605           DEC  R5
152A 168E           JNE  >1448
152C 1015           JMP  >1558
152E 0202 0040      LI   R2,>0040
1532 04C7           CLR  R7
1534 06A0 15A0      BL   @>15A0
1538 06C4           SWPB R4
153A 23A0 1344      COC  @>1344,14
153E 1607           JNE  >154E
1540 712F FBFE      SB   @>FBFE(R15),R4
1544 1306           JEQ  >1552
1546 0285 0001      CI   R5,>0001
154A 1303           JEQ  >1552
154C 10D5           JMP  >14F8
154E DBC4 FFFE      MOVB R4,@>FFFE(R15)
1552 0602           DEC  R2
1554 16EF           JNE  >1534
1556 10CA           JMP  >14EC
1558 D820 1438 837C MOVB @>1438,@>837C
155E 43A0 1344      SZC  @>1344,R14
1562 43A0 0032      SZC  @>0032,R14
1566 1E03           SBZ  3
1568 1D0C           SBO  12
156A 1D01           SBO  1
156C 1D02           SBO  2
156E 0460 0070      B    @>0070
1572 C28B           MOV  R11,R10
1574 10FF           JMP  >1574
1576 06A0 15BA      BL   @>15BA
157A 05CA           INCT R10
157C 0261 FF00      ORI  R1,>FF00
1580 2460 145A      CZC  @>145A,1
1584 1303           JEQ  >158C
1586 1F1B           TB   27
1588 1603           JNE  >1590
158A 10FD           JMP  >1586
158C 1F1B           TB   27
158E 16FE           JNE  >158C
1590 33C3           LDCR R3,15
1592 1E00           SBZ  0
1594 1D03           SBO  3
1596 0241 00FF      ANDI R1,>00FF
159A 2860 145A      XOR  @>145A,1
159E 045A           B    *R10
15A0 0208 0008      LI   R8,>0008
15A4 04C4           CLR  R4
15A6 C24B           MOV  R11,R9
15A8 0A14           SLA  R4,1
15AA 06A0 1572      BL   @>1572
15AE 1001           JMP  >15B2
15B0 0584           INC  R4
15B2 0608           DEC  R8
15B4 16F9           JNE  >15A8
15B6 A1C4           A    R4,R7
15B8 0459           B    *R9
15BA 1F1B           TB   27
15BC 1306           JEQ  >15CA
15BE 2460 145A      CZC  @>145A,1
15C2 1306           JEQ  >15D0
15C4 2860 145A      XOR  @>145A,1
15C8 045B           RT

15CA 2460 145A      CZC  @>145A,1
15CE 13FA           JEQ  >15C4
15D0 05CB           INCT R11
15D2 045B           RT

15D4 6500           S    R0,*R4
15D6 06A0 15E0      BL   @>15E0
15DA 006A           DATA >006A
15DC 0460 00CE      B    @>00CE
15E0 C120 833E      MOV  @>833E,R4
15E4 1312           JEQ  >160A
15E6 D0E0 8359      MOVB @>8359,R3
15EA 04C7           CLR  R7
15EC 0584           INC  R4
15EE D7E0 83E9      MOVB @>83E9,*R15
15F2 1000           NOP
15F4 D7C4           MOVB R4,*R15
15F6 020A 8800      LI   R10,VDPRD
15FA 90DA           CB   *R10,R3
15FC 1308           JEQ  >160E
15FE D19A           MOVB *R10,R6
1600 1000           NOP
1602 D81A 83ED      MOVB *R10,@>83ED
1606 C106           MOV  R6,R4
1608 16F1           JNE  >15EC
160A C2DB           MOV  *R11,R11
160C 045B           RT

160E D19A           MOVB *R10,R6
1610 1000           NOP
1612 D81A 83ED      MOVB *R10,@>83ED
1616 1000           NOP
1618 D15A           MOVB *R10,R5
161A D803 83EF      MOVB R3,@>83EF
161E D09A           MOVB *R10,R2
1620 D7C2           MOVB R2,*R15
1622 1000           NOP
1624 D7C5           MOVB R5,*R15
1626 0202 834A      LI   R2,FAC
162A 9C9A           CB   *R10,*R2+
162C 16EC           JNE  >1606
162E 0607           DEC  R7
1630 15FC           JGT  >162A
1632 0604           DEC  R4
1634 C804 834A      MOV  R4,@FAC
1638 046B 0002      B    @>0002(R11)
163C 0206 1EAA      LI   R6,>1EAA
1640 1008           JMP  >1652
1642 0206 1788      LI   R6,>1788
1646 1005           JMP  >1652
1648 0206 176A      LI   R6,>176A
164C 1002           JMP  >1652
164E 0206 1670      LI   R6,>1670
1652 C1CB           MOV  R11,R7
1654 06A0 0864      BL   @>0864
1658 06A0 1E7A      BL   @>1E7A
165C 05C9           INCT R9
165E C647           MOV  R7,*R9
1660 0696           BL   *R6
1662 C1D9           MOV  *R9,R7
1664 0649           DECT R9
1666 06A0 1E8C      BL   @>1E8C
166A 06A0 0842      BL   @>0842
166E 0457           B    *R7
1670 05C9           INCT R9
1672 C64B           MOV  R11,*R9
1674 C820 834A 834E MOV  @FAC,@>834E
167A A820 1816 834E A    @>1816,@>834E
1680 06A0 19F6      BL   @>19F6
1684 1108           JLT  >1696
1686 04E0 834C      CLR  @>834C
168A 0288 B700      CI   R8,>B700
168E 131E           JEQ  >16CC
1690 C2D9           MOV  *R9,R11
1692 0649           DECT R9
1694 045B           RT

1696 0288 B700      CI   R8,>B700
169A 1318           JEQ  >16CC
169C C820 15D4 834C MOV  @>15D4,@>834C
16A2 C0E0 834E      MOV  @>834E,R3
16A6 C803 834A      MOV  R3,@FAC
16AA 06A0 1880      BL   @>1880
16AE D820 8800 83E3 MOVB @VDPRD,@>83E3
16B4 C801 834E      MOV  R1,@>834E
16B8 C0C1           MOV  R1,R3
16BA 1304           JEQ  >16C4
16BC 0603           DEC  R3
16BE 06A0 1880      BL   @>1880
16C2 0981           SRL  R1,8
16C4 C801 8350      MOV  R1,@>8350
16C8 10E3           JMP  >1690
16CA 0007           DATA >0007
16CC 0A51           SLA  R1,5
16CE 09D1           SRL  R1,13
16D0 C801 834C      MOV  R1,@>834C
16D4 04C2           CLR  R2
16D6 C802 8350      MOV  R2,@>8350
16DA 06A0 1F7E      BL   @>1F7E
16DE 06A0 1E9C      BL   @>1E9C
16E2 B700           AB   R0,*R12
16E4 9820 834C 15D4 CB   @>834C,@>15D4
16EA 1425           JHE  >1736
16EC 04E0 8354      CLR  @>8354
16F0 06A0 12B8      BL   @>12B8
16F4 D120 8354      MOVB @>8354,R4
16F8 1631           JNE  >175C
16FA C160 834A      MOV  @FAC,R5
16FE 06A0 1F2E      BL   @>1F2E
1702 06A0 187C      BL   @>187C
1706 834E           C    R14,R13
1708 D820 8800 83E3 MOVB @VDPRD,@>83E3
170E 8045           C    R5,R1
1710 1B25           JH   >175C
1712 D120 8343      MOVB @>8343,R4
1716 1303           JEQ  >171E
1718 0605           DEC  R5
171A 1120           JLT  >175C
171C 1001           JMP  >1720
171E 0581           INC  R1
1720 3860 8350      MPY  @>8350,1
1724 A085           A    R5,R2
1726 05E0 834E      INCT @>834E
172A 0620 834C      DEC  @>834C
172E 1305           JEQ  >173A
1730 0288 B300      CI   R8,>B300
1734 13D0           JEQ  >16D6
1736 0460 1A2C      B    @>1A2C
173A 0288 B600      CI   R8,>B600
173E 16FB           JNE  >1736
1740 06A0 1F7E      BL   @>1F7E
1744 06A0 187C      BL   @>187C
1748 834A           C    R10,R13
174A 1104           JLT  >1754
174C 0A32           SLA  R2,3
174E A802 834E      A    R2,@>834E
1752 109E           JMP  >1690
1754 0A12           SLA  R2,1
1756 A802 834E      A    R2,@>834E
175A 10A0           JMP  >169C
175C 0200 0503      LI   R0,>0503
1760 0460 1A30      B    @>1A30
1764 0200 0603      LI   R0,>0603
1768 10FB           JMP  >1760
176A 04E0 8359      CLR  @>8359
176E 0202 834A      LI   R2,FAC
1772 C04B           MOV  R11,R1
1774 DC88           MOVB R8,*R2+
1776 05A0 8359      INC  @>8359
177A 06A0 1F7E      BL   @>1F7E
177E 15FA           JGT  >1774
1780 06A0 15E0      BL   @>15E0
1784 1736           JNC  >17F2
1786 0451           B    *R1
1788 C28B           MOV  R11,R10
178A 06A0 1FA8      BL   @>1FA8
178E 06A0 187C      BL   @>187C
1792 835C           C    *R12,R13
1794 9820 835E 15D4 CB   @>835E,@>15D4
179A 1307           JEQ  >17AA
179C 9820 834C 15D4 CB   @>834C,@>15D4
17A2 14E0           JHE  >1764
17A4 0202 0008      LI   R2,>0008
17A8 1051           JMP  >184C
17AA 9820 834C 15D4 CB   @>834C,@>15D4
17B0 16D9           JNE  >1764
17B2 C060 8360      MOV  @>8360,R1
17B6 130E           JEQ  >17D4
17B8 06A0 187C      BL   @>187C
17BC 835C           C    *R12,R13
17BE D820 8800 83E3 MOVB @VDPRD,@>83E3
17C4 C801 8360      MOV  R1,@>8360
17C8 8801 834E      C    R1,@>834E
17CC 1317           JEQ  >17FC
17CE 04C6           CLR  R6
17D0 06A0 18AA      BL   @>18AA
17D4 C120 8350      MOV  @>8350,R4
17D8 130C           JEQ  >17F2
17DA C0E0 834A      MOV  @FAC,R3
17DE 0283 001C      CI   R3,>001C
17E2 160D           JNE  >17FE
17E4 C120 834E      MOV  @>834E,R4
17E8 C1A0 835C      MOV  @ARG,R6
17EC C044           MOV  R4,R1
17EE 06A0 18AA      BL   @>18AA
17F2 C060 835C      MOV  @ARG,R1
17F6 C184           MOV  R4,R6
17F8 06A0 18AE      BL   @>18AE
17FC 045A           B    *R10
17FE C820 8350 830C MOV  @>8350,@>830C
1804 C820 16CA 8322 MOV  @>16CA,@>8322
180A 06A0 1EAA      BL   @>1EAA
180E C80A 834A      MOV  R10,@FAC
1812 06A0 1A4A      BL   @>1A4A
1816 0006           DATA >0006
1818 C2A0 834A      MOV  @FAC,R10
181C 06A0 1F2E      BL   @>1F2E
1820 C0E0 834E      MOV  @>834E,R3
1824 C160 831C      MOV  @>831C,R5
1828 C105           MOV  R5,R4
182A C0A0 8350      MOV  @>8350,R2
182E 0265 4000      ORI  R5,>4000
1832 06A0 1880      BL   @>1880
1836 D7E0 83EB      MOVB @>83EB,*R15
183A 1000           NOP
183C D7C5           MOVB R5,*R15
183E 0585           INC  R5
1840 D801 8C00      MOVB R1,@VDPWD
1844 0583           INC  R3
1846 0602           DEC  R2
1848 15F4           JGT  >1832
184A 10CE           JMP  >17E8
184C C160 8360      MOV  @>8360,R5
1850 D7E0 83EB      MOVB @>83EB,*R15
1854 0265 4000      ORI  R5,>4000
1858 D7C5           MOVB R5,*R15
185A 0204 834A      LI   R4,FAC
185E D834 8C00      MOVB *R4+,@VDPWD
1862 0602           DEC  R2
1864 15FC           JGT  >185E
1866 045A           B    *R10
1868 C30B           MOV  R11,R12
186A 06A0 0864      BL   @>0864
186E 06A0 1F7E      BL   @>1F7E
1872 D808 8342      MOVB R8,@>8342
1876 06A0 0842      BL   @>0842
187A 045C           B    *R12
187C C0FB           MOV  *R11+,R3
187E C0D3           MOV  *R3,R3
1880 D7E0 83E7      MOVB @>83E7,*R15
1884 1000           NOP
1886 D7C3           MOVB R3,*R15
1888 1000           NOP
188A D060 8800      MOVB @VDPRD,R1
188E 045B           RT

1890 D7E0 834F      MOVB @>834F,*R15	Read a Radix 100 value from VDP RAM
1894 0202 0008      LI   R2,>0008	into FAC
1898 D7E0 834E      MOVB @>834E,*R15
189C 0203 834A      LI   R3,FAC
18A0 DCE0 8800      MOVB @VDPRD,*R3+
18A4 0602           DEC  R2
18A6 15FC           JGT  >18A0
18A8 045B           RT

18AA 0221 FFFD      AI   R1,>FFFD	(-3)
18AE D7E0 83E3      MOVB @>83E3,*R15
18B2 0261 4000      ORI  R1,>4000
18B6 D7C1           MOVB R1,*R15
18B8 1000           NOP
18BA D806 8C00      MOVB R6,@VDPWD
18BE D820 83ED 8C00 MOVB @>83ED,@VDPWD
18C4 045B           RT

18C6 19CA           JNO  >185C
18C8 06A0 1E7A      BL   @>1E7A
18CC D2ED 0002      MOVB @>0002(R13),R11
18D0 D82D 0002 83F7 MOVB @>0002(R13),@>83F7
18D6 022B 7FFF      AI   R11,>7FFF
18DA 05C9           INCT R9
18DC 0289 83BA      CI   R9,>83BA
18E0 1B1D           JH   >191C
18E2 C64B           MOV  R11,*R9
18E4 D1C8           MOVB R8,R7
18E6 1102           JLT  >18EC
18E8 0460 1B94      B    @>1B94
18EC 06A0 1F7E      BL   @>1F7E
18F0 0977           SRL  R7,7
18F2 0227 FE92      AI   R7,>FE92
18F6 0287 004C      CI   R7,>004C
18FA 1B28           JH   >194C
18FC C1E7 1CE2      MOV  @>1CE2(R7),R7
1900 152B           JGT  >1958
1902 0247 7FFF      ANDI R7,>7FFF
1906 A1E0 8328      A    @>8328,R7
190A 06A0 1E8C      BL   @>1E8C
190E DB47 0402      MOVB R7,@>0402(R13)
1912 DB60 83EF 0402 MOVB @>83EF,@>0402(R13)
1918 0460 006A      B    @>006A
191C 0460 1F22      B    @>1F22
1920 06A0 1E7A      BL   @>1E7A
1924 C199           MOV  *R9,R6
1926 1508           JGT  >1938
1928 0246 7FFF      ANDI R6,>7FFF
192C DB46 0402      MOVB R6,@>0402(R13)
1930 DB60 83ED 0402 MOVB @>83ED,@>0402(R13)
1936 C18D           MOV  R13,R6
1938 9216           CB   *R6,R8
193A 1455           JHE  >19E6
193C 0288 B800      CI   R8,>B800
1940 130C           JEQ  >195A
1942 0978           SRL  R8,7
1944 0228 FE84      AI   R8,>FE84
1948 0288 0010      CI   R8,>0010
194C 1B6F           JH   >1A2C
194E C1E8 1D2E      MOV  @>1D2E(R8),R7
1952 04C8           CLR  R8
1954 06A0 1F7E      BL   @>1F7E
1958 0457           B    *R7
195A 0200 0008      LI   R0,>0008
195E 1068           JMP  >1A30
1960 0649           DECT R9
1962 0227 8001      AI   R7,>8001
1966 10D1           JMP  >190A
1968 06A0 1E7A      BL   @>1E7A
196C 04E0 8322      CLR  @>8322
1970 C020 8344      MOV  @>8344,R0
1974 1317           JEQ  >19A4
1976 0300 0003      LIMI >0003
197A 0300 0000      LIMI >0000
197E 04E0 83D6      CLR  @>83D6
1982 06A0 0020      BL   @>0020          Check for Function-4
1986 134F           JEQ  >1A26
1988 D020 8388      MOVB @>8388,R0
198C 0A30           SLA  R0,3
198E 1160           JLT  >1A50
1990 C820 832E 832C MOV  @>832E,@>832C
1996 06A0 1F7E      BL   @>1F7E
199A 1142           JLT  >1A20
199C D808 832C      MOVB R8,@>832C
19A0 D81A 832D      MOVB *R10,@>832D
19A4 05C9           INCT R9
19A6 C660 18C6      MOV  @>18C6,*R9
19AA 06A0 1F7E      BL   @>1F7E
19AE 1102           JLT  >19B4
19B0 0460 1BEA      B    @>1BEA
19B4 C1C8           MOV  R8,R7
19B6 06A0 1FA0      BL   @>1FA0
19BA 0977           SRL  R7,7
19BC 0227 FEBC      AI   R7,>FEBC
19C0 1535           JGT  >1A2C
19C2 C1E7 1CE0      MOV  @>1CE0(R7),R7
19C6 119D           JLT  >1902
19C8 0457           B    *R7
19CA 0065           DATA >0065 (101 DECIMAL)
19CC C020 8344      MOV  @>8344,R0
19D0 1331           JEQ  >1A34
19D2 6820 1D4E 832E S    @>1D4E,@>832E
19D8 8820 832E 8330 C    @>832E,@>8330
19DE 14CB           JHE  >1976
19E0 1029           JMP  >1A34
19E2 D208           MOVB R8,R8
19E4 1623           JNE  >1A2C
19E6 C1D9           MOV  *R9,R7
19E8 11BB           JLT  >1960
19EA 0649           DECT R9
19EC 0467 0002      B    @>0002(R7)

************************************************************
*                                                          *
*  GPL instruction >12 - RETURN                            *
*                                                          *
************************************************************

19F0 06A0 1E7A      BL   @>1E7A
19F4 10F8           JMP  >19E6

19F6 C08B           MOV  R11,R2
19F8 06A0 187C      BL   @>187C
19FC 834A           C    R10,R13
19FE C101           MOV  R1,R4
1A00 0A21           SLA  R1,2
1A02 1814           JOC  >1A2C
1A04 C044           MOV  R4,R1
1A06 0452           B    *R2
1A08 0000           ILLEGAL OBJECT CODE
1A0A 0000           ILLEGAL OBJECT CODE
1A0C 0000           ILLEGAL OBJECT CODE
1A0E 0000           ILLEGAL OBJECT CODE
1A10 0000           ILLEGAL OBJECT CODE
1A12 0000           ILLEGAL OBJECT CODE
1A14 0000           ILLEGAL OBJECT CODE
1A16 0000           ILLEGAL OBJECT CODE
1A18 0000           ILLEGAL OBJECT CODE
1A1A 0000           ILLEGAL OBJECT CODE
1A1C 0000           ILLEGAL OBJECT CODE
1A1E 0000           ILLEGAL OBJECT CODE
1A20 D020 8389      MOVB @>8389,R0
1A24 16BB           JNE  >199C
1A26 0200 0001      LI   R0,>0001
1A2A 1002           JMP  >1A30
1A2C 0200 0003      LI   R0,>0003
1A30 C800 8322      MOV  R0,@>8322
1A34 C1E0 8326      MOV  @>8326,R7
1A38 0460 190A      B    @>190A
1A3C 0649           DECT R9
1A3E 10FA           JMP  >1A34
1A40 C820 1D4E 8322 MOV  @>1D4E,@>8322
1A46 020B 1922      LI   R11,>1922
1A4A 05C9           INCT R9
1A4C C64B           MOV  R11,*R9
1A4E 10F2           JMP  >1A34
1A50 C820 0072 8322 MOV  @>0072,@>8322
1A56 020B 198E      LI   R11,>198E
1A5A 10F7           JMP  >1A4A
1A5C C820 832C 8356 MOV  @>832C,@>8356
1A62 06C8           SWPB R8
1A64 A808 832C      A    R8,@>832C
1A68 04E0 8354      CLR  @>8354
1A6C 06A0 1E90      BL   @>1E90
1A70 06A0 11A2      BL   @>11A2
1A74 06A0 1E7A      BL   @>1E7A
1A78 8820 8356 832C C    @>8356,@>832C
1A7E 16D6           JNE  >1A2C
1A80 06A0 1F7E      BL   @>1F7E
1A84 D020 8354      MOVB @>8354,R0
1A88 16DB           JNE  >1A40
1A8A 0460 1924      B    @>1924
1A8E 04C3           CLR  R3
1A90 1017           JMP  >1AC0
1A92 06A0 18DA      BL   @>18DA
1A96 B366 06A0      AB   @>06A0(R6),R13
1A9A 1E70           SBZ  112
1A9C 04E0 8354      CLR  @>8354
1AA0 06A0 12B8      BL   @>12B8
1AA4 D020 8354      MOVB @>8354,R0
1AA8 1603           JNE  >1AB0
1AAA C0E0 834A      MOV  @FAC,R3
1AAE 1503           JGT  >1AB6
1AB0 0200 0203      LI   R0,>0203
1AB4 10BD           JMP  >1A30
1AB6 0288 8500      CI   R8,>8500
1ABA 1608           JNE  >1ACC
1ABC 06A0 1F7E      BL   @>1F7E
1AC0 0288 B100      CI   R8,>B100
1AC4 1353           JEQ  >1B6C
1AC6 0288 A100      CI   R8,>A100
1ACA 1005           JMP  >1AD6
1ACC 0288 8600      CI   R8,>8600
1AD0 134D           JEQ  >1B6C
1AD2 0288 8700      CI   R8,>8700
1AD6 16AA           JNE  >1A2C
1AD8 06A0 1F7E      BL   @>1F7E
1ADC 1002           JMP  >1AE2
1ADE 10A6           JMP  >1A2C
1AE0 04C3           CLR  R3
1AE2 C820 832E 834A MOV  @>832E,@FAC
1AE8 D820 1A97 834C MOVB @>1A97,@>834C
1AEE C803 8350      MOV  R3,@>8350
1AF2 06A0 1EAA      BL   @>1EAA
1AF6 C0E0 8350      MOV  @>8350,R3
1AFA 1001           JMP  >1AFE
1AFC 04C3           CLR  R3
1AFE 0288 C900      CI   R8,>C900
1B02 16ED           JNE  >1ADE
1B04 06A0 1F7E      BL   @>1F7E
1B08 D008           MOVB R8,R0
1B0A 06A0 1FA0      BL   @>1FA0
1B0E 0603           DEC  R3
1B10 1528           JGT  >1B62
1B12 C060 8330      MOV  @>8330,R1
1B16 D0A0 8389      MOVB @>8389,R2
1B1A 1307           JEQ  >1B2A
1B1C DB41 0402      MOVB R1,@>0402(R13)
1B20 C08D           MOV  R13,R2
1B22 DB60 83E3 0402 MOVB @>83E3,@>0402(R13)
1B28 1005           JMP  >1B34
1B2A D7E0 83E3      MOVB @>83E3,*R15
1B2E 0202 8800      LI   R2,VDPRD
1B32 D7C1           MOVB R1,*R15
1B34 8801 8332      C    R1,@>8332
1B38 140B           JHE  >1B50
1B3A 9012           CB   *R2,R0
1B3C 1607           JNE  >1B4C
1B3E 9212           CB   *R2,R8
1B40 130A           JEQ  >1B56
1B42 D0D2           MOVB *R2,R3
1B44 0221 0004      AI   R1,>0004
1B48 D0D2           MOVB *R2,R3
1B4A 10F4           JMP  >1B34
1B4C D0D2           MOVB *R2,R3
1B4E 10F9           JMP  >1B42
1B50 0200 0303      LI   R0,>0303
1B54 10AF           JMP  >1AB4
1B56 05C1           INCT R1
1B58 C801 832E      MOV  R1,@>832E
1B5C 0649           DECT R9
1B5E 0460 1976      B    @>1976
1B62 06A0 1F7E      BL   @>1F7E
1B66 0288 B300      CI   R8,>B300
1B6A 16A2           JNE  >1AB0
1B6C 06A0 1F7E      BL   @>1F7E
1B70 10C6           JMP  >1AFE
1B72 10B5           JMP  >1ADE
1B74 06A0 1F2E      BL   @>1F2E
1B78 9820 1A97 834C CB   @>1A97,@>834C
1B7E 16FA           JNE  >1B74
1B80 D208           MOVB R8,R8
1B82 16F7           JNE  >1B72
1B84 C820 834A 832E MOV  @FAC,@>832E
1B8A 0460 19E6      B    @>19E6
1B8E 0200 0006      LI   R0,>0006
1B92 1090           JMP  >1AB4
1B94 06A0 176A      BL   @>176A
1B98 06A0 187C      BL   @>187C
1B9C 834A           C    R10,R13
1B9E 0A11           SLA  R1,1
1BA0 11F6           JLT  >1B8E
1BA2 06A0 1670      BL   @>1670
1BA6 9820 834C 19CB CB   @>834C,@>19CB
1BAC 1302           JEQ  >1BB2
1BAE 06A0 1890      BL   @>1890
1BB2 0460 1924      B    @>1924
1BB6 06A0 18DA      BL   @>18DA
1BBA B367 06A0      AB   @>06A0(R7),R13
1BBE 1E70           SBZ  112
1BC0 04C3           CLR  R3
1BC2 0288 B000      CI   R8,>B000
1BC6 16D5           JNE  >1B72
1BC8 0520 834A      NEG  @FAC	
1BCC 16CF           JNE  >1B6C
1BCE 06A0 1F7E      BL   @>1F7E
1BD2 0288 C900      CI   R8,>C900
1BD6 16CD           JNE  >1B72
1BD8 05E0 832C      INCT @>832C
1BDC 06A0 1F7E      BL   @>1F7E
1BE0 0288 8100      CI   R8,>8100
1BE4 13C3           JEQ  >1B6C
1BE6 0460 19E2      B    @>19E2
1BEA 06A0 176A      BL   @>176A
1BEE 06A0 1670      BL   @>1670
1BF2 0288 BE00      CI   R8,>BE00
1BF6 16BD           JNE  >1B72
1BF8 06A0 1F7E      BL   @>1F7E
1BFC 06A0 1E9C      BL   @>1E9C
1C00 8D30           C    *R0+,*R4+
1C02 06A0 1788      BL   @>1788
1C06 0460 1924      B    @>1924
1C0A 0000           ILLEGAL OBJECT CODE
1C0C 0000           ILLEGAL OBJECT CODE
1C0E 0000           ILLEGAL OBJECT CODE
1C10 0000           ILLEGAL OBJECT CODE
1C12 0000           ILLEGAL OBJECT CODE
1C14 06A0 176A      BL   @>176A
1C18 C120 834A      MOV  @FAC,R4
1C1C 06A0 1F2E      BL   @>1F2E
1C20 9820 834C 1BBB CB   @>834C,@>1BBB
1C26 1302           JEQ  >1C2C
1C28 0460 1F78      B    @>1F78
1C2C 8804 834A      C    R4,@FAC
1C30 1304           JEQ  >1C3A
1C32 6820 1C68 836E S    @>1C68,@VSPTR
1C38 10F1           JMP  >1C1C
1C3A 06A0 1890      BL   @>1890
1C3E 06A0 1E8C      BL   @>1E8C
1C42 06A0 0D84      BL   @>0D84
1C46 06A0 1E7A      BL   @>1E7A
1C4A A820 1C68 836E A    @>1C68,@VSPTR
1C50 06A0 1788      BL   @>1788
1C54 6820 1EAC 836E S    @>1EAC,@VSPTR
1C5A 06A0 0D42      BL   @>0D42
1C5E 02C4           STST R4
1C60 130A           JEQ  >1C76
1C62 C0E0 836E      MOV  @VSPTR,R3
1C66 0223 0010      AI   R3,>0010
1C6A 06A0 1880      BL   @>1880
1C6E D041           MOVB R1,R1
1C70 1112           JLT  >1C96
1C72 0A14           SLA  R4,1
1C74 150E           JGT  >1C92
1C76 A820 1F0E 836E A    @>1F0E,@VSPTR
1C7C C0E0 836E      MOV  @VSPTR,R3
1C80 0223 0006      AI   R3,>0006
1C84 06A0 1880      BL   @>1880
1C88 D820 8800 832F MOVB @VDPRD,@>832F
1C8E D801 832E      MOVB R1,@>832E
1C92 0460 1924      B    @>1924
1C96 0A14           SLA  R4,1
1C98 15EE           JGT  >1C76
1C9A 10FB           JMP  >1C92
1C9C 1A2C           JL   >1CF6
1C9E 1A2C           JL   >1CF8
1CA0 1A2C           JL   >1CFA
1CA2 1A2C           JL   >1CFC
1CA4 1BB6           JH   >1C12
1CA6 1A8E           JL   >1BC4
1CA8 1AFC           JL   >1CA2
1CAA 1AE0           JL   >1C6C
1CAC 1B74           JH   >1D96
1CAE 19E6           JNO  >1C7C
1CB0 19E6           JNO  >1C7E
1CB2 1A3C           JL   >1D2C
1CB4 8000           C    R0,R0
1CB6 1BEA           JH   >1C8C
1CB8 8002           C    R2,R0
1CBA 8004           C    R4,R0
1CBC 8006           C    R6,R0
1CBE 8008           C    R8,R0
1CC0 8016           C    *R6,R0
1CC2 19E6           JNO  >1C90
1CC4 8012           C    *R2,R0
1CC6 8014           C    *R4,R0
1CC8 1C14           JOP  >1CF2
1CCA 800A           C    R10,R0
1CCC 1A3C           JL   >1D46
1CCE 803E           C    *R14+,R0
1CD0 19E6           JNO  >1C9E
1CD2 1A92           JL   >1BF8
1CD4 800C           C    R12,R0
1CD6 800E           C    R14,R0
1CD8 19E6           JNO  >1CA6
1CDA 8018           C    *R8,R0
1CDC 801A           C    *R10,R0
1CDE 1A2C           JL   >1D38
1CE0 803C           C    *R12+,R0
1CE2 801C           C    *R12,R0
1CE4 1A2C           JL   >1D3E
1CE6 1A2C           JL   >1D40
1CE8 1A2C           JL   >1D42
1CEA 1A2C           JL   >1D44
1CEC 1A2C           JL   >1D46
1CEE 1A2C           JL   >1D48
1CF0 1A2C           JL   >1D4A
1CF2 1A2C           JL   >1D4C
1CF4 1A2C           JL   >1D4E
1CF6 801E           C    *R14,R0
1CF8 8020 1A2C      C    @>1A2C,R0
1CFC 1A2C           JL   >1D56
1CFE 1A2C           JL   >1D58
1D00 1A2C           JL   >1D5A
1D02 8010           C    *R0,R0
1D04 1A5C           JL   >1DBE
1D06 1A2C           JL   >1D60
1D08 804A           C    R10,R1
1D0A 8022 8024      C    @>8024(R2),R0
1D0E 8026 8028      C    @>8028(R6),R0
1D12 802A 802C      C    @>802C(R10),R0
1D16 802E 8030      C    @>8030(R14),R0
1D1A 8032           C    *R2+,R0
1D1C 8034           C    *R4+,R0
1D1E 8036           C    *R6+,R0
1D20 8038           C    *R8+,R0
1D22 803A           C    *R10+,R0
1D24 8040           C    R0,R1
1D26 8046           C    R6,R1
1D28 8044           C    R4,R1
1D2A 8042           C    R2,R1
1D2C 8048           C    R8,R1

* Jump table for something

1D2E 1D5C           DATA >1D5C
1D30 1D3E           DATA >1D3E
1D32 1D4C           DATA >1D4C
1D34 1DEC           DATA >1DEC
1D36 1E18           DATA >1E18
1D38 1E24           DATA >1E24
1D3A 1E30           DATA >1E30
1D3C 1E3C           DATA >1E3C

1D3E 0202 0002      LI   R2,>0002
1D42 0288 C000      CI   R8,>C000
1D46 1604           JNE  >1D50
1D48 0642           DECT R2
1D4A 1005           JMP  >1D56

1D4C 0202 0004      LI   R2,>0004
1D50 0288 BE00      CI   R8,>BE00
1D54 1605           JNE  >1D60
1D56 06A0 1F7E      BL   @>1F7E
1D5A 1001           JMP  >1D5E

1D5C 0702           SETO R2
1D5E 0582           INC  R2
1D60 05C9           INCT R9
1D62 C642           MOV  R2,*R9
1D64 06A0 1E9C      BL   @>1E9C
1D68 C000           MOV  R0,R0
1D6A C119           MOV  *R9,R4
1D6C 0649           DECT R9
1D6E D324 1DA8      MOVB @>1DA8(R4),R12
1D72 088C           SRA  R12,8
1D74 06A0 1E4A      BL   @>1E4A
1D78 131A           JEQ  >1DAE
1D7A 06A0 0D42      BL   @>0D42
1D7E 046C 1D82      B    @>1D82(R12)
1D82 1504           JGT  >1D8C
1D84 1303           JEQ  >1D8C
1D86 04C4           CLR  R4
1D88 1003           JMP  >1D90
1D8A 13FD           JEQ  >1D86
1D8C 0204 BFFF      LI   R4,>BFFF
1D90 0203 834A      LI   R3,FAC
1D94 CCC4           MOV  R4,*R3+
1D96 04F3           CLR  *R3+
1D98 04F3           CLR  *R3+
1D9A 04F3           CLR  *R3+
1D9C 1039           JMP  >1E10
1D9E 13F6           JEQ  >1D8C
1DA0 11F5           JLT  >1D8C
1DA2 10F1           JMP  >1D86
1DA4 15F3           JGT  >1D8C
1DA6 10EF           JMP  >1D86
1DA8 0208 1E1C      LI   R8,>1E1C
1DAC 2200           COC  R0,8
1DAE C2A0 834E      MOV  @>834E,R10
1DB2 D1E0 8351      MOVB @>8351,R7
1DB6 06A0 1F2E      BL   @>1F2E
1DBA C120 834E      MOV  @>834E,R4
1DBE D1A0 8351      MOVB @>8351,R6
1DC2 D146           MOVB R6,R5
1DC4 91C6           CB   R6,R7
1DC6 1101           JLT  >1DCA
1DC8 D147           MOVB R7,R5
1DCA 0985           SRL  R5,8
1DCC 130D           JEQ  >1DE8
1DCE C0CA           MOV  R10,R3
1DD0 058A           INC  R10
1DD2 06A0 1880      BL   @>1880
1DD6 D001           MOVB R1,R0
1DD8 C0C4           MOV  R4,R3
1DDA 0584           INC  R4
1DDC 06A0 1880      BL   @>1880
1DE0 9001           CB   R1,R0
1DE2 16CD           JNE  >1D7E
1DE4 0605           DEC  R5
1DE6 15F3           JGT  >1DCE
1DE8 91C6           CB   R6,R7
1DEA 10C9           JMP  >1D7E

1DEC 06A0 1E9C      BL   @>1E9C
1DF0 C200           MOV  R0,R8
1DF2 0202 0D84      LI   R2,>0D84
1DF6 04E0 8354      CLR  @>8354
1DFA 06A0 1E4A      BL   @>1E4A
1DFE 1336           JEQ  >1E6C
1E00 06A0 1E8C      BL   @>1E8C
1E04 0692           BL   *R2
1E06 06A0 1E7A      BL   @>1E7A
1E0A D0A0 8354      MOVB @>8354,R2
1E0E 1602           JNE  >1E14
1E10 0460 1924      B    @>1924
1E14 0460 1A40      B    @>1A40

1E18 06A0 1E9C      BL   @>1E9C
1E1C C200           MOV  R0,R8
1E1E 0202 0D74      LI   R2,>0D74
1E22 10E9           JMP  >1DF6

1E24 06A0 1E9C      BL   @>1E9C
1E28 C400           MOV  R0,*R0
1E2A 0202 0E8C      LI   R2,>0E8C
1E2E 10E3           JMP  >1DF6

1E30 06A0 1E9C      BL   @>1E9C
1E34 C400           MOV  R0,*R0
1E36 0202 0FF8      LI   R2,>0FF8
1E3A 10DD           JMP  >1DF6

1E3C 06A0 1E9C      BL   @>1E9C
1E40 C500           MOV  R0,*R4
1E42 0200 0005      LI   R0,>0005
1E46 0460 1A30      B    @>1A30
1E4A C1A0 836E      MOV  @VSPTR,R6
1E4E 05C6           INCT R6
1E50 D7E0 83ED      MOVB @>83ED,*R15
1E54 1000           NOP
1E56 D7C6           MOVB R6,*R15
1E58 1000           NOP
1E5A 9820 8800 19CB CB   @VDPRD,@>19CB
1E60 1A07           JL   >1E70
1E62 1B04           JH   >1E6C
1E64 9820 834C 19CB CB   @>834C,@>19CB
1E6A 1306           JEQ  >1E78
1E6C 0460 1764      B    @>1764
1E70 9820 834C 19CB CB   @>834C,@>19CB
1E76 14FA           JHE  >1E6C
1E78 045B           RT

1E7A 04C8           CLR  R8
1E7C D220 8342      MOVB @>8342,R8
1E80 D260 8373      MOVB @>8373,R9
1E84 0989           SRL  R9,8
1E86 0229 8300      AI   R9,>8300
1E8A 045B           RT

1E8C D808 8342      MOVB R8,@>8342
1E90 0229 7D00      AI   R9,>7D00
1E94 D820 83F3 8373 MOVB @>83F3,@>8373
1E9A 045B           RT

1E9C 05C9           INCT R9
1E9E 0289 83BA      CI   R9,>83BA
1EA2 1B3F           JH   >1F22
1EA4 C64B           MOV  R11,*R9
1EA6 020B 18E4      LI   R11,>18E4
1EAA 0200 0008      LI   R0,>0008
1EAE A800 836E      A    R0,@VSPTR
1EB2 C060 836E      MOV  @VSPTR,R1
1EB6 D7E0 83E3      MOVB @>83E3,*R15
1EBA 0261 4000      ORI  R1,>4000
1EBE D7C1           MOVB R1,*R15
1EC0 0201 834A      LI   R1,FAC
1EC4 D831 8C00      MOVB *R1+,@VDPWD
1EC8 0600           DEC  R0
1ECA 15FC           JGT  >1EC4
1ECC C00B           MOV  R11,R0
1ECE 9820 834C 19CB CB   @>834C,@>19CB
1ED4 160E           JNE  >1EF2
1ED6 C1A0 836E      MOV  @VSPTR,R6
1EDA 0226 0004      AI   R6,>0004
1EDE C060 834A      MOV  @FAC,R1
1EE2 0281 001C      CI   R1,>001C
1EE6 1605           JNE  >1EF2
1EE8 C060 834E      MOV  @>834E,R1
1EEC 1302           JEQ  >1EF2
1EEE 06A0 18AA      BL   @>18AA
1EF2 C060 836E      MOV  @VSPTR,R1
1EF6 0221 0010      AI   R1,>0010
1EFA 8801 831A      C    R1,@>831A
1EFE 123B           JLE  >1F76
1F00 05C9           INCT R9
1F02 C640           MOV  R0,*R9
1F04 D820 18F0 8323 MOVB @>18F0,@>8323
1F0A 06A0 1A4A      BL   @>1A4A
1F0E 0018           DATA >0018
1F10 C019           MOV  *R9,R0
1F12 0649           DECT R9
1F14 C060 836E      MOV  @VSPTR,R1
1F18 0221 0010      AI   R1,>0010
1F1C 8801 831A      C    R1,@>831A
1F20 122A           JLE  >1F76
1F22 0200 0103      LI   R0,>0103
1F26 06A0 1E7A      BL   @>1E7A
1F2A 0460 1A30      B    @>1A30
1F2E 0202 834A      LI   R2,FAC
1F32 C060 836E      MOV  @VSPTR,R1
1F36 8801 8324      C    R1,@>8324
1F3A 121E           JLE  >1F78
1F3C D7E0 83E3      MOVB @>83E3,*R15
1F40 0200 0008      LI   R0,>0008
1F44 D7C1           MOVB R1,*R15
1F46 6800 836E      S    R0,@VSPTR
1F4A DCA0 8800      MOVB @VDPRD,*R2+
1F4E 0600           DEC  R0
1F50 15FC           JGT  >1F4A
1F52 C00B           MOV  R11,R0
1F54 9820 834C 19CB CB   @>834C,@>19CB
1F5A 160D           JNE  >1F76
1F5C 04C6           CLR  R6
1F5E C0E0 834A      MOV  @FAC,R3
1F62 0283 001C      CI   R3,>001C
1F66 13C0           JEQ  >1EE8
1F68 06A0 1880      BL   @>1880
1F6C D820 8800 83E3 MOVB @VDPRD,@>83E3
1F72 C801 834E      MOV  R1,@>834E
1F76 0450           B    *R0
1F78 0200 0403      LI   R0,>0403
1F7C 10D4           JMP  >1F26
1F7E D220 8389      MOVB @>8389,R8
1F82 1607           JNE  >1F92
1F84 D7E0 832D      MOVB @>832D,*R15
1F88 020A 8800      LI   R10,VDPRD
1F8C D7E0 832C      MOVB @>832C,*R15
1F90 1007           JMP  >1FA0
1F92 DB60 832C 0402 MOVB @>832C,@>0402(R13)
1F98 DB60 832D 0402 MOVB @>832D,@>0402(R13)
1F9E C28D           MOV  R13,R10
1FA0 05A0 832C      INC  @>832C
1FA4 D21A           MOVB *R10,R8
1FA6 045B           RT

*************************************************************************
*									*
*  Moves a floating point number from VDP RAM pointed to by VSPTR to	*
*  ARG.									*
*									*
*************************************************************************

1FA8 0205 FFF8      LI   R5,>FFF8
1FAC 0206 835C      LI   R6,ARG
1FB0 D7E0 836F      MOVB @>836F,*R15
1FB4 0207 8800      LI   R7,VDPRD
1FB8 D7E0 836E      MOVB @VSPTR,*R15
1FBC A805 836E      A    R5,@VSPTR
1FC0 DD97           MOVB *R7,*R6+
1FC2 0585           INC  R5
1FC4 16FD           JNE  >1FC0
1FC6 045B           RT

1FC8 D7E0 83ED      MOVB @>83ED,*R15		Set VDP Read address to R6
1FCC 1000           NOP				and read byte into R8
1FCE D7C6           MOVB R6,*R15
1FD0 0586           INC  R6
1FD2 D220 8800      MOVB @VDPRD,R8
1FD6 0988           SRL  R8,8
1FD8 045B           RT

1FDA DB46 0402      MOVB R6,@>0402(R13)		Set GROM read address to R6
1FDE DB60 83ED 0402 MOVB @>83ED,@>0402(R13)	and read byte into R8
1FE4 0586           INC  R6
1FE6 D21D           MOVB *R13,R8
1FE8 10F6           JMP  >1FD6
1FEA 0000           ILLEGAL OBJECT CODE
1FEC 0000           ILLEGAL OBJECT CODE
1FEE 0000           ILLEGAL OBJECT CODE
1FF0 0000           ILLEGAL OBJECT CODE
1FF2 0000           ILLEGAL OBJECT CODE
1FF4 0000           ILLEGAL OBJECT CODE
1FF6 0000           ILLEGAL OBJECT CODE
1FF8 0000           ILLEGAL OBJECT CODE
1FFA 0000           ILLEGAL OBJECT CODE
1FFC 2A61 A38A      XOR  @>A38A(R1),9