mirror of
https://github.com/rigreco/UniDisk.git
synced 2025-01-14 01:29:42 +00:00
New files
This commit is contained in:
parent
8b1e0025e1
commit
e6923c9789
2
AppleII/FP operations/.gitignore
vendored
Normal file
2
AppleII/FP operations/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/UniFP
|
||||
/UniFP_Output.txt
|
@ -1,163 +1,163 @@
|
||||
* @com.wudsn.ide.asm.hardware=APPLE2
|
||||
***********************
|
||||
* *
|
||||
* APPLE-II FLOATING *
|
||||
* POINT ROUTINES *
|
||||
* *
|
||||
* COPYRIGHT 1977 BY *
|
||||
* APPLE COMPUTER INC. *
|
||||
* *
|
||||
* ALL RIGHTS RESERVED *
|
||||
* *
|
||||
* S. WOZNIAK *
|
||||
* *
|
||||
***********************
|
||||
* TITLE "FLOATING POINT ROUTINES for //c memory"
|
||||
*
|
||||
SIGN EQU $EB ; $F3
|
||||
|
||||
** FP2 4 Bytes **
|
||||
X2 EQU $EC ; $F4
|
||||
M2 EQU $ED ; $F5 - $7
|
||||
|
||||
** FP1 4 Bytes + E extension **
|
||||
X1 EQU $FA ; $F8
|
||||
M1 EQU $FB ; $F9 - $FB
|
||||
E EQU $FE ; $FC
|
||||
|
||||
OVLOC EQU $3F5
|
||||
|
||||
ORG $300
|
||||
|
||||
ADD CLC ;CLEAR CARRY
|
||||
LDX #$2 ;INDEX FOR 3-BYTE ADD.
|
||||
ADD1 LDA M1,X
|
||||
ADC M2,X ;ADD A BYTE OF MANT2 TO MANT1
|
||||
STA M1,X
|
||||
DEX ;INDEX TO NEXT MORE SIGNIF. BYTE.
|
||||
BPL ADD1 ;LOOP UNTIL DONE.
|
||||
RTS ;RETURN
|
||||
MD1 ASL SIGN ;CLEAR LSB OF SIGN.
|
||||
JSR ABSWAP ;ABS VAL OF M1, THEN SWAP WITH M2
|
||||
ABSWAP BIT M1 ;MANT1 NEGATIVE?
|
||||
BPL ABSWAP1 ;NO, SWAP WITH MANT2 AND RETURN.
|
||||
JSR FCOMPL ;YES, COMPLEMENT IT.
|
||||
INC SIGN ;INCR SIGN, COMPLEMENTING LSB.
|
||||
ABSWAP1 SEC ;SET CARRY FOR RETURN TO MUL/DIV.
|
||||
SWAP LDX #$4 ;INDEX FOR 4 BYTE SWAP.
|
||||
SWAP1 STY E-1,X
|
||||
LDA X1-1,X ;SWAP A BYTE OF EXP/MANT1 WITH
|
||||
LDY X2-1,X ;EXP/MANT2 AND LEAVE A COPY OF
|
||||
STY X1-1,X ;MANT1 IN E (3 BYTES). E+3 USED
|
||||
STA X2-1,X
|
||||
DEX ;ADVANCE INDEX TO NEXT BYTE
|
||||
BNE SWAP1 ;LOOP UNTIL DONE.
|
||||
RTS ;RETURN
|
||||
FLOAT LDA #$8E ;INIT EXP1 TO 14, <--------------- int to fp
|
||||
STA X1 ;THEN NORMALIZE TO FLOAT.
|
||||
NORM1 LDA M1 ;HIGH-ORDER MANT1 BYTE.
|
||||
CMP #$C0 ;UPPER TWO BITS UNEQUAL?
|
||||
BMI RTS1 ;YES, RETURN WITH MANT1 NORMALIZED
|
||||
DEC X1 ;DECREMENT EXP1.
|
||||
ASL M1+2
|
||||
ROL M1+1 ;SHIFT MANT1 (3 BYTES) LEFT.
|
||||
ROL M1
|
||||
NORM LDA X1 ;EXP1 ZERO?
|
||||
BNE NORM1 ;NO, CONTINUE NORMALIZING.
|
||||
RTS1 RTS ;RETURN.
|
||||
FSUB JSR FCOMPL ;CMPL MANT1,CLEARS CARRY UNLESS 0 <---- sub
|
||||
SWPALGN JSR ALGNSWP ;RIGHT SHIFT MANT1 OR SWAP WITH
|
||||
FADD LDA X2 ;<------------------------------------- add
|
||||
CMP X1 ;COMPARE EXP1 WITH EXP2.
|
||||
BNE SWPALGN ;IF #,SWAP ADDENDS OR ALIGN MANTS.
|
||||
JSR ADD ;ADD ALIGNED MANTISSAS.
|
||||
ADDEND BVC NORM ;NO OVERFLOW, NORMALIZE RESULT.
|
||||
BVS RTLOG ;OV: SHIFT M1 RIGHT, CARRY INTO SIGN
|
||||
ALGNSWP BCC SWAP ;SWAP IF CARRY CLEAR,
|
||||
* ELSE SHIFT RIGHT ARITH.
|
||||
RTAR LDA M1 ;SIGN OF MANT1 INTO CARRY FOR
|
||||
ASL ;RIGHT ARITH SHIFT.
|
||||
RTLOG INC X1 ;INCR X1 TO ADJUST FOR RIGHT SHIFT
|
||||
BEQ OVFL ;EXP1 OUT OF RANGE.
|
||||
RTLOG1 LDX #$FA ;INDEX FOR 6:BYTE RIGHT SHIFT.
|
||||
ROR1 ROR E+3,X
|
||||
INX ;NEXT BYTE OF SHIFT.
|
||||
BNE ROR1 ;LOOP UNTIL DONE.
|
||||
RTS ;RETURN.
|
||||
FMUL JSR MD1 ;ABS VAL OF MANT1, MANT2 <-------------- mul
|
||||
ADC X1 ;ADD EXP1 TO EXP2 FOR PRODUCT EXP
|
||||
JSR MD2 ;CHECK PROD. EXP AND PREP. FOR MUL
|
||||
CLC ;CLEAR CARRY FOR FIRST BIT.
|
||||
MUL1 JSR RTLOG1 ;M1 AND E RIGHT (PROD AND MPLIER)
|
||||
BCC MUL2 ;IF CARRY CLEAR, SKIP PARTIAL PROD
|
||||
JSR ADD ;ADD MULTIPLICAND TO PRODUCT.
|
||||
MUL2 DEY ;NEXT MUL ITERATION.
|
||||
BPL MUL1 ;LOOP UNTIL DONE.
|
||||
MDEND LSR SIGN ;TEST SIGN LSB.
|
||||
NORMX BCC NORM ;IF EVEN,NORMALIZE PROD,ELSE COMP
|
||||
FCOMPL SEC ;SET CARRY FOR SUBTRACT. <--------------- not
|
||||
LDX #$3 ;INDEX FOR 3 BYTE SUBTRACT.
|
||||
COMPL1 LDA #$0 ;CLEAR A.
|
||||
SBC X1,X ;SUBTRACT BYTE OF EXP1.
|
||||
STA X1,X ;RESTORE IT.
|
||||
DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
BNE COMPL1 ;LOOP UNTIL DONE.
|
||||
BEQ ADDEND ;NORMALIZE (OR SHIFT RT IF OVFL).
|
||||
FDIV JSR MD1 ;TAKE ABS VAL OF MANT1, MANT2. <--------- div
|
||||
SBC X1 ;SUBTRACT EXP1 FROM EXP2.
|
||||
JSR MD2 ;SAVE AS QUOTIENT EXP.
|
||||
DIV1 SEC ;SET CARRY FOR SUBTRACT.
|
||||
LDX #$2 ;INDEX FOR 3-BYTE SUBTRACTION.
|
||||
DIV2 LDA M2,X
|
||||
SBC E,X ;SUBTRACT A BYTE OF E FROM MANT2.
|
||||
PHA ;SAVE ON STACK.
|
||||
DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
BPL DIV2 ;LOOP UNTIL DONE.
|
||||
LDX #$FD ;INDEX FOR 3-BYTE CONDITIONAL MOVE
|
||||
DIV3 PLA ;PULL BYTE OF DIFFERENCE OFF STACK
|
||||
BCC DIV4 ;IF M2<E THEN DON'T RESTORE M2.
|
||||
STA M2+3,X
|
||||
DIV4 INX ;NEXT LESS SIGNIFICANT BYTE.
|
||||
BNE DIV3 ;LOOP UNTIL DONE.
|
||||
ROL M1+2
|
||||
ROL M1+1 ;ROLL QUOTIENT LEFT, CARRY INTO LSB
|
||||
ROL M1
|
||||
ASL M2+2
|
||||
ROL M2+1 ;SHIFT DIVIDEND LEFT
|
||||
ROL M2
|
||||
BCS OVFL ;OVFL IS DUE TO UNNORMED DIVISOR
|
||||
DEY ;NEXT DIVIDE ITERATION.
|
||||
BNE DIV1 ;LOOP UNTIL DONE 23 ITERATIONS.
|
||||
BEQ MDEND ;NORM. QUOTIENT AND CORRECT SIGN.
|
||||
MD2 STX M1+2
|
||||
STX M1+1 ;CLEAR MANT1 (3 BYTES) FOR MUL/DIV.
|
||||
STX M1
|
||||
BCS OVCHK ;IF CALC. SET CARRY,CHECK FOR OVFL
|
||||
BMI MD3 ;IF NEG THEN NO UNDERFLOW.
|
||||
PLA ;POP ONE RETURN LEVEL.
|
||||
PLA
|
||||
BCC NORMX ;CLEAR X1 AND RETURN.
|
||||
MD3 EOR #$80 ;COMPLEMENT SIGN BIT OF EXPONENT.
|
||||
STA X1 ;STORE IT.
|
||||
LDY #$17 ;COUNT 24 MUL/23 DIV ITERATIONS.
|
||||
RTS ;RETURN.
|
||||
OVCHK BPL MD3 ;IF POSITIVE EXP THEN NO OVFL.
|
||||
OVFL JMP OVLOC
|
||||
* ORG $F63D
|
||||
FIX1 JSR RTAR
|
||||
FIX LDA X1 ; <------------------------------ fp to int
|
||||
BPL UNDFL
|
||||
CMP #$8E
|
||||
BNE FIX1
|
||||
BIT M1
|
||||
BPL FIXRTS
|
||||
LDA M1+2
|
||||
BEQ FIXRTS
|
||||
INC M1+1
|
||||
BNE FIXRTS
|
||||
INC M1
|
||||
FIXRTS RTS
|
||||
UNDFL LDA #$0
|
||||
STA M1
|
||||
STA M1+1
|
||||
* @com.wudsn.ide.asm.hardware=APPLE2
|
||||
***********************
|
||||
* *
|
||||
* APPLE-II FLOATING *
|
||||
* POINT ROUTINES *
|
||||
* *
|
||||
* COPYRIGHT 1977 BY *
|
||||
* APPLE COMPUTER INC. *
|
||||
* *
|
||||
* ALL RIGHTS RESERVED *
|
||||
* *
|
||||
* S. WOZNIAK *
|
||||
* *
|
||||
***********************
|
||||
* TITLE "FLOATING POINT ROUTINES for //c memory"
|
||||
*
|
||||
SIGN EQU $EB ; $F3
|
||||
|
||||
** FP2 4 Bytes **
|
||||
X2 EQU $EC ; $F4
|
||||
M2 EQU $ED ; $F5 - $7
|
||||
|
||||
** FP1 4 Bytes + E extension **
|
||||
X1 EQU $FA ; $F8
|
||||
M1 EQU $FB ; $F9 - $FB
|
||||
E EQU $FE ; $FC
|
||||
|
||||
OVLOC EQU $3F5
|
||||
|
||||
ORG $300
|
||||
|
||||
ADD CLC ;CLEAR CARRY
|
||||
LDX #$2 ;INDEX FOR 3-BYTE ADD.
|
||||
ADD1 LDA M1,X
|
||||
ADC M2,X ;ADD A BYTE OF MANT2 TO MANT1
|
||||
STA M1,X
|
||||
DEX ;INDEX TO NEXT MORE SIGNIF. BYTE.
|
||||
BPL ADD1 ;LOOP UNTIL DONE.
|
||||
RTS ;RETURN
|
||||
MD1 ASL SIGN ;CLEAR LSB OF SIGN.
|
||||
JSR ABSWAP ;ABS VAL OF M1, THEN SWAP WITH M2
|
||||
ABSWAP BIT M1 ;MANT1 NEGATIVE?
|
||||
BPL ABSWAP1 ;NO, SWAP WITH MANT2 AND RETURN.
|
||||
JSR FCOMPL ;YES, COMPLEMENT IT.
|
||||
INC SIGN ;INCR SIGN, COMPLEMENTING LSB.
|
||||
ABSWAP1 SEC ;SET CARRY FOR RETURN TO MUL/DIV.
|
||||
SWAP LDX #$4 ;INDEX FOR 4 BYTE SWAP.
|
||||
SWAP1 STY E-1,X
|
||||
LDA X1-1,X ;SWAP A BYTE OF EXP/MANT1 WITH
|
||||
LDY X2-1,X ;EXP/MANT2 AND LEAVE A COPY OF
|
||||
STY X1-1,X ;MANT1 IN E (3 BYTES). E+3 USED
|
||||
STA X2-1,X
|
||||
DEX ;ADVANCE INDEX TO NEXT BYTE
|
||||
BNE SWAP1 ;LOOP UNTIL DONE.
|
||||
RTS ;RETURN
|
||||
FLOAT LDA #$8E ;INIT EXP1 TO 14, <--------------- int to fp
|
||||
STA X1 ;THEN NORMALIZE TO FLOAT.
|
||||
NORM1 LDA M1 ;HIGH-ORDER MANT1 BYTE.
|
||||
CMP #$C0 ;UPPER TWO BITS UNEQUAL?
|
||||
BMI RTS1 ;YES, RETURN WITH MANT1 NORMALIZED
|
||||
DEC X1 ;DECREMENT EXP1.
|
||||
ASL M1+2
|
||||
ROL M1+1 ;SHIFT MANT1 (3 BYTES) LEFT.
|
||||
ROL M1
|
||||
NORM LDA X1 ;EXP1 ZERO?
|
||||
BNE NORM1 ;NO, CONTINUE NORMALIZING.
|
||||
RTS1 RTS ;RETURN.
|
||||
FSUB JSR FCOMPL ;CMPL MANT1,CLEARS CARRY UNLESS 0 <---- sub
|
||||
SWPALGN JSR ALGNSWP ;RIGHT SHIFT MANT1 OR SWAP WITH
|
||||
FADD LDA X2 ;<------------------------------------- add
|
||||
CMP X1 ;COMPARE EXP1 WITH EXP2.
|
||||
BNE SWPALGN ;IF #,SWAP ADDENDS OR ALIGN MANTS.
|
||||
JSR ADD ;ADD ALIGNED MANTISSAS.
|
||||
ADDEND BVC NORM ;NO OVERFLOW, NORMALIZE RESULT.
|
||||
BVS RTLOG ;OV: SHIFT M1 RIGHT, CARRY INTO SIGN
|
||||
ALGNSWP BCC SWAP ;SWAP IF CARRY CLEAR,
|
||||
* ELSE SHIFT RIGHT ARITH.
|
||||
RTAR LDA M1 ;SIGN OF MANT1 INTO CARRY FOR
|
||||
ASL ;RIGHT ARITH SHIFT.
|
||||
RTLOG INC X1 ;INCR X1 TO ADJUST FOR RIGHT SHIFT
|
||||
BEQ OVFL ;EXP1 OUT OF RANGE.
|
||||
RTLOG1 LDX #$FA ;INDEX FOR 6:BYTE RIGHT SHIFT.
|
||||
ROR1 ROR E+3,X
|
||||
INX ;NEXT BYTE OF SHIFT.
|
||||
BNE ROR1 ;LOOP UNTIL DONE.
|
||||
RTS ;RETURN.
|
||||
FMUL JSR MD1 ;ABS VAL OF MANT1, MANT2 <-------------- mul
|
||||
ADC X1 ;ADD EXP1 TO EXP2 FOR PRODUCT EXP
|
||||
JSR MD2 ;CHECK PROD. EXP AND PREP. FOR MUL
|
||||
CLC ;CLEAR CARRY FOR FIRST BIT.
|
||||
MUL1 JSR RTLOG1 ;M1 AND E RIGHT (PROD AND MPLIER)
|
||||
BCC MUL2 ;IF CARRY CLEAR, SKIP PARTIAL PROD
|
||||
JSR ADD ;ADD MULTIPLICAND TO PRODUCT.
|
||||
MUL2 DEY ;NEXT MUL ITERATION.
|
||||
BPL MUL1 ;LOOP UNTIL DONE.
|
||||
MDEND LSR SIGN ;TEST SIGN LSB.
|
||||
NORMX BCC NORM ;IF EVEN,NORMALIZE PROD,ELSE COMP
|
||||
FCOMPL SEC ;SET CARRY FOR SUBTRACT. <--------------- not
|
||||
LDX #$3 ;INDEX FOR 3 BYTE SUBTRACT.
|
||||
COMPL1 LDA #$0 ;CLEAR A.
|
||||
SBC X1,X ;SUBTRACT BYTE OF EXP1.
|
||||
STA X1,X ;RESTORE IT.
|
||||
DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
BNE COMPL1 ;LOOP UNTIL DONE.
|
||||
BEQ ADDEND ;NORMALIZE (OR SHIFT RT IF OVFL).
|
||||
FDIV JSR MD1 ;TAKE ABS VAL OF MANT1, MANT2. <--------- div
|
||||
SBC X1 ;SUBTRACT EXP1 FROM EXP2.
|
||||
JSR MD2 ;SAVE AS QUOTIENT EXP.
|
||||
DIV1 SEC ;SET CARRY FOR SUBTRACT.
|
||||
LDX #$2 ;INDEX FOR 3-BYTE SUBTRACTION.
|
||||
DIV2 LDA M2,X
|
||||
SBC E,X ;SUBTRACT A BYTE OF E FROM MANT2.
|
||||
PHA ;SAVE ON STACK.
|
||||
DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
BPL DIV2 ;LOOP UNTIL DONE.
|
||||
LDX #$FD ;INDEX FOR 3-BYTE CONDITIONAL MOVE
|
||||
DIV3 PLA ;PULL BYTE OF DIFFERENCE OFF STACK
|
||||
BCC DIV4 ;IF M2<E THEN DON'T RESTORE M2.
|
||||
STA M2+3,X
|
||||
DIV4 INX ;NEXT LESS SIGNIFICANT BYTE.
|
||||
BNE DIV3 ;LOOP UNTIL DONE.
|
||||
ROL M1+2
|
||||
ROL M1+1 ;ROLL QUOTIENT LEFT, CARRY INTO LSB
|
||||
ROL M1
|
||||
ASL M2+2
|
||||
ROL M2+1 ;SHIFT DIVIDEND LEFT
|
||||
ROL M2
|
||||
BCS OVFL ;OVFL IS DUE TO UNNORMED DIVISOR
|
||||
DEY ;NEXT DIVIDE ITERATION.
|
||||
BNE DIV1 ;LOOP UNTIL DONE 23 ITERATIONS.
|
||||
BEQ MDEND ;NORM. QUOTIENT AND CORRECT SIGN.
|
||||
MD2 STX M1+2
|
||||
STX M1+1 ;CLEAR MANT1 (3 BYTES) FOR MUL/DIV.
|
||||
STX M1
|
||||
BCS OVCHK ;IF CALC. SET CARRY,CHECK FOR OVFL
|
||||
BMI MD3 ;IF NEG THEN NO UNDERFLOW.
|
||||
PLA ;POP ONE RETURN LEVEL.
|
||||
PLA
|
||||
BCC NORMX ;CLEAR X1 AND RETURN.
|
||||
MD3 EOR #$80 ;COMPLEMENT SIGN BIT OF EXPONENT.
|
||||
STA X1 ;STORE IT.
|
||||
LDY #$17 ;COUNT 24 MUL/23 DIV ITERATIONS.
|
||||
RTS ;RETURN.
|
||||
OVCHK BPL MD3 ;IF POSITIVE EXP THEN NO OVFL.
|
||||
OVFL JMP OVLOC
|
||||
* ORG $F63D
|
||||
FIX1 JSR RTAR
|
||||
FIX LDA X1 ; <------------------------------ fp to int
|
||||
BPL UNDFL
|
||||
CMP #$8E
|
||||
BNE FIX1
|
||||
BIT M1
|
||||
BPL FIXRTS
|
||||
LDA M1+2
|
||||
BEQ FIXRTS
|
||||
INC M1+1
|
||||
BNE FIXRTS
|
||||
INC M1
|
||||
FIXRTS RTS
|
||||
UNDFL LDA #$0
|
||||
STA M1
|
||||
STA M1+1
|
||||
RTS
|
@ -1,167 +1,167 @@
|
||||
------+---------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
Line | # File Line | Line Type | MX | Reloc | Size | Address Object Code | Source Code
|
||||
------+---------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
1 | 1 UniFP.asm 1 | Comment | 11 | | 0 | 00/8000 | * @com.wudsn.ide.asm.hardware=APPLE2
|
||||
2 | 1 UniFP.asm 2 | Comment | 11 | | 0 | 00/8000 | ***********************
|
||||
3 | 1 UniFP.asm 3 | Comment | 11 | | 0 | 00/8000 | * *
|
||||
4 | 1 UniFP.asm 4 | Comment | 11 | | 0 | 00/8000 | * APPLE-II FLOATING *
|
||||
5 | 1 UniFP.asm 5 | Comment | 11 | | 0 | 00/8000 | * POINT ROUTINES *
|
||||
6 | 1 UniFP.asm 6 | Comment | 11 | | 0 | 00/8000 | * *
|
||||
7 | 1 UniFP.asm 7 | Comment | 11 | | 0 | 00/8000 | * COPYRIGHT 1977 BY *
|
||||
8 | 1 UniFP.asm 8 | Comment | 11 | | 0 | 00/8000 | * APPLE COMPUTER INC. *
|
||||
9 | 1 UniFP.asm 9 | Comment | 11 | | 0 | 00/8000 | * *
|
||||
10 | 1 UniFP.asm 10 | Comment | 11 | | 0 | 00/8000 | * ALL RIGHTS RESERVED *
|
||||
11 | 1 UniFP.asm 11 | Comment | 11 | | 0 | 00/8000 | * *
|
||||
12 | 1 UniFP.asm 12 | Comment | 11 | | 0 | 00/8000 | * S. WOZNIAK *
|
||||
13 | 1 UniFP.asm 13 | Comment | 11 | | 0 | 00/8000 | * *
|
||||
14 | 1 UniFP.asm 14 | Comment | 11 | | 0 | 00/8000 | ***********************
|
||||
15 | 1 UniFP.asm 15 | Comment | 11 | | 0 | 00/8000 | * TITLE "FLOATING POINT ROUTINES for //c memory"
|
||||
16 | 1 UniFP.asm 16 | Comment | 11 | | 0 | 00/8000 | *
|
||||
17 | 1 UniFP.asm 17 | Equivalence | 11 | | 0 | 00/8000 | SIGN EQU $EB ; $F3
|
||||
18 | 1 UniFP.asm 18 | Empty | 11 | | 0 | 00/8000 |
|
||||
19 | 1 UniFP.asm 19 | Comment | 11 | | 0 | 00/8000 | ** FP2 4 Bytes **
|
||||
20 | 1 UniFP.asm 20 | Equivalence | 11 | | 0 | 00/8000 | X2 EQU $EC ; $F4
|
||||
21 | 1 UniFP.asm 21 | Equivalence | 11 | | 0 | 00/8000 | M2 EQU $ED ; $F5 - $7
|
||||
22 | 1 UniFP.asm 22 | Empty | 11 | | 0 | 00/8000 |
|
||||
23 | 1 UniFP.asm 23 | Comment | 11 | | 0 | 00/8000 | ** FP1 4 Bytes + E extension **
|
||||
24 | 1 UniFP.asm 24 | Equivalence | 11 | | 0 | 00/8000 | X1 EQU $FA ; $F8
|
||||
25 | 1 UniFP.asm 25 | Equivalence | 11 | | 0 | 00/8000 | M1 EQU $FB ; $F9 - $FB
|
||||
26 | 1 UniFP.asm 26 | Equivalence | 11 | | 0 | 00/8000 | E EQU $FE ; $FC
|
||||
27 | 1 UniFP.asm 27 | Empty | 11 | | 0 | 00/8000 |
|
||||
28 | 1 UniFP.asm 28 | Equivalence | 11 | | 0 | 00/8000 | OVLOC EQU $3F5
|
||||
29 | 1 UniFP.asm 29 | Empty | 11 | | 0 | 00/8000 |
|
||||
30 | 1 UniFP.asm 30 | Directive | 11 | | 0 | 00/8000 | ORG $300
|
||||
31 | 1 UniFP.asm 31 | Empty | 11 | | 0 | 00/0300 |
|
||||
32 | 1 UniFP.asm 32 | Code | 11 | | 1 | 00/0300 : 18 | ADD CLC ;CLEAR CARRY
|
||||
33 | 1 UniFP.asm 33 | Code | 11 | | 2 | 00/0301 : A2 02 | LDX #$2 ;INDEX FOR 3-BYTE ADD.
|
||||
34 | 1 UniFP.asm 34 | Code | 11 | | 2 | 00/0303 : B5 FB | ADD1 LDA {$FB},X
|
||||
35 | 1 UniFP.asm 35 | Code | 11 | | 2 | 00/0305 : 75 ED | ADC {$ED},X ;ADD A BYTE OF MANT2 TO MANT1
|
||||
36 | 1 UniFP.asm 36 | Code | 11 | | 2 | 00/0307 : 95 FB | STA {$FB},X
|
||||
37 | 1 UniFP.asm 37 | Code | 11 | | 1 | 00/0309 : CA | DEX ;INDEX TO NEXT MORE SIGNIF. BYTE.
|
||||
38 | 1 UniFP.asm 38 | Code | 11 | | 2 | 00/030A : 10 F7 | BPL ADD1 ;LOOP UNTIL DONE.
|
||||
39 | 1 UniFP.asm 39 | Code | 11 | | 1 | 00/030C : 60 | RTS ;RETURN
|
||||
40 | 1 UniFP.asm 40 | Code | 11 | | 2 | 00/030D : 06 EB | MD1 ASL {$EB} ;CLEAR LSB OF SIGN.
|
||||
41 | 1 UniFP.asm 41 | Code | 11 | | 3 | 00/030F : 20 12 03 | JSR ABSWAP ;ABS VAL OF M1, THEN SWAP WITH M2
|
||||
42 | 1 UniFP.asm 42 | Code | 11 | | 2 | 00/0312 : 24 FB | ABSWAP BIT {$FB} ;MANT1 NEGATIVE?
|
||||
43 | 1 UniFP.asm 43 | Code | 11 | | 2 | 00/0314 : 10 05 | BPL ABSWAP1 ;NO, SWAP WITH MANT2 AND RETURN.
|
||||
44 | 1 UniFP.asm 44 | Code | 11 | | 3 | 00/0316 : 20 7F 03 | JSR FCOMPL ;YES, COMPLEMENT IT.
|
||||
45 | 1 UniFP.asm 45 | Code | 11 | | 2 | 00/0319 : E6 EB | INC {$EB} ;INCR SIGN, COMPLEMENTING LSB.
|
||||
46 | 1 UniFP.asm 46 | Code | 11 | | 1 | 00/031B : 38 | ABSWAP1 SEC ;SET CARRY FOR RETURN TO MUL/DIV.
|
||||
47 | 1 UniFP.asm 47 | Code | 11 | | 2 | 00/031C : A2 04 | SWAP LDX #$4 ;INDEX FOR 4 BYTE SWAP.
|
||||
48 | 1 UniFP.asm 48 | Code | 11 | | 2 | 00/031E : 94 FD | SWAP1 STY {$FE}-1,X
|
||||
49 | 1 UniFP.asm 49 | Code | 11 | | 2 | 00/0320 : B5 F9 | LDA {$FA}-1,X ;SWAP A BYTE OF EXP/MANT1 WITH
|
||||
50 | 1 UniFP.asm 50 | Code | 11 | | 2 | 00/0322 : B4 EB | LDY {$EC}-1,X ;EXP/MANT2 AND LEAVE A COPY OF
|
||||
51 | 1 UniFP.asm 51 | Code | 11 | | 2 | 00/0324 : 94 F9 | STY {$FA}-1,X ;MANT1 IN E (3 BYTES). E+3 USED
|
||||
52 | 1 UniFP.asm 52 | Code | 11 | | 2 | 00/0326 : 95 EB | STA {$EC}-1,X
|
||||
53 | 1 UniFP.asm 53 | Code | 11 | | 1 | 00/0328 : CA | DEX ;ADVANCE INDEX TO NEXT BYTE
|
||||
54 | 1 UniFP.asm 54 | Code | 11 | | 2 | 00/0329 : D0 F3 | BNE SWAP1 ;LOOP UNTIL DONE.
|
||||
55 | 1 UniFP.asm 55 | Code | 11 | | 1 | 00/032B : 60 | RTS ;RETURN
|
||||
56 | 1 UniFP.asm 56 | Code | 11 | | 2 | 00/032C : A9 8E | FLOAT LDA #$8E ;INIT EXP1 TO 14, <--------------- int to fp
|
||||
57 | 1 UniFP.asm 57 | Code | 11 | | 2 | 00/032E : 85 FA | STA {$FA} ;THEN NORMALIZE TO FLOAT.
|
||||
58 | 1 UniFP.asm 58 | Code | 11 | | 2 | 00/0330 : A5 FB | NORM1 LDA {$FB} ;HIGH-ORDER MANT1 BYTE.
|
||||
59 | 1 UniFP.asm 59 | Code | 11 | | 2 | 00/0332 : C9 C0 | CMP #$C0 ;UPPER TWO BITS UNEQUAL?
|
||||
60 | 1 UniFP.asm 60 | Code | 11 | | 2 | 00/0334 : 30 0C | BMI RTS1 ;YES, RETURN WITH MANT1 NORMALIZED
|
||||
61 | 1 UniFP.asm 61 | Code | 11 | | 2 | 00/0336 : C6 FA | DEC {$FA} ;DECREMENT EXP1.
|
||||
62 | 1 UniFP.asm 62 | Code | 11 | | 2 | 00/0338 : 06 FD | ASL {$FB}+2
|
||||
63 | 1 UniFP.asm 63 | Code | 11 | | 2 | 00/033A : 26 FC | ROL {$FB}+1 ;SHIFT MANT1 (3 BYTES) LEFT.
|
||||
64 | 1 UniFP.asm 64 | Code | 11 | | 2 | 00/033C : 26 FB | ROL {$FB}
|
||||
65 | 1 UniFP.asm 65 | Code | 11 | | 2 | 00/033E : A5 FA | NORM LDA {$FA} ;EXP1 ZERO?
|
||||
66 | 1 UniFP.asm 66 | Code | 11 | | 2 | 00/0340 : D0 EE | BNE NORM1 ;NO, CONTINUE NORMALIZING.
|
||||
67 | 1 UniFP.asm 67 | Code | 11 | | 1 | 00/0342 : 60 | RTS1 RTS ;RETURN.
|
||||
68 | 1 UniFP.asm 68 | Code | 11 | | 3 | 00/0343 : 20 7F 03 | FSUB JSR FCOMPL ;CMPL MANT1,CLEARS CARRY UNLESS 0 <---- sub
|
||||
69 | 1 UniFP.asm 69 | Code | 11 | | 3 | 00/0346 : 20 56 03 | SWPALGN JSR ALGNSWP ;RIGHT SHIFT MANT1 OR SWAP WITH
|
||||
70 | 1 UniFP.asm 70 | Code | 11 | | 2 | 00/0349 : A5 EC | FADD LDA {$EC} ;<------------------------------------- add
|
||||
71 | 1 UniFP.asm 71 | Code | 11 | | 2 | 00/034B : C5 FA | CMP {$FA} ;COMPARE EXP1 WITH EXP2.
|
||||
72 | 1 UniFP.asm 72 | Code | 11 | | 2 | 00/034D : D0 F7 | BNE SWPALGN ;IF #,SWAP ADDENDS OR ALIGN MANTS.
|
||||
73 | 1 UniFP.asm 73 | Code | 11 | | 3 | 00/034F : 20 00 03 | JSR ADD ;ADD ALIGNED MANTISSAS.
|
||||
74 | 1 UniFP.asm 74 | Code | 11 | | 2 | 00/0352 : 50 EA | ADDEND BVC NORM ;NO OVERFLOW, NORMALIZE RESULT.
|
||||
75 | 1 UniFP.asm 75 | Code | 11 | | 2 | 00/0354 : 70 05 | BVS RTLOG ;OV: SHIFT M1 RIGHT, CARRY INTO SIGN
|
||||
76 | 1 UniFP.asm 76 | Code | 11 | | 2 | 00/0356 : 90 C4 | ALGNSWP BCC SWAP ;SWAP IF CARRY CLEAR,
|
||||
77 | 1 UniFP.asm 77 | Comment | 11 | | 0 | 00/0358 | * ELSE SHIFT RIGHT ARITH.
|
||||
78 | 1 UniFP.asm 78 | Code | 11 | | 2 | 00/0358 : A5 FB | RTAR LDA {$FB} ;SIGN OF MANT1 INTO CARRY FOR
|
||||
79 | 1 UniFP.asm 79 | Code | 11 | | 1 | 00/035A : 0A | ASL ;RIGHT ARITH SHIFT.
|
||||
80 | 1 UniFP.asm 80 | Code | 11 | | 2 | 00/035B : E6 FA | RTLOG INC {$FA} ;INCR X1 TO ADJUST FOR RIGHT SHIFT
|
||||
81 | 1 UniFP.asm 81 | Code | 11 | | 2 | 00/035D : F0 75 | BEQ OVFL ;EXP1 OUT OF RANGE.
|
||||
82 | 1 UniFP.asm 82 | Code | 11 | | 2 | 00/035F : A2 FA | RTLOG1 LDX #$FA ;INDEX FOR 6:BYTE RIGHT SHIFT.
|
||||
83 | 1 UniFP.asm 83 | Code | 11 | | 2 | 00/0361 : 76 01 | ROR1 ROR {$FE}+3,X
|
||||
84 | 1 UniFP.asm 84 | Code | 11 | | 1 | 00/0363 : E8 | INX ;NEXT BYTE OF SHIFT.
|
||||
85 | 1 UniFP.asm 85 | Code | 11 | | 2 | 00/0364 : D0 FB | BNE ROR1 ;LOOP UNTIL DONE.
|
||||
86 | 1 UniFP.asm 86 | Code | 11 | | 1 | 00/0366 : 60 | RTS ;RETURN.
|
||||
87 | 1 UniFP.asm 87 | Code | 11 | | 3 | 00/0367 : 20 0D 03 | FMUL JSR MD1 ;ABS VAL OF MANT1, MANT2 <-------------- mul
|
||||
88 | 1 UniFP.asm 88 | Code | 11 | | 2 | 00/036A : 65 FA | ADC {$FA} ;ADD EXP1 TO EXP2 FOR PRODUCT EXP
|
||||
89 | 1 UniFP.asm 89 | Code | 11 | | 3 | 00/036C : 20 BD 03 | JSR MD2 ;CHECK PROD. EXP AND PREP. FOR MUL
|
||||
90 | 1 UniFP.asm 90 | Code | 11 | | 1 | 00/036F : 18 | CLC ;CLEAR CARRY FOR FIRST BIT.
|
||||
91 | 1 UniFP.asm 91 | Code | 11 | | 3 | 00/0370 : 20 5F 03 | MUL1 JSR RTLOG1 ;M1 AND E RIGHT (PROD AND MPLIER)
|
||||
92 | 1 UniFP.asm 92 | Code | 11 | | 2 | 00/0373 : 90 03 | BCC MUL2 ;IF CARRY CLEAR, SKIP PARTIAL PROD
|
||||
93 | 1 UniFP.asm 93 | Code | 11 | | 3 | 00/0375 : 20 00 03 | JSR ADD ;ADD MULTIPLICAND TO PRODUCT.
|
||||
94 | 1 UniFP.asm 94 | Code | 11 | | 1 | 00/0378 : 88 | MUL2 DEY ;NEXT MUL ITERATION.
|
||||
95 | 1 UniFP.asm 95 | Code | 11 | | 2 | 00/0379 : 10 F5 | BPL MUL1 ;LOOP UNTIL DONE.
|
||||
96 | 1 UniFP.asm 96 | Code | 11 | | 2 | 00/037B : 46 EB | MDEND LSR {$EB} ;TEST SIGN LSB.
|
||||
97 | 1 UniFP.asm 97 | Code | 11 | | 2 | 00/037D : 90 BF | NORMX BCC NORM ;IF EVEN,NORMALIZE PROD,ELSE COMP
|
||||
98 | 1 UniFP.asm 98 | Code | 11 | | 1 | 00/037F : 38 | FCOMPL SEC ;SET CARRY FOR SUBTRACT. <--------------- not
|
||||
99 | 1 UniFP.asm 99 | Code | 11 | | 2 | 00/0380 : A2 03 | LDX #$3 ;INDEX FOR 3 BYTE SUBTRACT.
|
||||
100 | 1 UniFP.asm 100 | Code | 11 | | 2 | 00/0382 : A9 00 | COMPL1 LDA #$0 ;CLEAR A.
|
||||
101 | 1 UniFP.asm 101 | Code | 11 | | 2 | 00/0384 : F5 FA | SBC {$FA},X ;SUBTRACT BYTE OF EXP1.
|
||||
102 | 1 UniFP.asm 102 | Code | 11 | | 2 | 00/0386 : 95 FA | STA {$FA},X ;RESTORE IT.
|
||||
103 | 1 UniFP.asm 103 | Code | 11 | | 1 | 00/0388 : CA | DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
104 | 1 UniFP.asm 104 | Code | 11 | | 2 | 00/0389 : D0 F7 | BNE COMPL1 ;LOOP UNTIL DONE.
|
||||
105 | 1 UniFP.asm 105 | Code | 11 | | 2 | 00/038B : F0 C5 | BEQ ADDEND ;NORMALIZE (OR SHIFT RT IF OVFL).
|
||||
106 | 1 UniFP.asm 106 | Code | 11 | | 3 | 00/038D : 20 0D 03 | FDIV JSR MD1 ;TAKE ABS VAL OF MANT1, MANT2. <--------- div
|
||||
107 | 1 UniFP.asm 107 | Code | 11 | | 2 | 00/0390 : E5 FA | SBC {$FA} ;SUBTRACT EXP1 FROM EXP2.
|
||||
108 | 1 UniFP.asm 108 | Code | 11 | | 3 | 00/0392 : 20 BD 03 | JSR MD2 ;SAVE AS QUOTIENT EXP.
|
||||
109 | 1 UniFP.asm 109 | Code | 11 | | 1 | 00/0395 : 38 | DIV1 SEC ;SET CARRY FOR SUBTRACT.
|
||||
110 | 1 UniFP.asm 110 | Code | 11 | | 2 | 00/0396 : A2 02 | LDX #$2 ;INDEX FOR 3-BYTE SUBTRACTION.
|
||||
111 | 1 UniFP.asm 111 | Code | 11 | | 2 | 00/0398 : B5 ED | DIV2 LDA {$ED},X
|
||||
112 | 1 UniFP.asm 112 | Code | 11 | | 2 | 00/039A : F5 FE | SBC {$FE},X ;SUBTRACT A BYTE OF E FROM MANT2.
|
||||
113 | 1 UniFP.asm 113 | Code | 11 | | 1 | 00/039C : 48 | PHA ;SAVE ON STACK.
|
||||
114 | 1 UniFP.asm 114 | Code | 11 | | 1 | 00/039D : CA | DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
115 | 1 UniFP.asm 115 | Code | 11 | | 2 | 00/039E : 10 F8 | BPL DIV2 ;LOOP UNTIL DONE.
|
||||
116 | 1 UniFP.asm 116 | Code | 11 | | 2 | 00/03A0 : A2 FD | LDX #$FD ;INDEX FOR 3-BYTE CONDITIONAL MOVE
|
||||
117 | 1 UniFP.asm 117 | Code | 11 | | 1 | 00/03A2 : 68 | DIV3 PLA ;PULL BYTE OF DIFFERENCE OFF STACK
|
||||
118 | 1 UniFP.asm 118 | Code | 11 | | 2 | 00/03A3 : 90 02 | BCC DIV4 ;IF M2<E THEN DON'T RESTORE M2.
|
||||
119 | 1 UniFP.asm 119 | Code | 11 | | 2 | 00/03A5 : 95 F0 | STA {$ED}+3,X
|
||||
120 | 1 UniFP.asm 120 | Code | 11 | | 1 | 00/03A7 : E8 | DIV4 INX ;NEXT LESS SIGNIFICANT BYTE.
|
||||
121 | 1 UniFP.asm 121 | Code | 11 | | 2 | 00/03A8 : D0 F8 | BNE DIV3 ;LOOP UNTIL DONE.
|
||||
122 | 1 UniFP.asm 122 | Code | 11 | | 2 | 00/03AA : 26 FD | ROL {$FB}+2
|
||||
123 | 1 UniFP.asm 123 | Code | 11 | | 2 | 00/03AC : 26 FC | ROL {$FB}+1 ;ROLL QUOTIENT LEFT, CARRY INTO LSB
|
||||
124 | 1 UniFP.asm 124 | Code | 11 | | 2 | 00/03AE : 26 FB | ROL {$FB}
|
||||
125 | 1 UniFP.asm 125 | Code | 11 | | 2 | 00/03B0 : 06 EF | ASL {$ED}+2
|
||||
126 | 1 UniFP.asm 126 | Code | 11 | | 2 | 00/03B2 : 26 EE | ROL {$ED}+1 ;SHIFT DIVIDEND LEFT
|
||||
127 | 1 UniFP.asm 127 | Code | 11 | | 2 | 00/03B4 : 26 ED | ROL {$ED}
|
||||
128 | 1 UniFP.asm 128 | Code | 11 | | 2 | 00/03B6 : B0 1C | BCS OVFL ;OVFL IS DUE TO UNNORMED DIVISOR
|
||||
129 | 1 UniFP.asm 129 | Code | 11 | | 1 | 00/03B8 : 88 | DEY ;NEXT DIVIDE ITERATION.
|
||||
130 | 1 UniFP.asm 130 | Code | 11 | | 2 | 00/03B9 : D0 DA | BNE DIV1 ;LOOP UNTIL DONE 23 ITERATIONS.
|
||||
131 | 1 UniFP.asm 131 | Code | 11 | | 2 | 00/03BB : F0 BE | BEQ MDEND ;NORM. QUOTIENT AND CORRECT SIGN.
|
||||
132 | 1 UniFP.asm 132 | Code | 11 | | 2 | 00/03BD : 86 FD | MD2 STX {$FB}+2
|
||||
133 | 1 UniFP.asm 133 | Code | 11 | | 2 | 00/03BF : 86 FC | STX {$FB}+1 ;CLEAR MANT1 (3 BYTES) FOR MUL/DIV.
|
||||
134 | 1 UniFP.asm 134 | Code | 11 | | 2 | 00/03C1 : 86 FB | STX {$FB}
|
||||
135 | 1 UniFP.asm 135 | Code | 11 | | 2 | 00/03C3 : B0 0D | BCS OVCHK ;IF CALC. SET CARRY,CHECK FOR OVFL
|
||||
136 | 1 UniFP.asm 136 | Code | 11 | | 2 | 00/03C5 : 30 04 | BMI MD3 ;IF NEG THEN NO UNDERFLOW.
|
||||
137 | 1 UniFP.asm 137 | Code | 11 | | 1 | 00/03C7 : 68 | PLA ;POP ONE RETURN LEVEL.
|
||||
138 | 1 UniFP.asm 138 | Code | 11 | | 1 | 00/03C8 : 68 | PLA
|
||||
139 | 1 UniFP.asm 139 | Code | 11 | | 2 | 00/03C9 : 90 B2 | BCC NORMX ;CLEAR X1 AND RETURN.
|
||||
140 | 1 UniFP.asm 140 | Code | 11 | | 2 | 00/03CB : 49 80 | MD3 EOR #$80 ;COMPLEMENT SIGN BIT OF EXPONENT.
|
||||
141 | 1 UniFP.asm 141 | Code | 11 | | 2 | 00/03CD : 85 FA | STA {$FA} ;STORE IT.
|
||||
142 | 1 UniFP.asm 142 | Code | 11 | | 2 | 00/03CF : A0 17 | LDY #$17 ;COUNT 24 MUL/23 DIV ITERATIONS.
|
||||
143 | 1 UniFP.asm 143 | Code | 11 | | 1 | 00/03D1 : 60 | RTS ;RETURN.
|
||||
144 | 1 UniFP.asm 144 | Code | 11 | | 2 | 00/03D2 : 10 F7 | OVCHK BPL MD3 ;IF POSITIVE EXP THEN NO OVFL.
|
||||
145 | 1 UniFP.asm 145 | Code | 11 | | 3 | 00/03D4 : 4C F5 03 | OVFL JMP {$3F5}
|
||||
146 | 1 UniFP.asm 146 | Comment | 11 | | 0 | 00/03D7 | * ORG $F63D
|
||||
147 | 1 UniFP.asm 147 | Code | 11 | | 3 | 00/03D7 : 20 58 03 | FIX1 JSR RTAR
|
||||
148 | 1 UniFP.asm 148 | Code | 11 | | 2 | 00/03DA : A5 FA | FIX LDA {$FA} ; <------------------------------ fp to int
|
||||
149 | 1 UniFP.asm 149 | Code | 11 | | 2 | 00/03DC : 10 13 | BPL UNDFL
|
||||
150 | 1 UniFP.asm 150 | Code | 11 | | 2 | 00/03DE : C9 8E | CMP #$8E
|
||||
151 | 1 UniFP.asm 151 | Code | 11 | | 2 | 00/03E0 : D0 F5 | BNE FIX1
|
||||
152 | 1 UniFP.asm 152 | Code | 11 | | 2 | 00/03E2 : 24 FB | BIT {$FB}
|
||||
153 | 1 UniFP.asm 153 | Code | 11 | | 2 | 00/03E4 : 10 0A | BPL FIXRTS
|
||||
154 | 1 UniFP.asm 154 | Code | 11 | | 2 | 00/03E6 : A5 FD | LDA {$FB}+2
|
||||
155 | 1 UniFP.asm 155 | Code | 11 | | 2 | 00/03E8 : F0 06 | BEQ FIXRTS
|
||||
156 | 1 UniFP.asm 156 | Code | 11 | | 2 | 00/03EA : E6 FC | INC {$FB}+1
|
||||
157 | 1 UniFP.asm 157 | Code | 11 | | 2 | 00/03EC : D0 02 | BNE FIXRTS
|
||||
158 | 1 UniFP.asm 158 | Code | 11 | | 2 | 00/03EE : E6 FB | INC {$FB}
|
||||
159 | 1 UniFP.asm 159 | Code | 11 | | 1 | 00/03F0 : 60 | FIXRTS RTS
|
||||
160 | 1 UniFP.asm 160 | Code | 11 | | 2 | 00/03F1 : A9 00 | UNDFL LDA #$0
|
||||
161 | 1 UniFP.asm 161 | Code | 11 | | 2 | 00/03F3 : 85 FB | STA {$FB}
|
||||
162 | 1 UniFP.asm 162 | Code | 11 | | 2 | 00/03F5 : 85 FC | STA {$FB}+1
|
||||
163 | 1 UniFP.asm 163 | Code | 11 | | 1 | 00/03F7 : 60 | RTS
|
||||
------+---------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
------+---------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
Line | # File Line | Line Type | MX | Reloc | Size | Address Object Code | Source Code
|
||||
------+---------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
1 | 1 UniFP.asm 1 | Comment | 11 | | 0 | 00/8000 | * @com.wudsn.ide.asm.hardware=APPLE2
|
||||
2 | 1 UniFP.asm 2 | Comment | 11 | | 0 | 00/8000 | ***********************
|
||||
3 | 1 UniFP.asm 3 | Comment | 11 | | 0 | 00/8000 | * *
|
||||
4 | 1 UniFP.asm 4 | Comment | 11 | | 0 | 00/8000 | * APPLE-II FLOATING *
|
||||
5 | 1 UniFP.asm 5 | Comment | 11 | | 0 | 00/8000 | * POINT ROUTINES *
|
||||
6 | 1 UniFP.asm 6 | Comment | 11 | | 0 | 00/8000 | * *
|
||||
7 | 1 UniFP.asm 7 | Comment | 11 | | 0 | 00/8000 | * COPYRIGHT 1977 BY *
|
||||
8 | 1 UniFP.asm 8 | Comment | 11 | | 0 | 00/8000 | * APPLE COMPUTER INC. *
|
||||
9 | 1 UniFP.asm 9 | Comment | 11 | | 0 | 00/8000 | * *
|
||||
10 | 1 UniFP.asm 10 | Comment | 11 | | 0 | 00/8000 | * ALL RIGHTS RESERVED *
|
||||
11 | 1 UniFP.asm 11 | Comment | 11 | | 0 | 00/8000 | * *
|
||||
12 | 1 UniFP.asm 12 | Comment | 11 | | 0 | 00/8000 | * S. WOZNIAK *
|
||||
13 | 1 UniFP.asm 13 | Comment | 11 | | 0 | 00/8000 | * *
|
||||
14 | 1 UniFP.asm 14 | Comment | 11 | | 0 | 00/8000 | ***********************
|
||||
15 | 1 UniFP.asm 15 | Comment | 11 | | 0 | 00/8000 | * TITLE "FLOATING POINT ROUTINES for //c memory"
|
||||
16 | 1 UniFP.asm 16 | Comment | 11 | | 0 | 00/8000 | *
|
||||
17 | 1 UniFP.asm 17 | Equivalence | 11 | | 0 | 00/8000 | SIGN EQU $EB ; $F3
|
||||
18 | 1 UniFP.asm 18 | Empty | 11 | | 0 | 00/8000 |
|
||||
19 | 1 UniFP.asm 19 | Comment | 11 | | 0 | 00/8000 | ** FP2 4 Bytes **
|
||||
20 | 1 UniFP.asm 20 | Equivalence | 11 | | 0 | 00/8000 | X2 EQU $EC ; $F4
|
||||
21 | 1 UniFP.asm 21 | Equivalence | 11 | | 0 | 00/8000 | M2 EQU $ED ; $F5 - $7
|
||||
22 | 1 UniFP.asm 22 | Empty | 11 | | 0 | 00/8000 |
|
||||
23 | 1 UniFP.asm 23 | Comment | 11 | | 0 | 00/8000 | ** FP1 4 Bytes + E extension **
|
||||
24 | 1 UniFP.asm 24 | Equivalence | 11 | | 0 | 00/8000 | X1 EQU $FA ; $F8
|
||||
25 | 1 UniFP.asm 25 | Equivalence | 11 | | 0 | 00/8000 | M1 EQU $FB ; $F9 - $FB
|
||||
26 | 1 UniFP.asm 26 | Equivalence | 11 | | 0 | 00/8000 | E EQU $FE ; $FC
|
||||
27 | 1 UniFP.asm 27 | Empty | 11 | | 0 | 00/8000 |
|
||||
28 | 1 UniFP.asm 28 | Equivalence | 11 | | 0 | 00/8000 | OVLOC EQU $3F5
|
||||
29 | 1 UniFP.asm 29 | Empty | 11 | | 0 | 00/8000 |
|
||||
30 | 1 UniFP.asm 30 | Directive | 11 | | 0 | 00/8000 | ORG $300
|
||||
31 | 1 UniFP.asm 31 | Empty | 11 | | 0 | 00/0300 |
|
||||
32 | 1 UniFP.asm 32 | Code | 11 | | 1 | 00/0300 : 18 | ADD CLC ;CLEAR CARRY
|
||||
33 | 1 UniFP.asm 33 | Code | 11 | | 2 | 00/0301 : A2 02 | LDX #$2 ;INDEX FOR 3-BYTE ADD.
|
||||
34 | 1 UniFP.asm 34 | Code | 11 | | 2 | 00/0303 : B5 FB | ADD1 LDA {$FB},X
|
||||
35 | 1 UniFP.asm 35 | Code | 11 | | 2 | 00/0305 : 75 ED | ADC {$ED},X ;ADD A BYTE OF MANT2 TO MANT1
|
||||
36 | 1 UniFP.asm 36 | Code | 11 | | 2 | 00/0307 : 95 FB | STA {$FB},X
|
||||
37 | 1 UniFP.asm 37 | Code | 11 | | 1 | 00/0309 : CA | DEX ;INDEX TO NEXT MORE SIGNIF. BYTE.
|
||||
38 | 1 UniFP.asm 38 | Code | 11 | | 2 | 00/030A : 10 F7 | BPL ADD1 ;LOOP UNTIL DONE.
|
||||
39 | 1 UniFP.asm 39 | Code | 11 | | 1 | 00/030C : 60 | RTS ;RETURN
|
||||
40 | 1 UniFP.asm 40 | Code | 11 | | 2 | 00/030D : 06 EB | MD1 ASL {$EB} ;CLEAR LSB OF SIGN.
|
||||
41 | 1 UniFP.asm 41 | Code | 11 | | 3 | 00/030F : 20 12 03 | JSR ABSWAP ;ABS VAL OF M1, THEN SWAP WITH M2
|
||||
42 | 1 UniFP.asm 42 | Code | 11 | | 2 | 00/0312 : 24 FB | ABSWAP BIT {$FB} ;MANT1 NEGATIVE?
|
||||
43 | 1 UniFP.asm 43 | Code | 11 | | 2 | 00/0314 : 10 05 | BPL ABSWAP1 ;NO, SWAP WITH MANT2 AND RETURN.
|
||||
44 | 1 UniFP.asm 44 | Code | 11 | | 3 | 00/0316 : 20 7F 03 | JSR FCOMPL ;YES, COMPLEMENT IT.
|
||||
45 | 1 UniFP.asm 45 | Code | 11 | | 2 | 00/0319 : E6 EB | INC {$EB} ;INCR SIGN, COMPLEMENTING LSB.
|
||||
46 | 1 UniFP.asm 46 | Code | 11 | | 1 | 00/031B : 38 | ABSWAP1 SEC ;SET CARRY FOR RETURN TO MUL/DIV.
|
||||
47 | 1 UniFP.asm 47 | Code | 11 | | 2 | 00/031C : A2 04 | SWAP LDX #$4 ;INDEX FOR 4 BYTE SWAP.
|
||||
48 | 1 UniFP.asm 48 | Code | 11 | | 2 | 00/031E : 94 FD | SWAP1 STY {$FE}-1,X
|
||||
49 | 1 UniFP.asm 49 | Code | 11 | | 2 | 00/0320 : B5 F9 | LDA {$FA}-1,X ;SWAP A BYTE OF EXP/MANT1 WITH
|
||||
50 | 1 UniFP.asm 50 | Code | 11 | | 2 | 00/0322 : B4 EB | LDY {$EC}-1,X ;EXP/MANT2 AND LEAVE A COPY OF
|
||||
51 | 1 UniFP.asm 51 | Code | 11 | | 2 | 00/0324 : 94 F9 | STY {$FA}-1,X ;MANT1 IN E (3 BYTES). E+3 USED
|
||||
52 | 1 UniFP.asm 52 | Code | 11 | | 2 | 00/0326 : 95 EB | STA {$EC}-1,X
|
||||
53 | 1 UniFP.asm 53 | Code | 11 | | 1 | 00/0328 : CA | DEX ;ADVANCE INDEX TO NEXT BYTE
|
||||
54 | 1 UniFP.asm 54 | Code | 11 | | 2 | 00/0329 : D0 F3 | BNE SWAP1 ;LOOP UNTIL DONE.
|
||||
55 | 1 UniFP.asm 55 | Code | 11 | | 1 | 00/032B : 60 | RTS ;RETURN
|
||||
56 | 1 UniFP.asm 56 | Code | 11 | | 2 | 00/032C : A9 8E | FLOAT LDA #$8E ;INIT EXP1 TO 14, <--------------- int to fp
|
||||
57 | 1 UniFP.asm 57 | Code | 11 | | 2 | 00/032E : 85 FA | STA {$FA} ;THEN NORMALIZE TO FLOAT.
|
||||
58 | 1 UniFP.asm 58 | Code | 11 | | 2 | 00/0330 : A5 FB | NORM1 LDA {$FB} ;HIGH-ORDER MANT1 BYTE.
|
||||
59 | 1 UniFP.asm 59 | Code | 11 | | 2 | 00/0332 : C9 C0 | CMP #$C0 ;UPPER TWO BITS UNEQUAL?
|
||||
60 | 1 UniFP.asm 60 | Code | 11 | | 2 | 00/0334 : 30 0C | BMI RTS1 ;YES, RETURN WITH MANT1 NORMALIZED
|
||||
61 | 1 UniFP.asm 61 | Code | 11 | | 2 | 00/0336 : C6 FA | DEC {$FA} ;DECREMENT EXP1.
|
||||
62 | 1 UniFP.asm 62 | Code | 11 | | 2 | 00/0338 : 06 FD | ASL {$FB}+2
|
||||
63 | 1 UniFP.asm 63 | Code | 11 | | 2 | 00/033A : 26 FC | ROL {$FB}+1 ;SHIFT MANT1 (3 BYTES) LEFT.
|
||||
64 | 1 UniFP.asm 64 | Code | 11 | | 2 | 00/033C : 26 FB | ROL {$FB}
|
||||
65 | 1 UniFP.asm 65 | Code | 11 | | 2 | 00/033E : A5 FA | NORM LDA {$FA} ;EXP1 ZERO?
|
||||
66 | 1 UniFP.asm 66 | Code | 11 | | 2 | 00/0340 : D0 EE | BNE NORM1 ;NO, CONTINUE NORMALIZING.
|
||||
67 | 1 UniFP.asm 67 | Code | 11 | | 1 | 00/0342 : 60 | RTS1 RTS ;RETURN.
|
||||
68 | 1 UniFP.asm 68 | Code | 11 | | 3 | 00/0343 : 20 7F 03 | FSUB JSR FCOMPL ;CMPL MANT1,CLEARS CARRY UNLESS 0 <---- sub
|
||||
69 | 1 UniFP.asm 69 | Code | 11 | | 3 | 00/0346 : 20 56 03 | SWPALGN JSR ALGNSWP ;RIGHT SHIFT MANT1 OR SWAP WITH
|
||||
70 | 1 UniFP.asm 70 | Code | 11 | | 2 | 00/0349 : A5 EC | FADD LDA {$EC} ;<------------------------------------- add
|
||||
71 | 1 UniFP.asm 71 | Code | 11 | | 2 | 00/034B : C5 FA | CMP {$FA} ;COMPARE EXP1 WITH EXP2.
|
||||
72 | 1 UniFP.asm 72 | Code | 11 | | 2 | 00/034D : D0 F7 | BNE SWPALGN ;IF #,SWAP ADDENDS OR ALIGN MANTS.
|
||||
73 | 1 UniFP.asm 73 | Code | 11 | | 3 | 00/034F : 20 00 03 | JSR ADD ;ADD ALIGNED MANTISSAS.
|
||||
74 | 1 UniFP.asm 74 | Code | 11 | | 2 | 00/0352 : 50 EA | ADDEND BVC NORM ;NO OVERFLOW, NORMALIZE RESULT.
|
||||
75 | 1 UniFP.asm 75 | Code | 11 | | 2 | 00/0354 : 70 05 | BVS RTLOG ;OV: SHIFT M1 RIGHT, CARRY INTO SIGN
|
||||
76 | 1 UniFP.asm 76 | Code | 11 | | 2 | 00/0356 : 90 C4 | ALGNSWP BCC SWAP ;SWAP IF CARRY CLEAR,
|
||||
77 | 1 UniFP.asm 77 | Comment | 11 | | 0 | 00/0358 | * ELSE SHIFT RIGHT ARITH.
|
||||
78 | 1 UniFP.asm 78 | Code | 11 | | 2 | 00/0358 : A5 FB | RTAR LDA {$FB} ;SIGN OF MANT1 INTO CARRY FOR
|
||||
79 | 1 UniFP.asm 79 | Code | 11 | | 1 | 00/035A : 0A | ASL ;RIGHT ARITH SHIFT.
|
||||
80 | 1 UniFP.asm 80 | Code | 11 | | 2 | 00/035B : E6 FA | RTLOG INC {$FA} ;INCR X1 TO ADJUST FOR RIGHT SHIFT
|
||||
81 | 1 UniFP.asm 81 | Code | 11 | | 2 | 00/035D : F0 75 | BEQ OVFL ;EXP1 OUT OF RANGE.
|
||||
82 | 1 UniFP.asm 82 | Code | 11 | | 2 | 00/035F : A2 FA | RTLOG1 LDX #$FA ;INDEX FOR 6:BYTE RIGHT SHIFT.
|
||||
83 | 1 UniFP.asm 83 | Code | 11 | | 2 | 00/0361 : 76 01 | ROR1 ROR {$FE}+3,X
|
||||
84 | 1 UniFP.asm 84 | Code | 11 | | 1 | 00/0363 : E8 | INX ;NEXT BYTE OF SHIFT.
|
||||
85 | 1 UniFP.asm 85 | Code | 11 | | 2 | 00/0364 : D0 FB | BNE ROR1 ;LOOP UNTIL DONE.
|
||||
86 | 1 UniFP.asm 86 | Code | 11 | | 1 | 00/0366 : 60 | RTS ;RETURN.
|
||||
87 | 1 UniFP.asm 87 | Code | 11 | | 3 | 00/0367 : 20 0D 03 | FMUL JSR MD1 ;ABS VAL OF MANT1, MANT2 <-------------- mul
|
||||
88 | 1 UniFP.asm 88 | Code | 11 | | 2 | 00/036A : 65 FA | ADC {$FA} ;ADD EXP1 TO EXP2 FOR PRODUCT EXP
|
||||
89 | 1 UniFP.asm 89 | Code | 11 | | 3 | 00/036C : 20 BD 03 | JSR MD2 ;CHECK PROD. EXP AND PREP. FOR MUL
|
||||
90 | 1 UniFP.asm 90 | Code | 11 | | 1 | 00/036F : 18 | CLC ;CLEAR CARRY FOR FIRST BIT.
|
||||
91 | 1 UniFP.asm 91 | Code | 11 | | 3 | 00/0370 : 20 5F 03 | MUL1 JSR RTLOG1 ;M1 AND E RIGHT (PROD AND MPLIER)
|
||||
92 | 1 UniFP.asm 92 | Code | 11 | | 2 | 00/0373 : 90 03 | BCC MUL2 ;IF CARRY CLEAR, SKIP PARTIAL PROD
|
||||
93 | 1 UniFP.asm 93 | Code | 11 | | 3 | 00/0375 : 20 00 03 | JSR ADD ;ADD MULTIPLICAND TO PRODUCT.
|
||||
94 | 1 UniFP.asm 94 | Code | 11 | | 1 | 00/0378 : 88 | MUL2 DEY ;NEXT MUL ITERATION.
|
||||
95 | 1 UniFP.asm 95 | Code | 11 | | 2 | 00/0379 : 10 F5 | BPL MUL1 ;LOOP UNTIL DONE.
|
||||
96 | 1 UniFP.asm 96 | Code | 11 | | 2 | 00/037B : 46 EB | MDEND LSR {$EB} ;TEST SIGN LSB.
|
||||
97 | 1 UniFP.asm 97 | Code | 11 | | 2 | 00/037D : 90 BF | NORMX BCC NORM ;IF EVEN,NORMALIZE PROD,ELSE COMP
|
||||
98 | 1 UniFP.asm 98 | Code | 11 | | 1 | 00/037F : 38 | FCOMPL SEC ;SET CARRY FOR SUBTRACT. <--------------- not
|
||||
99 | 1 UniFP.asm 99 | Code | 11 | | 2 | 00/0380 : A2 03 | LDX #$3 ;INDEX FOR 3 BYTE SUBTRACT.
|
||||
100 | 1 UniFP.asm 100 | Code | 11 | | 2 | 00/0382 : A9 00 | COMPL1 LDA #$0 ;CLEAR A.
|
||||
101 | 1 UniFP.asm 101 | Code | 11 | | 2 | 00/0384 : F5 FA | SBC {$FA},X ;SUBTRACT BYTE OF EXP1.
|
||||
102 | 1 UniFP.asm 102 | Code | 11 | | 2 | 00/0386 : 95 FA | STA {$FA},X ;RESTORE IT.
|
||||
103 | 1 UniFP.asm 103 | Code | 11 | | 1 | 00/0388 : CA | DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
104 | 1 UniFP.asm 104 | Code | 11 | | 2 | 00/0389 : D0 F7 | BNE COMPL1 ;LOOP UNTIL DONE.
|
||||
105 | 1 UniFP.asm 105 | Code | 11 | | 2 | 00/038B : F0 C5 | BEQ ADDEND ;NORMALIZE (OR SHIFT RT IF OVFL).
|
||||
106 | 1 UniFP.asm 106 | Code | 11 | | 3 | 00/038D : 20 0D 03 | FDIV JSR MD1 ;TAKE ABS VAL OF MANT1, MANT2. <--------- div
|
||||
107 | 1 UniFP.asm 107 | Code | 11 | | 2 | 00/0390 : E5 FA | SBC {$FA} ;SUBTRACT EXP1 FROM EXP2.
|
||||
108 | 1 UniFP.asm 108 | Code | 11 | | 3 | 00/0392 : 20 BD 03 | JSR MD2 ;SAVE AS QUOTIENT EXP.
|
||||
109 | 1 UniFP.asm 109 | Code | 11 | | 1 | 00/0395 : 38 | DIV1 SEC ;SET CARRY FOR SUBTRACT.
|
||||
110 | 1 UniFP.asm 110 | Code | 11 | | 2 | 00/0396 : A2 02 | LDX #$2 ;INDEX FOR 3-BYTE SUBTRACTION.
|
||||
111 | 1 UniFP.asm 111 | Code | 11 | | 2 | 00/0398 : B5 ED | DIV2 LDA {$ED},X
|
||||
112 | 1 UniFP.asm 112 | Code | 11 | | 2 | 00/039A : F5 FE | SBC {$FE},X ;SUBTRACT A BYTE OF E FROM MANT2.
|
||||
113 | 1 UniFP.asm 113 | Code | 11 | | 1 | 00/039C : 48 | PHA ;SAVE ON STACK.
|
||||
114 | 1 UniFP.asm 114 | Code | 11 | | 1 | 00/039D : CA | DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
115 | 1 UniFP.asm 115 | Code | 11 | | 2 | 00/039E : 10 F8 | BPL DIV2 ;LOOP UNTIL DONE.
|
||||
116 | 1 UniFP.asm 116 | Code | 11 | | 2 | 00/03A0 : A2 FD | LDX #$FD ;INDEX FOR 3-BYTE CONDITIONAL MOVE
|
||||
117 | 1 UniFP.asm 117 | Code | 11 | | 1 | 00/03A2 : 68 | DIV3 PLA ;PULL BYTE OF DIFFERENCE OFF STACK
|
||||
118 | 1 UniFP.asm 118 | Code | 11 | | 2 | 00/03A3 : 90 02 | BCC DIV4 ;IF M2<E THEN DON'T RESTORE M2.
|
||||
119 | 1 UniFP.asm 119 | Code | 11 | | 2 | 00/03A5 : 95 F0 | STA {$ED}+3,X
|
||||
120 | 1 UniFP.asm 120 | Code | 11 | | 1 | 00/03A7 : E8 | DIV4 INX ;NEXT LESS SIGNIFICANT BYTE.
|
||||
121 | 1 UniFP.asm 121 | Code | 11 | | 2 | 00/03A8 : D0 F8 | BNE DIV3 ;LOOP UNTIL DONE.
|
||||
122 | 1 UniFP.asm 122 | Code | 11 | | 2 | 00/03AA : 26 FD | ROL {$FB}+2
|
||||
123 | 1 UniFP.asm 123 | Code | 11 | | 2 | 00/03AC : 26 FC | ROL {$FB}+1 ;ROLL QUOTIENT LEFT, CARRY INTO LSB
|
||||
124 | 1 UniFP.asm 124 | Code | 11 | | 2 | 00/03AE : 26 FB | ROL {$FB}
|
||||
125 | 1 UniFP.asm 125 | Code | 11 | | 2 | 00/03B0 : 06 EF | ASL {$ED}+2
|
||||
126 | 1 UniFP.asm 126 | Code | 11 | | 2 | 00/03B2 : 26 EE | ROL {$ED}+1 ;SHIFT DIVIDEND LEFT
|
||||
127 | 1 UniFP.asm 127 | Code | 11 | | 2 | 00/03B4 : 26 ED | ROL {$ED}
|
||||
128 | 1 UniFP.asm 128 | Code | 11 | | 2 | 00/03B6 : B0 1C | BCS OVFL ;OVFL IS DUE TO UNNORMED DIVISOR
|
||||
129 | 1 UniFP.asm 129 | Code | 11 | | 1 | 00/03B8 : 88 | DEY ;NEXT DIVIDE ITERATION.
|
||||
130 | 1 UniFP.asm 130 | Code | 11 | | 2 | 00/03B9 : D0 DA | BNE DIV1 ;LOOP UNTIL DONE 23 ITERATIONS.
|
||||
131 | 1 UniFP.asm 131 | Code | 11 | | 2 | 00/03BB : F0 BE | BEQ MDEND ;NORM. QUOTIENT AND CORRECT SIGN.
|
||||
132 | 1 UniFP.asm 132 | Code | 11 | | 2 | 00/03BD : 86 FD | MD2 STX {$FB}+2
|
||||
133 | 1 UniFP.asm 133 | Code | 11 | | 2 | 00/03BF : 86 FC | STX {$FB}+1 ;CLEAR MANT1 (3 BYTES) FOR MUL/DIV.
|
||||
134 | 1 UniFP.asm 134 | Code | 11 | | 2 | 00/03C1 : 86 FB | STX {$FB}
|
||||
135 | 1 UniFP.asm 135 | Code | 11 | | 2 | 00/03C3 : B0 0D | BCS OVCHK ;IF CALC. SET CARRY,CHECK FOR OVFL
|
||||
136 | 1 UniFP.asm 136 | Code | 11 | | 2 | 00/03C5 : 30 04 | BMI MD3 ;IF NEG THEN NO UNDERFLOW.
|
||||
137 | 1 UniFP.asm 137 | Code | 11 | | 1 | 00/03C7 : 68 | PLA ;POP ONE RETURN LEVEL.
|
||||
138 | 1 UniFP.asm 138 | Code | 11 | | 1 | 00/03C8 : 68 | PLA
|
||||
139 | 1 UniFP.asm 139 | Code | 11 | | 2 | 00/03C9 : 90 B2 | BCC NORMX ;CLEAR X1 AND RETURN.
|
||||
140 | 1 UniFP.asm 140 | Code | 11 | | 2 | 00/03CB : 49 80 | MD3 EOR #$80 ;COMPLEMENT SIGN BIT OF EXPONENT.
|
||||
141 | 1 UniFP.asm 141 | Code | 11 | | 2 | 00/03CD : 85 FA | STA {$FA} ;STORE IT.
|
||||
142 | 1 UniFP.asm 142 | Code | 11 | | 2 | 00/03CF : A0 17 | LDY #$17 ;COUNT 24 MUL/23 DIV ITERATIONS.
|
||||
143 | 1 UniFP.asm 143 | Code | 11 | | 1 | 00/03D1 : 60 | RTS ;RETURN.
|
||||
144 | 1 UniFP.asm 144 | Code | 11 | | 2 | 00/03D2 : 10 F7 | OVCHK BPL MD3 ;IF POSITIVE EXP THEN NO OVFL.
|
||||
145 | 1 UniFP.asm 145 | Code | 11 | | 3 | 00/03D4 : 4C F5 03 | OVFL JMP {$3F5}
|
||||
146 | 1 UniFP.asm 146 | Comment | 11 | | 0 | 00/03D7 | * ORG $F63D
|
||||
147 | 1 UniFP.asm 147 | Code | 11 | | 3 | 00/03D7 : 20 58 03 | FIX1 JSR RTAR
|
||||
148 | 1 UniFP.asm 148 | Code | 11 | | 2 | 00/03DA : A5 FA | FIX LDA {$FA} ; <------------------------------ fp to int
|
||||
149 | 1 UniFP.asm 149 | Code | 11 | | 2 | 00/03DC : 10 13 | BPL UNDFL
|
||||
150 | 1 UniFP.asm 150 | Code | 11 | | 2 | 00/03DE : C9 8E | CMP #$8E
|
||||
151 | 1 UniFP.asm 151 | Code | 11 | | 2 | 00/03E0 : D0 F5 | BNE FIX1
|
||||
152 | 1 UniFP.asm 152 | Code | 11 | | 2 | 00/03E2 : 24 FB | BIT {$FB}
|
||||
153 | 1 UniFP.asm 153 | Code | 11 | | 2 | 00/03E4 : 10 0A | BPL FIXRTS
|
||||
154 | 1 UniFP.asm 154 | Code | 11 | | 2 | 00/03E6 : A5 FD | LDA {$FB}+2
|
||||
155 | 1 UniFP.asm 155 | Code | 11 | | 2 | 00/03E8 : F0 06 | BEQ FIXRTS
|
||||
156 | 1 UniFP.asm 156 | Code | 11 | | 2 | 00/03EA : E6 FC | INC {$FB}+1
|
||||
157 | 1 UniFP.asm 157 | Code | 11 | | 2 | 00/03EC : D0 02 | BNE FIXRTS
|
||||
158 | 1 UniFP.asm 158 | Code | 11 | | 2 | 00/03EE : E6 FB | INC {$FB}
|
||||
159 | 1 UniFP.asm 159 | Code | 11 | | 1 | 00/03F0 : 60 | FIXRTS RTS
|
||||
160 | 1 UniFP.asm 160 | Code | 11 | | 2 | 00/03F1 : A9 00 | UNDFL LDA #$0
|
||||
161 | 1 UniFP.asm 161 | Code | 11 | | 2 | 00/03F3 : 85 FB | STA {$FB}
|
||||
162 | 1 UniFP.asm 162 | Code | 11 | | 2 | 00/03F5 : 85 FC | STA {$FB}+1
|
||||
163 | 1 UniFP.asm 163 | Code | 11 | | 1 | 00/03F7 : 60 | RTS
|
||||
------+---------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
|
BIN
AppleII/FP operations/Unidrive4
Normal file
BIN
AppleII/FP operations/Unidrive4
Normal file
Binary file not shown.
@ -53,16 +53,16 @@
|
||||
50 | 1 Unidrive4.asm 50 | Empty | 11 | | 0 | 00/8000 |
|
||||
51 | 1 Unidrive4.asm 51 | Comment | 11 | | 0 | 00/8000 | *
|
||||
52 | 1 Unidrive4.asm 52 | Comment | 11 | | 0 | 00/8000 | * Find a Protocol Converter in one of the slots.
|
||||
53 | 1 Unidrive4.asm 53 | Code | 11 | | 3 | 00/8000 : 20 9E 80 | START jsr {ozunid_4}
|
||||
53 | 1 Unidrive4.asm 53 | Code | 11 | | 3 | 00/8000 : 20 99 80 | START jsr {ozunid_4}
|
||||
54 | 1 Unidrive4.asm 54 | Code | 11 | | 2 | 00/8003 : B0 10 | bcs {ozunid_1}
|
||||
55 | 1 Unidrive4.asm 55 | Comment | 11 | | 0 | 00/8005 | *** Eject ***
|
||||
56 | 1 Unidrive4.asm 56 | Code | 11 | | 3 | 00/8005 : 20 D3 80 | jsr {ozunid_9}
|
||||
56 | 1 Unidrive4.asm 56 | Code | 11 | | 3 | 00/8005 : 20 CE 80 | jsr {ozunid_9}
|
||||
57 | 1 Unidrive4.asm 57 | Data | 11 | | 1 | 00/8008 : 04 | dfb {4}
|
||||
58 | 1 Unidrive4.asm 58 | Data | 11 | | 2 | 00/8009 : F2 80 | dw {ozunid_15}
|
||||
58 | 1 Unidrive4.asm 58 | Data | 11 | | 2 | 00/8009 : ED 80 | dw {ozunid_15}
|
||||
59 | 1 Unidrive4.asm 59 | Comment | 11 | | 0 | 00/800B | *** Set Address ***
|
||||
60 | 1 Unidrive4.asm 60 | Code | 11 | | 3 | 00/800B : 20 D3 80 | jsr {ozunid_9}
|
||||
60 | 1 Unidrive4.asm 60 | Code | 11 | | 3 | 00/800B : 20 CE 80 | jsr {ozunid_9}
|
||||
61 | 1 Unidrive4.asm 61 | Data | 11 | | 1 | 00/800E : 04 | dfb {4}
|
||||
62 | 1 Unidrive4.asm 62 | Data | 11 | | 2 | 00/800F : E3 80 | dw {ozunid_12}
|
||||
62 | 1 Unidrive4.asm 62 | Data | 11 | | 2 | 00/800F : DE 80 | dw {ozunid_12}
|
||||
63 | 1 Unidrive4.asm 63 | Comment | 11 | | 0 | 00/8011 | *
|
||||
64 | 1 Unidrive4.asm 64 | Code | 11 | | 3 | 00/8011 : 20 37 80 | jsr EXEC ; Jump the Error routine
|
||||
65 | 1 Unidrive4.asm 65 | Code | 11 | | 1 | 00/8014 : 60 | rts
|
||||
@ -97,453 +97,449 @@
|
||||
90 | 1 Unidrive4.asm 87 | Comment | 11 | | 0 | 00/8037 | ** Set the Input Value first in Dynamic data **
|
||||
91 | 1 Unidrive4.asm 88 | Comment | 11 | | 0 | 00/8037 | ** 4 Byte N1 to FP1 **
|
||||
92 | 1 Unidrive4.asm 89 | Code | 11 | | 2 | 00/8037 : A5 FA | EXEC lda {$FA} ;X1
|
||||
93 | 1 Unidrive4.asm 90 | Code | 11 | | 3 | 00/8039 : 8D 38 82 | sta $8238 ; Absolute addressing
|
||||
93 | 1 Unidrive4.asm 90 | Code | 11 | | 3 | 00/8039 : 8D 2F 82 | sta $822F ; Absolute addressing
|
||||
94 | 1 Unidrive4.asm 91 | Code | 11 | | 2 | 00/803C : A5 FB | lda {$FA}+1 ;M1 (1)
|
||||
95 | 1 Unidrive4.asm 92 | Code | 11 | | 3 | 00/803E : 8D 39 82 | sta $8239
|
||||
95 | 1 Unidrive4.asm 92 | Code | 11 | | 3 | 00/803E : 8D 30 82 | sta $8230
|
||||
96 | 1 Unidrive4.asm 93 | Code | 11 | | 2 | 00/8041 : A5 FC | lda {$FA}+2 ;M1 (2)
|
||||
97 | 1 Unidrive4.asm 94 | Code | 11 | | 3 | 00/8043 : 8D 3A 82 | sta $823A
|
||||
97 | 1 Unidrive4.asm 94 | Code | 11 | | 3 | 00/8043 : 8D 31 82 | sta $8231
|
||||
98 | 1 Unidrive4.asm 95 | Code | 11 | | 2 | 00/8046 : A5 FD | lda {$FA}+3 ;M1 (3)
|
||||
99 | 1 Unidrive4.asm 96 | Code | 11 | | 3 | 00/8048 : 8D 3B 82 | sta $823B
|
||||
99 | 1 Unidrive4.asm 96 | Code | 11 | | 3 | 00/8048 : 8D 32 82 | sta $8232
|
||||
100 | 1 Unidrive4.asm 97 | Empty | 11 | | 0 | 00/804B |
|
||||
101 | 1 Unidrive4.asm 98 | Comment | 11 | | 0 | 00/804B | ** 4 Byte N2 to FP2 **
|
||||
102 | 1 Unidrive4.asm 99 | Code | 11 | | 2 | 00/804B : A5 EC | lda {$EC} ;X2
|
||||
103 | 1 Unidrive4.asm 100 | Code | 11 | | 3 | 00/804D : 8D 3C 82 | sta $823C
|
||||
103 | 1 Unidrive4.asm 100 | Code | 11 | | 3 | 00/804D : 8D 33 82 | sta $8233
|
||||
104 | 1 Unidrive4.asm 101 | Code | 11 | | 2 | 00/8050 : A5 ED | lda {$EC}+1 ;M2 (1)
|
||||
105 | 1 Unidrive4.asm 102 | Code | 11 | | 3 | 00/8052 : 8D 3D 82 | sta $823D
|
||||
105 | 1 Unidrive4.asm 102 | Code | 11 | | 3 | 00/8052 : 8D 34 82 | sta $8234
|
||||
106 | 1 Unidrive4.asm 103 | Code | 11 | | 2 | 00/8055 : A5 EE | lda {$EC}+2 ;M2 (2)
|
||||
107 | 1 Unidrive4.asm 104 | Code | 11 | | 3 | 00/8057 : 8D 3E 82 | sta $823E
|
||||
107 | 1 Unidrive4.asm 104 | Code | 11 | | 3 | 00/8057 : 8D 35 82 | sta $8235
|
||||
108 | 1 Unidrive4.asm 105 | Code | 11 | | 2 | 00/805A : A5 EF | lda {$EC}+3 ;M2 (3)
|
||||
109 | 1 Unidrive4.asm 106 | Code | 11 | | 3 | 00/805C : 8D 3F 82 | sta $823F
|
||||
109 | 1 Unidrive4.asm 106 | Code | 11 | | 3 | 00/805C : 8D 36 82 | sta $8236
|
||||
110 | 1 Unidrive4.asm 107 | Empty | 11 | | 0 | 00/805F |
|
||||
111 | 1 Unidrive4.asm 108 | Comment | 11 | | 0 | 00/805F | *** Download ***
|
||||
112 | 1 Unidrive4.asm 109 | Code | 11 | | 3 | 00/805F : 20 D3 80 | jsr {ozunid_9}
|
||||
112 | 1 Unidrive4.asm 109 | Code | 11 | | 3 | 00/805F : 20 CE 80 | jsr {ozunid_9}
|
||||
113 | 1 Unidrive4.asm 110 | Data | 11 | | 1 | 00/8062 : 04 | dfb {4}
|
||||
114 | 1 Unidrive4.asm 111 | Data | 11 | | 2 | 00/8063 : E8 80 | dw {ozunid_13}
|
||||
114 | 1 Unidrive4.asm 111 | Data | 11 | | 2 | 00/8063 : E3 80 | dw {ozunid_13}
|
||||
115 | 1 Unidrive4.asm 112 | Comment | 11 | | 0 | 00/8065 | ** Set Unidisk Registers **
|
||||
116 | 1 Unidrive4.asm 113 | Code | 11 | | 2 | 00/8065 : A9 01 | lda #01 ;First time
|
||||
117 | 1 Unidrive4.asm 114 | Code | 11 | | 3 | 00/8067 : 8D DE 80 | sta UNIAcc_reg
|
||||
118 | 1 Unidrive4.asm 115 | Comment | 11 | | 0 | 00/806A | ** Execute **
|
||||
119 | 1 Unidrive4.asm 116 | Code | 11 | | 3 | 00/806A : 20 D3 80 | jsr {ozunid_9}
|
||||
120 | 1 Unidrive4.asm 117 | Data | 11 | | 1 | 00/806D : 04 | dfb {4}
|
||||
121 | 1 Unidrive4.asm 118 | Data | 11 | | 2 | 00/806E : ED 80 | dw {ozunid_14}
|
||||
122 | 1 Unidrive4.asm 119 | Comment | 11 | | 0 | 00/8070 | ** Read **
|
||||
123 | 1 Unidrive4.asm 120 | Code | 11 | | 3 | 00/8070 : 20 D3 80 | READ jsr {ozunid_9}
|
||||
124 | 1 Unidrive4.asm 121 | Data | 11 | | 1 | 00/8073 : 00 | dfb {0}
|
||||
125 | 1 Unidrive4.asm 122 | Data | 11 | | 2 | 00/8074 : D6 80 | dw {ozunid_10}
|
||||
126 | 1 Unidrive4.asm 123 | Code | 11 | | 2 | 00/8076 : B0 9D | bcs {ozunid_1}
|
||||
127 | 1 Unidrive4.asm 124 | Comment | 11 | | 0 | 00/8078 | *
|
||||
128 | 1 Unidrive4.asm 125 | Comment | 11 | | 0 | 00/8078 | **** Store Output results in //c ****
|
||||
129 | 1 Unidrive4.asm 126 | Empty | 11 | | 0 | 00/8078 |
|
||||
130 | 1 Unidrive4.asm 127 | Comment | 11 | | 0 | 00/8078 | * First time execute *
|
||||
131 | 1 Unidrive4.asm 128 | Code | 11 | | 3 | 00/8078 : AD DE 80 | lda UNIAcc_reg
|
||||
132 | 1 Unidrive4.asm 129 | Code | 11 | | 2 | 00/807B : 85 FA | sta {$FA}
|
||||
133 | 1 Unidrive4.asm 130 | Code | 11 | | 3 | 00/807D : AD DF 80 | lda UNIX_reg
|
||||
134 | 1 Unidrive4.asm 131 | Code | 11 | | 2 | 00/8080 : 85 FB | sta {$FA}+1 ; Store the result
|
||||
135 | 1 Unidrive4.asm 132 | Code | 11 | | 3 | 00/8082 : AD E0 80 | lda UNIY_reg
|
||||
136 | 1 Unidrive4.asm 133 | Code | 11 | | 2 | 00/8085 : 85 FC | sta {$FA}+2
|
||||
137 | 1 Unidrive4.asm 134 | Empty | 11 | | 0 | 00/8087 |
|
||||
138 | 1 Unidrive4.asm 135 | Comment | 11 | | 0 | 00/8087 | ** Second time execute **
|
||||
139 | 1 Unidrive4.asm 136 | Code | 11 | | 2 | 00/8087 : A9 02 | lda #02 ; Second time
|
||||
140 | 1 Unidrive4.asm 137 | Code | 11 | | 3 | 00/8089 : 8D DE 80 | sta UNIAcc_reg
|
||||
141 | 1 Unidrive4.asm 138 | Comment | 11 | | 0 | 00/808C | ** Execute **
|
||||
142 | 1 Unidrive4.asm 139 | Code | 11 | | 3 | 00/808C : 20 D3 80 | jsr {ozunid_9}
|
||||
143 | 1 Unidrive4.asm 140 | Data | 11 | | 1 | 00/808F : 04 | dfb {4}
|
||||
144 | 1 Unidrive4.asm 141 | Data | 11 | | 2 | 00/8090 : ED 80 | dw {ozunid_14}
|
||||
145 | 1 Unidrive4.asm 142 | Comment | 11 | | 0 | 00/8092 | ** Read **
|
||||
146 | 1 Unidrive4.asm 143 | Code | 11 | | 3 | 00/8092 : 20 D3 80 | jsr {ozunid_9}
|
||||
147 | 1 Unidrive4.asm 144 | Data | 11 | | 1 | 00/8095 : 00 | dfb {0}
|
||||
148 | 1 Unidrive4.asm 145 | Data | 11 | | 2 | 00/8096 : D6 80 | dw {ozunid_10}
|
||||
149 | 1 Unidrive4.asm 146 | Comment | 11 | | 0 | 00/8098 | * bcs Error
|
||||
150 | 1 Unidrive4.asm 147 | Empty | 11 | | 0 | 00/8098 |
|
||||
151 | 1 Unidrive4.asm 148 | Comment | 11 | | 0 | 00/8098 | * Second time execute only to read the latest Byte of FP1*
|
||||
152 | 1 Unidrive4.asm 149 | Code | 11 | | 3 | 00/8098 : AD DE 80 | lda UNIAcc_reg
|
||||
153 | 1 Unidrive4.asm 150 | Code | 11 | | 2 | 00/809B : 85 FD | sta {$FA}+3
|
||||
154 | 1 Unidrive4.asm 151 | Comment | 11 | | 0 | 00/809D | *
|
||||
155 | 1 Unidrive4.asm 152 | Code | 11 | | 1 | 00/809D : 60 | rts
|
||||
156 | 1 Unidrive4.asm 153 | Empty | 11 | | 0 | 00/809E |
|
||||
157 | 1 Unidrive4.asm 154 | Comment | 11 | | 0 | 00/809E | ******************************************************
|
||||
158 | 1 Unidrive4.asm 155 | Empty | 11 | | 0 | 00/809E | ozunid_4
|
||||
159 | 1 Unidrive4.asm 155 | Equivalence | 11 | | 0 | 00/809E | FindPC equ ozunid_4
|
||||
160 | 1 Unidrive4.asm 156 | Comment | 11 | | 0 | 00/809E | *
|
||||
161 | 1 Unidrive4.asm 157 | Comment | 11 | | 0 | 00/809E | * Search slot 7 to slot 1 looking for signature bytes
|
||||
162 | 1 Unidrive4.asm 158 | Comment | 11 | | 0 | 00/809E | *
|
||||
163 | 1 Unidrive4.asm 159 | Code | 11 | | 2 | 00/809E : A2 07 | ldx #7 ;Do for seven slots
|
||||
164 | 1 Unidrive4.asm 160 | Code | 11 | | 2 | 00/80A0 : A9 C7 | lda #$C7
|
||||
165 | 1 Unidrive4.asm 161 | Code | 11 | | 2 | 00/80A2 : 85 07 | sta {$0007}
|
||||
166 | 1 Unidrive4.asm 162 | Code | 11 | | 2 | 00/80A4 : A9 00 | lda #$00
|
||||
167 | 1 Unidrive4.asm 163 | Code | 11 | | 2 | 00/80A6 : 85 06 | sta {$0006}
|
||||
168 | 1 Unidrive4.asm 164 | Comment | 11 | | 0 | 00/80A8 | *
|
||||
169 | 1 Unidrive4.asm 165 | Empty | 11 | | 0 | 00/80A8 | ozunid_5
|
||||
170 | 1 Unidrive4.asm 165 | Equivalence | 11 | | 0 | 00/80A8 | newslot equ ozunid_5
|
||||
171 | 1 Unidrive4.asm 166 | Code | 11 | | 2 | 00/80A8 : A0 07 | ldy #7
|
||||
172 | 1 Unidrive4.asm 167 | Comment | 11 | | 0 | 00/80AA | *
|
||||
173 | 1 Unidrive4.asm 168 | Empty | 11 | | 0 | 00/80AA | ozunid_6
|
||||
174 | 1 Unidrive4.asm 168 | Equivalence | 11 | | 0 | 00/80AA | again equ ozunid_6
|
||||
175 | 1 Unidrive4.asm 169 | Code | 11 | | 2 | 00/80AA : B1 06 | lda ({$0006}),y
|
||||
176 | 1 Unidrive4.asm 170 | Code | 11 | | 3 | 00/80AC : D9 CB 80 | cmp sigtab,y ;One for byte signature
|
||||
177 | 1 Unidrive4.asm 171 | Code | 11 | | 2 | 00/80AF : F0 07 | beq {ozunid_7} ;Found one signature byte
|
||||
178 | 1 Unidrive4.asm 172 | Code | 11 | | 2 | 00/80B1 : C6 07 | dec {$0007}
|
||||
179 | 1 Unidrive4.asm 173 | Code | 11 | | 1 | 00/80B3 : CA | dex
|
||||
180 | 1 Unidrive4.asm 174 | Code | 11 | | 2 | 00/80B4 : D0 F2 | bne {ozunid_5}
|
||||
181 | 1 Unidrive4.asm 175 | Comment | 11 | | 0 | 00/80B6 | *
|
||||
182 | 1 Unidrive4.asm 176 | Comment | 11 | | 0 | 00/80B6 | * if we get here, no PC find
|
||||
183 | 1 Unidrive4.asm 177 | Code | 11 | | 1 | 00/80B6 : 38 | sec
|
||||
184 | 1 Unidrive4.asm 178 | Code | 11 | | 1 | 00/80B7 : 60 | rts
|
||||
185 | 1 Unidrive4.asm 179 | Comment | 11 | | 0 | 00/80B8 | *
|
||||
186 | 1 Unidrive4.asm 180 | Comment | 11 | | 0 | 00/80B8 | * if we get here, no byte find on PC
|
||||
187 | 1 Unidrive4.asm 181 | Empty | 11 | | 0 | 00/80B8 | ozunid_7
|
||||
188 | 1 Unidrive4.asm 181 | Equivalence | 11 | | 0 | 00/80B8 | maybe equ ozunid_7
|
||||
189 | 1 Unidrive4.asm 182 | Code | 11 | | 1 | 00/80B8 : 88 | dey
|
||||
190 | 1 Unidrive4.asm 183 | Code | 11 | | 1 | 00/80B9 : 88 | dey ;if N=1 then all sig bytes OK
|
||||
191 | 1 Unidrive4.asm 184 | Code | 11 | | 2 | 00/80BA : 10 EE | bpl {ozunid_6}
|
||||
192 | 1 Unidrive4.asm 185 | Comment | 11 | | 0 | 00/80BC | * Found PC interface. Set up call address.
|
||||
193 | 1 Unidrive4.asm 186 | Comment | 11 | | 0 | 00/80BC | * we already have high byte ($CN), we need low byte
|
||||
194 | 1 Unidrive4.asm 187 | Comment | 11 | | 0 | 00/80BC | *
|
||||
195 | 1 Unidrive4.asm 188 | Empty | 11 | | 0 | 00/80BC | ozunid_8
|
||||
196 | 1 Unidrive4.asm 188 | Equivalence | 11 | | 0 | 00/80BC | foundPC equ ozunid_8
|
||||
197 | 1 Unidrive4.asm 189 | Code | 11 | | 2 | 00/80BC : A9 FF | lda #$FF
|
||||
198 | 1 Unidrive4.asm 190 | Code | 11 | | 2 | 00/80BE : 85 06 | sta {$0006}
|
||||
199 | 1 Unidrive4.asm 191 | Code | 11 | | 2 | 00/80C0 : A0 00 | ldy #0 ;For indirect load
|
||||
200 | 1 Unidrive4.asm 192 | Code | 11 | | 2 | 00/80C2 : B1 06 | lda ({$0006}),y ;Get the byte
|
||||
201 | 1 Unidrive4.asm 193 | Comment | 11 | | 0 | 00/80C4 | *
|
||||
202 | 1 Unidrive4.asm 194 | Comment | 11 | | 0 | 00/80C4 | * Now the Acc has the low oreder ProDOS entry point.
|
||||
203 | 1 Unidrive4.asm 195 | Comment | 11 | | 0 | 00/80C4 | * The PC entry is three locations past this ...
|
||||
204 | 1 Unidrive4.asm 196 | Comment | 11 | | 0 | 00/80C4 | *
|
||||
205 | 1 Unidrive4.asm 197 | Code | 11 | | 1 | 00/80C4 : 18 | clc
|
||||
206 | 1 Unidrive4.asm 198 | Code | 11 | | 2 | 00/80C5 : 69 03 | adc #3
|
||||
207 | 1 Unidrive4.asm 199 | Code | 11 | | 2 | 00/80C7 : 85 06 | sta {$0006}
|
||||
208 | 1 Unidrive4.asm 200 | Comment | 11 | | 0 | 00/80C9 | *
|
||||
209 | 1 Unidrive4.asm 201 | Comment | 11 | | 0 | 00/80C9 | * Now ZPTempL has PC entry point.
|
||||
210 | 1 Unidrive4.asm 202 | Comment | 11 | | 0 | 00/80C9 | * Return with carry clear.
|
||||
211 | 1 Unidrive4.asm 203 | Comment | 11 | | 0 | 00/80C9 | *
|
||||
212 | 1 Unidrive4.asm 204 | Code | 11 | | 1 | 00/80C9 : 18 | clc
|
||||
213 | 1 Unidrive4.asm 205 | Code | 11 | | 1 | 00/80CA : 60 | rts
|
||||
214 | 1 Unidrive4.asm 206 | Comment | 11 | | 0 | 00/80CB | ***********************************************************
|
||||
215 | 1 Unidrive4.asm 207 | Comment | 11 | | 0 | 00/80CB | *
|
||||
216 | 1 Unidrive4.asm 208 | Comment | 11 | | 0 | 00/80CB | * There are the PC signature bytes in their relative order.
|
||||
217 | 1 Unidrive4.asm 209 | Comment | 11 | | 0 | 00/80CB | * The $FF bytes are filler bytes and are not compared.
|
||||
218 | 1 Unidrive4.asm 210 | Comment | 11 | | 0 | 00/80CB | *
|
||||
219 | 1 Unidrive4.asm 211 | Data | 11 | | 4 | 00/80CB : FF 20 FF 00 | sigtab dfb $FF,$20,$FF,$00
|
||||
220 | 1 Unidrive4.asm 212 | Data | 11 | | 4 | 00/80CF : FF 03 FF 00 | dfb $FF,$03,$FF,$00
|
||||
221 | 1 Unidrive4.asm 213 | Comment | 11 | | 0 | 00/80D3 | *
|
||||
222 | 1 Unidrive4.asm 214 | Empty | 11 | | 0 | 00/80D3 | ozunid_9
|
||||
223 | 1 Unidrive4.asm 214 | Equivalence | 11 | | 0 | 00/80D3 | Dispatch equ ozunid_9
|
||||
224 | 1 Unidrive4.asm 215 | Code | 11 | | 3 | 00/80D3 : 6C 06 00 | jmp ({$0006}) ;Simulate an indirect JSR to PC
|
||||
225 | 1 Unidrive4.asm 216 | Comment | 11 | | 0 | 00/80D6 | *
|
||||
226 | 1 Unidrive4.asm 217 | Comment | 11 | | 0 | 00/80D6 | *** Status Parameter Set for UNI ***
|
||||
227 | 1 Unidrive4.asm 218 | Empty | 11 | | 0 | 00/80D6 | ozunid_10
|
||||
228 | 1 Unidrive4.asm 218 | Equivalence | 11 | | 0 | 00/80D6 | DParms equ ozunid_10
|
||||
229 | 1 Unidrive4.asm 219 | Data | 11 | | 1 | 00/80D6 : 03 | DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
230 | 1 Unidrive4.asm 220 | Data | 11 | | 1 | 00/80D7 : 01 | DPUnit dfb 1
|
||||
231 | 1 Unidrive4.asm 221 | Data | 11 | | 2 | 00/80D8 : DB 80 | DPBuffer dw {ozunid_11}
|
||||
232 | 1 Unidrive4.asm 222 | Data | 11 | | 1 | 00/80DA : 05 | DPStatCode dfb {5}
|
||||
233 | 1 Unidrive4.asm 223 | Comment | 11 | | 0 | 00/80DB | *
|
||||
234 | 1 Unidrive4.asm 224 | Comment | 11 | | 0 | 00/80DB | *
|
||||
235 | 1 Unidrive4.asm 225 | Comment | 11 | | 0 | 00/80DB | *
|
||||
236 | 1 Unidrive4.asm 226 | Comment | 11 | | 0 | 00/80DB | *** Status List UNI ***
|
||||
237 | 1 Unidrive4.asm 227 | Empty | 11 | | 0 | 00/80DB | ozunid_11
|
||||
238 | 1 Unidrive4.asm 227 | Equivalence | 11 | | 0 | 00/80DB | UNI equ ozunid_11
|
||||
239 | 1 Unidrive4.asm 228 | Data | 11 | | 1 | 00/80DB : 00 | dfb 0
|
||||
240 | 1 Unidrive4.asm 229 | Data | 11 | | 1 | 00/80DC : 00 | UNIError dfb 0
|
||||
241 | 1 Unidrive4.asm 230 | Data | 11 | | 1 | 00/80DD : 00 | UNIRetries dfb 0
|
||||
242 | 1 Unidrive4.asm 231 | Data | 11 | | 1 | 00/80DE : 00 | UNIAcc_reg dfb 0
|
||||
243 | 1 Unidrive4.asm 232 | Data | 11 | | 1 | 00/80DF : 00 | UNIX_reg dfb 0
|
||||
244 | 1 Unidrive4.asm 233 | Data | 11 | | 1 | 00/80E0 : 00 | UNIY_reg dfb 0
|
||||
245 | 1 Unidrive4.asm 234 | Data | 11 | | 1 | 00/80E1 : 00 | UNIP_val dfb 0
|
||||
246 | 1 Unidrive4.asm 235 | Data | 11 | | 1 | 00/80E2 : 00 | HHH dfb 0
|
||||
247 | 1 Unidrive4.asm 236 | Comment | 11 | | 0 | 00/80E3 | *
|
||||
248 | 1 Unidrive4.asm 237 | Comment | 11 | | 0 | 00/80E3 | *** Set Address ***
|
||||
249 | 1 Unidrive4.asm 238 | Empty | 11 | | 0 | 00/80E3 | ozunid_12
|
||||
250 | 1 Unidrive4.asm 238 | Equivalence | 11 | | 0 | 00/80E3 | SET_ADD equ ozunid_12
|
||||
251 | 1 Unidrive4.asm 239 | Data | 11 | | 1 | 00/80E3 : 03 | dfb 3
|
||||
252 | 1 Unidrive4.asm 240 | Data | 11 | | 1 | 00/80E4 : 01 | dfb 1
|
||||
253 | 1 Unidrive4.asm 241 | Data | 11 | | 2 | 00/80E5 : 01 81 | dw {ozunid_18}
|
||||
254 | 1 Unidrive4.asm 242 | Data | 11 | | 1 | 00/80E7 : 06 | dfb {6}
|
||||
255 | 1 Unidrive4.asm 243 | Comment | 11 | | 0 | 00/80E8 | *
|
||||
256 | 1 Unidrive4.asm 244 | Comment | 11 | | 0 | 00/80E8 | *** Download ***
|
||||
257 | 1 Unidrive4.asm 245 | Empty | 11 | | 0 | 00/80E8 | ozunid_13
|
||||
258 | 1 Unidrive4.asm 245 | Equivalence | 11 | | 0 | 00/80E8 | DOWNLOAD equ ozunid_13
|
||||
259 | 1 Unidrive4.asm 246 | Data | 11 | | 1 | 00/80E8 : 03 | dfb 3
|
||||
260 | 1 Unidrive4.asm 247 | Data | 11 | | 1 | 00/80E9 : 01 | dfb 1
|
||||
261 | 1 Unidrive4.asm 248 | Data | 11 | | 2 | 00/80EA : 05 81 | dw {ozunid_19}
|
||||
262 | 1 Unidrive4.asm 249 | Data | 11 | | 1 | 00/80EC : 07 | dfb {7}
|
||||
263 | 1 Unidrive4.asm 250 | Comment | 11 | | 0 | 00/80ED | *
|
||||
264 | 1 Unidrive4.asm 251 | Comment | 11 | | 0 | 00/80ED | *** Execute ***
|
||||
265 | 1 Unidrive4.asm 252 | Empty | 11 | | 0 | 00/80ED | ozunid_14
|
||||
266 | 1 Unidrive4.asm 252 | Equivalence | 11 | | 0 | 00/80ED | EXE equ ozunid_14
|
||||
267 | 1 Unidrive4.asm 253 | Data | 11 | | 1 | 00/80ED : 03 | dfb 3
|
||||
268 | 1 Unidrive4.asm 254 | Data | 11 | | 1 | 00/80EE : 01 | dfb 1
|
||||
269 | 1 Unidrive4.asm 255 | Data | 11 | | 2 | 00/80EF : F9 80 | dw {ozunid_17}
|
||||
270 | 1 Unidrive4.asm 256 | Data | 11 | | 1 | 00/80F1 : 05 | dfb {5}
|
||||
271 | 1 Unidrive4.asm 257 | Comment | 11 | | 0 | 00/80F2 | *** Eject ***
|
||||
272 | 1 Unidrive4.asm 258 | Empty | 11 | | 0 | 00/80F2 | ozunid_15
|
||||
273 | 1 Unidrive4.asm 258 | Equivalence | 11 | | 0 | 00/80F2 | E_JECT equ ozunid_15
|
||||
274 | 1 Unidrive4.asm 259 | Data | 11 | | 1 | 00/80F2 : 03 | dfb 3
|
||||
275 | 1 Unidrive4.asm 260 | Data | 11 | | 1 | 00/80F3 : 01 | dfb 1
|
||||
276 | 1 Unidrive4.asm 261 | Data | 11 | | 2 | 00/80F4 : F7 80 | dw {ozunid_16}
|
||||
277 | 1 Unidrive4.asm 262 | Data | 11 | | 1 | 00/80F6 : 04 | dfb {4}
|
||||
278 | 1 Unidrive4.asm 263 | Comment | 11 | | 0 | 00/80F7 | *
|
||||
279 | 1 Unidrive4.asm 264 | Comment | 11 | | 0 | 00/80F7 | ******** CONTROL LISTS ********
|
||||
280 | 1 Unidrive4.asm 265 | Comment | 11 | | 0 | 00/80F7 | *
|
||||
281 | 1 Unidrive4.asm 266 | Comment | 11 | | 0 | 00/80F7 | *
|
||||
282 | 1 Unidrive4.asm 267 | Comment | 11 | | 0 | 00/80F7 | *** Eject ***
|
||||
283 | 1 Unidrive4.asm 268 | Empty | 11 | | 0 | 00/80F7 | ozunid_16
|
||||
284 | 1 Unidrive4.asm 268 | Equivalence | 11 | | 0 | 00/80F7 | CNTL_LIST1 equ ozunid_16
|
||||
285 | 1 Unidrive4.asm 269 | Data | 11 | | 2 | 00/80F7 : 00 00 | dw $0000
|
||||
286 | 1 Unidrive4.asm 270 | Comment | 11 | | 0 | 00/80F9 | *
|
||||
287 | 1 Unidrive4.asm 271 | Comment | 11 | | 0 | 00/80F9 | *** Execute ***
|
||||
288 | 1 Unidrive4.asm 272 | Empty | 11 | | 0 | 00/80F9 | ozunid_17
|
||||
289 | 1 Unidrive4.asm 272 | Equivalence | 11 | | 0 | 00/80F9 | CNTL_LIST2 equ ozunid_17
|
||||
290 | 1 Unidrive4.asm 273 | Data | 11 | | 1 | 00/80F9 : 06 | Clow_byte dfb $06
|
||||
291 | 1 Unidrive4.asm 274 | Data | 11 | | 1 | 00/80FA : 00 | Chigh_byte dfb $00
|
||||
292 | 1 Unidrive4.asm 275 | Data | 11 | | 1 | 00/80FB : 00 | AccValue dfb $00 ; Init Value Unidisk Accumulator Register
|
||||
293 | 1 Unidrive4.asm 276 | Data | 11 | | 1 | 00/80FC : 00 | X_reg dfb $00 ; Init Value Unidisk X Register
|
||||
294 | 1 Unidrive4.asm 277 | Data | 11 | | 1 | 00/80FD : 00 | Y_reg dfb $00 ; Init Value Unidisk Y Register
|
||||
295 | 1 Unidrive4.asm 278 | Data | 11 | | 1 | 00/80FE : 00 | ProStatus dfb $00 ; Init Value Unidisk Status Register
|
||||
296 | 1 Unidrive4.asm 279 | Data | 11 | | 1 | 00/80FF : 00 | LowPC_reg dfb $00 ; Init Value Unidisk Program Counter $0500
|
||||
297 | 1 Unidrive4.asm 280 | Data | 11 | | 1 | 00/8100 : 05 | HighPC_reg dfb $05
|
||||
298 | 1 Unidrive4.asm 281 | Comment | 11 | | 0 | 00/8101 | *
|
||||
299 | 1 Unidrive4.asm 282 | Comment | 11 | | 0 | 00/8101 | *** Set Address ***
|
||||
300 | 1 Unidrive4.asm 283 | Empty | 11 | | 0 | 00/8101 | ozunid_18
|
||||
301 | 1 Unidrive4.asm 283 | Equivalence | 11 | | 0 | 00/8101 | CNTL_LIST3 equ ozunid_18
|
||||
302 | 1 Unidrive4.asm 284 | Data | 11 | | 1 | 00/8101 : 02 | CountL_byte dfb $02
|
||||
303 | 1 Unidrive4.asm 285 | Data | 11 | | 1 | 00/8102 : 00 | CountH_byte dfb $00
|
||||
304 | 1 Unidrive4.asm 286 | Data | 11 | | 1 | 00/8103 : 00 | LByte_Addr dfb $00 ; ORG of Unidisk program, set begin program address $0500
|
||||
305 | 1 Unidrive4.asm 287 | Data | 11 | | 1 | 00/8104 : 05 | HByte_Addr dfb $05
|
||||
306 | 1 Unidrive4.asm 288 | Comment | 11 | | 0 | 00/8105 | *
|
||||
307 | 1 Unidrive4.asm 289 | Comment | 11 | | 0 | 00/8105 | *** Download ***
|
||||
308 | 1 Unidrive4.asm 290 | Empty | 11 | | 0 | 00/8105 | ozunid_19
|
||||
309 | 1 Unidrive4.asm 290 | Equivalence | 11 | | 0 | 00/8105 | CNTL_LIST4 equ ozunid_19
|
||||
310 | 1 Unidrive4.asm 291 | Data | 11 | | 1 | 00/8105 : 38 | LenghtL_byte dfb $38 ;<----- Lenght of Unidisk program Lo - Byte 312 byte
|
||||
311 | 1 Unidrive4.asm 292 | Data | 11 | | 1 | 00/8106 : 01 | LenghtH_byte dfb $01 ;<----- Lenght of Unidisk program Hi Byte
|
||||
312 | 1 Unidrive4.asm 293 | Comment | 11 | | 0 | 00/8107 | *
|
||||
313 | 1 Unidrive4.asm 294 | Comment | 11 | | 0 | 00/8107 | **************** Start UNIDISK Program ****************
|
||||
314 | 1 Unidrive4.asm 295 | Comment | 11 | | 0 | 00/8107 | *
|
||||
315 | 1 Unidrive4.asm 296 | Directive | 11 | | 0 | 00/8107 | org $0500 ; Start Unidisk program address
|
||||
316 | 1 Unidrive4.asm 297 | Empty | 11 | | 0 | 00/0500 |
|
||||
317 | 1 Unidrive4.asm 298 | Equivalence | 11 | | 0 | 00/0500 | SIGN EQU $C0 ;$EB ; $F3
|
||||
116 | 1 Unidrive4.asm 113 | Comment | 11 | | 0 | 00/8065 | * lda #01 ;First time
|
||||
117 | 1 Unidrive4.asm 114 | Comment | 11 | | 0 | 00/8065 | * sta UNIAcc_reg
|
||||
118 | 1 Unidrive4.asm 115 | Comment | 11 | | 0 | 00/8065 | * The program begin to PC preset to $0500 *
|
||||
119 | 1 Unidrive4.asm 116 | Comment | 11 | | 0 | 00/8065 | *
|
||||
120 | 1 Unidrive4.asm 117 | Comment | 11 | | 0 | 00/8065 | ** Execute **
|
||||
121 | 1 Unidrive4.asm 118 | Code | 11 | | 3 | 00/8065 : 20 CE 80 | jsr {ozunid_9}
|
||||
122 | 1 Unidrive4.asm 119 | Data | 11 | | 1 | 00/8068 : 04 | dfb {4}
|
||||
123 | 1 Unidrive4.asm 120 | Data | 11 | | 2 | 00/8069 : E8 80 | dw {ozunid_14}
|
||||
124 | 1 Unidrive4.asm 121 | Comment | 11 | | 0 | 00/806B | ** Read **
|
||||
125 | 1 Unidrive4.asm 122 | Code | 11 | | 3 | 00/806B : 20 CE 80 | READ jsr {ozunid_9}
|
||||
126 | 1 Unidrive4.asm 123 | Data | 11 | | 1 | 00/806E : 00 | dfb {0}
|
||||
127 | 1 Unidrive4.asm 124 | Data | 11 | | 2 | 00/806F : D1 80 | dw {ozunid_10}
|
||||
128 | 1 Unidrive4.asm 125 | Code | 11 | | 2 | 00/8071 : B0 A2 | bcs {ozunid_1}
|
||||
129 | 1 Unidrive4.asm 126 | Comment | 11 | | 0 | 00/8073 | *
|
||||
130 | 1 Unidrive4.asm 127 | Comment | 11 | | 0 | 00/8073 | **** Store Output results in //c ****
|
||||
131 | 1 Unidrive4.asm 128 | Empty | 11 | | 0 | 00/8073 |
|
||||
132 | 1 Unidrive4.asm 129 | Comment | 11 | | 0 | 00/8073 | * First time execute *
|
||||
133 | 1 Unidrive4.asm 130 | Code | 11 | | 3 | 00/8073 : AD D9 80 | lda UNIAcc_reg
|
||||
134 | 1 Unidrive4.asm 131 | Code | 11 | | 2 | 00/8076 : 85 FA | sta {$FA}
|
||||
135 | 1 Unidrive4.asm 132 | Code | 11 | | 3 | 00/8078 : AD DA 80 | lda UNIX_reg
|
||||
136 | 1 Unidrive4.asm 133 | Code | 11 | | 2 | 00/807B : 85 FB | sta {$FA}+1 ; Store the result
|
||||
137 | 1 Unidrive4.asm 134 | Code | 11 | | 3 | 00/807D : AD DB 80 | lda UNIY_reg
|
||||
138 | 1 Unidrive4.asm 135 | Code | 11 | | 2 | 00/8080 : 85 FC | sta {$FA}+2
|
||||
139 | 1 Unidrive4.asm 136 | Empty | 11 | | 0 | 00/8082 |
|
||||
140 | 1 Unidrive4.asm 137 | Comment | 11 | | 0 | 00/8082 | ** Second time execute **
|
||||
141 | 1 Unidrive4.asm 138 | Code | 11 | | 2 | 00/8082 : A9 3C | lda #$3C ; Target the secont time entry point
|
||||
142 | 1 Unidrive4.asm 139 | Code | 11 | | 3 | 00/8084 : 8D FA 80 | sta LowPC_reg ; Second time set new value of PC
|
||||
143 | 1 Unidrive4.asm 140 | Comment | 11 | | 0 | 00/8087 | ** Execute **
|
||||
144 | 1 Unidrive4.asm 141 | Code | 11 | | 3 | 00/8087 : 20 CE 80 | jsr {ozunid_9}
|
||||
145 | 1 Unidrive4.asm 142 | Data | 11 | | 1 | 00/808A : 04 | dfb {4}
|
||||
146 | 1 Unidrive4.asm 143 | Data | 11 | | 2 | 00/808B : E8 80 | dw {ozunid_14}
|
||||
147 | 1 Unidrive4.asm 144 | Comment | 11 | | 0 | 00/808D | ** Read **
|
||||
148 | 1 Unidrive4.asm 145 | Code | 11 | | 3 | 00/808D : 20 CE 80 | jsr {ozunid_9}
|
||||
149 | 1 Unidrive4.asm 146 | Data | 11 | | 1 | 00/8090 : 00 | dfb {0}
|
||||
150 | 1 Unidrive4.asm 147 | Data | 11 | | 2 | 00/8091 : D1 80 | dw {ozunid_10}
|
||||
151 | 1 Unidrive4.asm 148 | Comment | 11 | | 0 | 00/8093 | * bcs Error
|
||||
152 | 1 Unidrive4.asm 149 | Empty | 11 | | 0 | 00/8093 |
|
||||
153 | 1 Unidrive4.asm 150 | Comment | 11 | | 0 | 00/8093 | * Second time execute only to read the latest Byte of FP1*
|
||||
154 | 1 Unidrive4.asm 151 | Code | 11 | | 3 | 00/8093 : AD D9 80 | lda UNIAcc_reg
|
||||
155 | 1 Unidrive4.asm 152 | Code | 11 | | 2 | 00/8096 : 85 FD | sta {$FA}+3
|
||||
156 | 1 Unidrive4.asm 153 | Comment | 11 | | 0 | 00/8098 | *
|
||||
157 | 1 Unidrive4.asm 154 | Code | 11 | | 1 | 00/8098 : 60 | rts
|
||||
158 | 1 Unidrive4.asm 155 | Empty | 11 | | 0 | 00/8099 |
|
||||
159 | 1 Unidrive4.asm 156 | Comment | 11 | | 0 | 00/8099 | ******************************************************
|
||||
160 | 1 Unidrive4.asm 157 | Empty | 11 | | 0 | 00/8099 | ozunid_4
|
||||
161 | 1 Unidrive4.asm 157 | Equivalence | 11 | | 0 | 00/8099 | FindPC equ ozunid_4
|
||||
162 | 1 Unidrive4.asm 158 | Comment | 11 | | 0 | 00/8099 | *
|
||||
163 | 1 Unidrive4.asm 159 | Comment | 11 | | 0 | 00/8099 | * Search slot 7 to slot 1 looking for signature bytes
|
||||
164 | 1 Unidrive4.asm 160 | Comment | 11 | | 0 | 00/8099 | *
|
||||
165 | 1 Unidrive4.asm 161 | Code | 11 | | 2 | 00/8099 : A2 07 | ldx #7 ;Do for seven slots
|
||||
166 | 1 Unidrive4.asm 162 | Code | 11 | | 2 | 00/809B : A9 C7 | lda #$C7
|
||||
167 | 1 Unidrive4.asm 163 | Code | 11 | | 2 | 00/809D : 85 07 | sta {$0007}
|
||||
168 | 1 Unidrive4.asm 164 | Code | 11 | | 2 | 00/809F : A9 00 | lda #$00
|
||||
169 | 1 Unidrive4.asm 165 | Code | 11 | | 2 | 00/80A1 : 85 06 | sta {$0006}
|
||||
170 | 1 Unidrive4.asm 166 | Comment | 11 | | 0 | 00/80A3 | *
|
||||
171 | 1 Unidrive4.asm 167 | Empty | 11 | | 0 | 00/80A3 | ozunid_5
|
||||
172 | 1 Unidrive4.asm 167 | Equivalence | 11 | | 0 | 00/80A3 | newslot equ ozunid_5
|
||||
173 | 1 Unidrive4.asm 168 | Code | 11 | | 2 | 00/80A3 : A0 07 | ldy #7
|
||||
174 | 1 Unidrive4.asm 169 | Comment | 11 | | 0 | 00/80A5 | *
|
||||
175 | 1 Unidrive4.asm 170 | Empty | 11 | | 0 | 00/80A5 | ozunid_6
|
||||
176 | 1 Unidrive4.asm 170 | Equivalence | 11 | | 0 | 00/80A5 | again equ ozunid_6
|
||||
177 | 1 Unidrive4.asm 171 | Code | 11 | | 2 | 00/80A5 : B1 06 | lda ({$0006}),y
|
||||
178 | 1 Unidrive4.asm 172 | Code | 11 | | 3 | 00/80A7 : D9 C6 80 | cmp sigtab,y ;One for byte signature
|
||||
179 | 1 Unidrive4.asm 173 | Code | 11 | | 2 | 00/80AA : F0 07 | beq {ozunid_7} ;Found one signature byte
|
||||
180 | 1 Unidrive4.asm 174 | Code | 11 | | 2 | 00/80AC : C6 07 | dec {$0007}
|
||||
181 | 1 Unidrive4.asm 175 | Code | 11 | | 1 | 00/80AE : CA | dex
|
||||
182 | 1 Unidrive4.asm 176 | Code | 11 | | 2 | 00/80AF : D0 F2 | bne {ozunid_5}
|
||||
183 | 1 Unidrive4.asm 177 | Comment | 11 | | 0 | 00/80B1 | *
|
||||
184 | 1 Unidrive4.asm 178 | Comment | 11 | | 0 | 00/80B1 | * if we get here, no PC find
|
||||
185 | 1 Unidrive4.asm 179 | Code | 11 | | 1 | 00/80B1 : 38 | sec
|
||||
186 | 1 Unidrive4.asm 180 | Code | 11 | | 1 | 00/80B2 : 60 | rts
|
||||
187 | 1 Unidrive4.asm 181 | Comment | 11 | | 0 | 00/80B3 | *
|
||||
188 | 1 Unidrive4.asm 182 | Comment | 11 | | 0 | 00/80B3 | * if we get here, no byte find on PC
|
||||
189 | 1 Unidrive4.asm 183 | Empty | 11 | | 0 | 00/80B3 | ozunid_7
|
||||
190 | 1 Unidrive4.asm 183 | Equivalence | 11 | | 0 | 00/80B3 | maybe equ ozunid_7
|
||||
191 | 1 Unidrive4.asm 184 | Code | 11 | | 1 | 00/80B3 : 88 | dey
|
||||
192 | 1 Unidrive4.asm 185 | Code | 11 | | 1 | 00/80B4 : 88 | dey ;if N=1 then all sig bytes OK
|
||||
193 | 1 Unidrive4.asm 186 | Code | 11 | | 2 | 00/80B5 : 10 EE | bpl {ozunid_6}
|
||||
194 | 1 Unidrive4.asm 187 | Comment | 11 | | 0 | 00/80B7 | * Found PC interface. Set up call address.
|
||||
195 | 1 Unidrive4.asm 188 | Comment | 11 | | 0 | 00/80B7 | * we already have high byte ($CN), we need low byte
|
||||
196 | 1 Unidrive4.asm 189 | Comment | 11 | | 0 | 00/80B7 | *
|
||||
197 | 1 Unidrive4.asm 190 | Empty | 11 | | 0 | 00/80B7 | ozunid_8
|
||||
198 | 1 Unidrive4.asm 190 | Equivalence | 11 | | 0 | 00/80B7 | foundPC equ ozunid_8
|
||||
199 | 1 Unidrive4.asm 191 | Code | 11 | | 2 | 00/80B7 : A9 FF | lda #$FF
|
||||
200 | 1 Unidrive4.asm 192 | Code | 11 | | 2 | 00/80B9 : 85 06 | sta {$0006}
|
||||
201 | 1 Unidrive4.asm 193 | Code | 11 | | 2 | 00/80BB : A0 00 | ldy #0 ;For indirect load
|
||||
202 | 1 Unidrive4.asm 194 | Code | 11 | | 2 | 00/80BD : B1 06 | lda ({$0006}),y ;Get the byte
|
||||
203 | 1 Unidrive4.asm 195 | Comment | 11 | | 0 | 00/80BF | *
|
||||
204 | 1 Unidrive4.asm 196 | Comment | 11 | | 0 | 00/80BF | * Now the Acc has the low oreder ProDOS entry point.
|
||||
205 | 1 Unidrive4.asm 197 | Comment | 11 | | 0 | 00/80BF | * The PC entry is three locations past this ...
|
||||
206 | 1 Unidrive4.asm 198 | Comment | 11 | | 0 | 00/80BF | *
|
||||
207 | 1 Unidrive4.asm 199 | Code | 11 | | 1 | 00/80BF : 18 | clc
|
||||
208 | 1 Unidrive4.asm 200 | Code | 11 | | 2 | 00/80C0 : 69 03 | adc #3
|
||||
209 | 1 Unidrive4.asm 201 | Code | 11 | | 2 | 00/80C2 : 85 06 | sta {$0006}
|
||||
210 | 1 Unidrive4.asm 202 | Comment | 11 | | 0 | 00/80C4 | *
|
||||
211 | 1 Unidrive4.asm 203 | Comment | 11 | | 0 | 00/80C4 | * Now ZPTempL has PC entry point.
|
||||
212 | 1 Unidrive4.asm 204 | Comment | 11 | | 0 | 00/80C4 | * Return with carry clear.
|
||||
213 | 1 Unidrive4.asm 205 | Comment | 11 | | 0 | 00/80C4 | *
|
||||
214 | 1 Unidrive4.asm 206 | Code | 11 | | 1 | 00/80C4 : 18 | clc
|
||||
215 | 1 Unidrive4.asm 207 | Code | 11 | | 1 | 00/80C5 : 60 | rts
|
||||
216 | 1 Unidrive4.asm 208 | Comment | 11 | | 0 | 00/80C6 | ***********************************************************
|
||||
217 | 1 Unidrive4.asm 209 | Comment | 11 | | 0 | 00/80C6 | *
|
||||
218 | 1 Unidrive4.asm 210 | Comment | 11 | | 0 | 00/80C6 | * There are the PC signature bytes in their relative order.
|
||||
219 | 1 Unidrive4.asm 211 | Comment | 11 | | 0 | 00/80C6 | * The $FF bytes are filler bytes and are not compared.
|
||||
220 | 1 Unidrive4.asm 212 | Comment | 11 | | 0 | 00/80C6 | *
|
||||
221 | 1 Unidrive4.asm 213 | Data | 11 | | 4 | 00/80C6 : FF 20 FF 00 | sigtab dfb $FF,$20,$FF,$00
|
||||
222 | 1 Unidrive4.asm 214 | Data | 11 | | 4 | 00/80CA : FF 03 FF 00 | dfb $FF,$03,$FF,$00
|
||||
223 | 1 Unidrive4.asm 215 | Comment | 11 | | 0 | 00/80CE | *
|
||||
224 | 1 Unidrive4.asm 216 | Empty | 11 | | 0 | 00/80CE | ozunid_9
|
||||
225 | 1 Unidrive4.asm 216 | Equivalence | 11 | | 0 | 00/80CE | Dispatch equ ozunid_9
|
||||
226 | 1 Unidrive4.asm 217 | Code | 11 | | 3 | 00/80CE : 6C 06 00 | jmp ({$0006}) ;Simulate an indirect JSR to PC
|
||||
227 | 1 Unidrive4.asm 218 | Comment | 11 | | 0 | 00/80D1 | *
|
||||
228 | 1 Unidrive4.asm 219 | Comment | 11 | | 0 | 00/80D1 | *** Status Parameter Set for UNI ***
|
||||
229 | 1 Unidrive4.asm 220 | Empty | 11 | | 0 | 00/80D1 | ozunid_10
|
||||
230 | 1 Unidrive4.asm 220 | Equivalence | 11 | | 0 | 00/80D1 | DParms equ ozunid_10
|
||||
231 | 1 Unidrive4.asm 221 | Data | 11 | | 1 | 00/80D1 : 03 | DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
232 | 1 Unidrive4.asm 222 | Data | 11 | | 1 | 00/80D2 : 01 | DPUnit dfb 1
|
||||
233 | 1 Unidrive4.asm 223 | Data | 11 | | 2 | 00/80D3 : D6 80 | DPBuffer dw {ozunid_11}
|
||||
234 | 1 Unidrive4.asm 224 | Data | 11 | | 1 | 00/80D5 : 05 | DPStatCode dfb {5}
|
||||
235 | 1 Unidrive4.asm 225 | Comment | 11 | | 0 | 00/80D6 | *
|
||||
236 | 1 Unidrive4.asm 226 | Comment | 11 | | 0 | 00/80D6 | *
|
||||
237 | 1 Unidrive4.asm 227 | Comment | 11 | | 0 | 00/80D6 | *
|
||||
238 | 1 Unidrive4.asm 228 | Comment | 11 | | 0 | 00/80D6 | *** Status List UNI ***
|
||||
239 | 1 Unidrive4.asm 229 | Empty | 11 | | 0 | 00/80D6 | ozunid_11
|
||||
240 | 1 Unidrive4.asm 229 | Equivalence | 11 | | 0 | 00/80D6 | UNI equ ozunid_11
|
||||
241 | 1 Unidrive4.asm 230 | Data | 11 | | 1 | 00/80D6 : 00 | dfb 0
|
||||
242 | 1 Unidrive4.asm 231 | Data | 11 | | 1 | 00/80D7 : 00 | UNIError dfb 0
|
||||
243 | 1 Unidrive4.asm 232 | Data | 11 | | 1 | 00/80D8 : 00 | UNIRetries dfb 0
|
||||
244 | 1 Unidrive4.asm 233 | Data | 11 | | 1 | 00/80D9 : 00 | UNIAcc_reg dfb 0
|
||||
245 | 1 Unidrive4.asm 234 | Data | 11 | | 1 | 00/80DA : 00 | UNIX_reg dfb 0
|
||||
246 | 1 Unidrive4.asm 235 | Data | 11 | | 1 | 00/80DB : 00 | UNIY_reg dfb 0
|
||||
247 | 1 Unidrive4.asm 236 | Data | 11 | | 1 | 00/80DC : 00 | UNIP_val dfb 0
|
||||
248 | 1 Unidrive4.asm 237 | Data | 11 | | 1 | 00/80DD : 00 | HHH dfb 0
|
||||
249 | 1 Unidrive4.asm 238 | Comment | 11 | | 0 | 00/80DE | *
|
||||
250 | 1 Unidrive4.asm 239 | Comment | 11 | | 0 | 00/80DE | *** Set Address ***
|
||||
251 | 1 Unidrive4.asm 240 | Empty | 11 | | 0 | 00/80DE | ozunid_12
|
||||
252 | 1 Unidrive4.asm 240 | Equivalence | 11 | | 0 | 00/80DE | SET_ADD equ ozunid_12
|
||||
253 | 1 Unidrive4.asm 241 | Data | 11 | | 1 | 00/80DE : 03 | dfb 3
|
||||
254 | 1 Unidrive4.asm 242 | Data | 11 | | 1 | 00/80DF : 01 | dfb 1
|
||||
255 | 1 Unidrive4.asm 243 | Data | 11 | | 2 | 00/80E0 : FC 80 | dw {ozunid_18}
|
||||
256 | 1 Unidrive4.asm 244 | Data | 11 | | 1 | 00/80E2 : 06 | dfb {6}
|
||||
257 | 1 Unidrive4.asm 245 | Comment | 11 | | 0 | 00/80E3 | *
|
||||
258 | 1 Unidrive4.asm 246 | Comment | 11 | | 0 | 00/80E3 | *** Download ***
|
||||
259 | 1 Unidrive4.asm 247 | Empty | 11 | | 0 | 00/80E3 | ozunid_13
|
||||
260 | 1 Unidrive4.asm 247 | Equivalence | 11 | | 0 | 00/80E3 | DOWNLOAD equ ozunid_13
|
||||
261 | 1 Unidrive4.asm 248 | Data | 11 | | 1 | 00/80E3 : 03 | dfb 3
|
||||
262 | 1 Unidrive4.asm 249 | Data | 11 | | 1 | 00/80E4 : 01 | dfb 1
|
||||
263 | 1 Unidrive4.asm 250 | Data | 11 | | 2 | 00/80E5 : 00 81 | dw {ozunid_19}
|
||||
264 | 1 Unidrive4.asm 251 | Data | 11 | | 1 | 00/80E7 : 07 | dfb {7}
|
||||
265 | 1 Unidrive4.asm 252 | Comment | 11 | | 0 | 00/80E8 | *
|
||||
266 | 1 Unidrive4.asm 253 | Comment | 11 | | 0 | 00/80E8 | *** Execute ***
|
||||
267 | 1 Unidrive4.asm 254 | Empty | 11 | | 0 | 00/80E8 | ozunid_14
|
||||
268 | 1 Unidrive4.asm 254 | Equivalence | 11 | | 0 | 00/80E8 | EXE equ ozunid_14
|
||||
269 | 1 Unidrive4.asm 255 | Data | 11 | | 1 | 00/80E8 : 03 | dfb 3
|
||||
270 | 1 Unidrive4.asm 256 | Data | 11 | | 1 | 00/80E9 : 01 | dfb 1
|
||||
271 | 1 Unidrive4.asm 257 | Data | 11 | | 2 | 00/80EA : F4 80 | dw {ozunid_17}
|
||||
272 | 1 Unidrive4.asm 258 | Data | 11 | | 1 | 00/80EC : 05 | dfb {5}
|
||||
273 | 1 Unidrive4.asm 259 | Comment | 11 | | 0 | 00/80ED | *** Eject ***
|
||||
274 | 1 Unidrive4.asm 260 | Empty | 11 | | 0 | 00/80ED | ozunid_15
|
||||
275 | 1 Unidrive4.asm 260 | Equivalence | 11 | | 0 | 00/80ED | E_JECT equ ozunid_15
|
||||
276 | 1 Unidrive4.asm 261 | Data | 11 | | 1 | 00/80ED : 03 | dfb 3
|
||||
277 | 1 Unidrive4.asm 262 | Data | 11 | | 1 | 00/80EE : 01 | dfb 1
|
||||
278 | 1 Unidrive4.asm 263 | Data | 11 | | 2 | 00/80EF : F2 80 | dw {ozunid_16}
|
||||
279 | 1 Unidrive4.asm 264 | Data | 11 | | 1 | 00/80F1 : 04 | dfb {4}
|
||||
280 | 1 Unidrive4.asm 265 | Comment | 11 | | 0 | 00/80F2 | *
|
||||
281 | 1 Unidrive4.asm 266 | Comment | 11 | | 0 | 00/80F2 | ******** CONTROL LISTS ********
|
||||
282 | 1 Unidrive4.asm 267 | Comment | 11 | | 0 | 00/80F2 | *
|
||||
283 | 1 Unidrive4.asm 268 | Comment | 11 | | 0 | 00/80F2 | *
|
||||
284 | 1 Unidrive4.asm 269 | Comment | 11 | | 0 | 00/80F2 | *** Eject ***
|
||||
285 | 1 Unidrive4.asm 270 | Empty | 11 | | 0 | 00/80F2 | ozunid_16
|
||||
286 | 1 Unidrive4.asm 270 | Equivalence | 11 | | 0 | 00/80F2 | CNTL_LIST1 equ ozunid_16
|
||||
287 | 1 Unidrive4.asm 271 | Data | 11 | | 2 | 00/80F2 : 00 00 | dw $0000
|
||||
288 | 1 Unidrive4.asm 272 | Comment | 11 | | 0 | 00/80F4 | *
|
||||
289 | 1 Unidrive4.asm 273 | Comment | 11 | | 0 | 00/80F4 | *** Execute ***
|
||||
290 | 1 Unidrive4.asm 274 | Empty | 11 | | 0 | 00/80F4 | ozunid_17
|
||||
291 | 1 Unidrive4.asm 274 | Equivalence | 11 | | 0 | 00/80F4 | CNTL_LIST2 equ ozunid_17
|
||||
292 | 1 Unidrive4.asm 275 | Data | 11 | | 1 | 00/80F4 : 06 | Clow_byte dfb $06
|
||||
293 | 1 Unidrive4.asm 276 | Data | 11 | | 1 | 00/80F5 : 00 | Chigh_byte dfb $00
|
||||
294 | 1 Unidrive4.asm 277 | Data | 11 | | 1 | 00/80F6 : 00 | AccValue dfb $00 ; Init Value Unidisk Accumulator Register
|
||||
295 | 1 Unidrive4.asm 278 | Data | 11 | | 1 | 00/80F7 : 00 | X_reg dfb $00 ; Init Value Unidisk X Register
|
||||
296 | 1 Unidrive4.asm 279 | Data | 11 | | 1 | 00/80F8 : 00 | Y_reg dfb $00 ; Init Value Unidisk Y Register
|
||||
297 | 1 Unidrive4.asm 280 | Data | 11 | | 1 | 00/80F9 : 00 | ProStatus dfb $00 ; Init Value Unidisk Status Register
|
||||
298 | 1 Unidrive4.asm 281 | Data | 11 | | 1 | 00/80FA : 00 | LowPC_reg dfb $00 ; Init Value Unidisk Program Counter $0500 at eny dowload
|
||||
299 | 1 Unidrive4.asm 282 | Data | 11 | | 1 | 00/80FB : 05 | HighPC_reg dfb $05 ; $05 first execution, $3C second execution
|
||||
300 | 1 Unidrive4.asm 283 | Comment | 11 | | 0 | 00/80FC | *
|
||||
301 | 1 Unidrive4.asm 284 | Comment | 11 | | 0 | 00/80FC | *** Set Address ***
|
||||
302 | 1 Unidrive4.asm 285 | Empty | 11 | | 0 | 00/80FC | ozunid_18
|
||||
303 | 1 Unidrive4.asm 285 | Equivalence | 11 | | 0 | 00/80FC | CNTL_LIST3 equ ozunid_18
|
||||
304 | 1 Unidrive4.asm 286 | Data | 11 | | 1 | 00/80FC : 02 | CountL_byte dfb $02
|
||||
305 | 1 Unidrive4.asm 287 | Data | 11 | | 1 | 00/80FD : 00 | CountH_byte dfb $00
|
||||
306 | 1 Unidrive4.asm 288 | Data | 11 | | 1 | 00/80FE : 00 | LByte_Addr dfb $00 ; ORG of Unidisk program, set begin program address $0500
|
||||
307 | 1 Unidrive4.asm 289 | Data | 11 | | 1 | 00/80FF : 05 | HByte_Addr dfb $05
|
||||
308 | 1 Unidrive4.asm 290 | Comment | 11 | | 0 | 00/8100 | *
|
||||
309 | 1 Unidrive4.asm 291 | Comment | 11 | | 0 | 00/8100 | *** Download ***
|
||||
310 | 1 Unidrive4.asm 292 | Empty | 11 | | 0 | 00/8100 | ozunid_19
|
||||
311 | 1 Unidrive4.asm 292 | Equivalence | 11 | | 0 | 00/8100 | CNTL_LIST4 equ ozunid_19
|
||||
312 | 1 Unidrive4.asm 293 | Data | 11 | | 1 | 00/8100 : 34 | LenghtL_byte dfb $34 ;<----- Lenght of Unidisk program Lo - Byte 312 byte
|
||||
313 | 1 Unidrive4.asm 294 | Data | 11 | | 1 | 00/8101 : 01 | LenghtH_byte dfb $01 ;<----- Lenght of Unidisk program Hi Byte
|
||||
314 | 1 Unidrive4.asm 295 | Comment | 11 | | 0 | 00/8102 | *
|
||||
315 | 1 Unidrive4.asm 296 | Comment | 11 | | 0 | 00/8102 | **************** Start UNIDISK Program ****************
|
||||
316 | 1 Unidrive4.asm 297 | Comment | 11 | | 0 | 00/8102 | *
|
||||
317 | 1 Unidrive4.asm 298 | Directive | 11 | | 0 | 00/8102 | org $0500 ; Start Unidisk program address
|
||||
318 | 1 Unidrive4.asm 299 | Empty | 11 | | 0 | 00/0500 |
|
||||
319 | 1 Unidrive4.asm 300 | Comment | 11 | | 0 | 00/0500 | ** FP2 4 Bytes **
|
||||
320 | 1 Unidrive4.asm 301 | Equivalence | 11 | | 0 | 00/0500 | X2 EQU $C1 ;$EC ; $F4
|
||||
321 | 1 Unidrive4.asm 302 | Equivalence | 11 | | 0 | 00/0500 | M2 EQU $C2 ;$ED ; $F5 - $F7
|
||||
322 | 1 Unidrive4.asm 303 | Empty | 11 | | 0 | 00/0500 |
|
||||
323 | 1 Unidrive4.asm 304 | Comment | 11 | | 0 | 00/0500 | ** FP1 4 Bytes + E extension **
|
||||
324 | 1 Unidrive4.asm 305 | Equivalence | 11 | | 0 | 00/0500 | X1 EQU $C5 ;$FA ; $F8
|
||||
325 | 1 Unidrive4.asm 306 | Equivalence | 11 | | 0 | 00/0500 | M1 EQU $C6 ;$FB ; $F9 - $FB
|
||||
326 | 1 Unidrive4.asm 307 | Equivalence | 11 | | 0 | 00/0500 | E EQU $C9 ;$FE ; $FC
|
||||
327 | 1 Unidrive4.asm 308 | Empty | 11 | | 0 | 00/0500 |
|
||||
328 | 1 Unidrive4.asm 309 | Equivalence | 11 | | 0 | 00/0500 | OVLOC EQU $C10 ;$3F5 ;Overflow routine is not implemented at now)
|
||||
329 | 1 Unidrive4.asm 310 | Comment | 11 | | 0 | 00/0500 | *
|
||||
330 | 1 Unidrive4.asm 311 | Comment | 11 | | 0 | 00/0500 | ** Main program **
|
||||
331 | 1 Unidrive4.asm 312 | Comment | 11 | | 0 | 00/0500 | *
|
||||
332 | 1 Unidrive4.asm 313 | Comment | 11 | | 0 | 00/0500 | * CHK if is the second execution *
|
||||
333 | 1 Unidrive4.asm 314 | Empty | 11 | | 0 | 00/0500 |
|
||||
334 | 1 Unidrive4.asm 315 | Code | 11 | | 2 | 00/0500 : C9 02 | cmp #02
|
||||
335 | 1 Unidrive4.asm 316 | Code | 11 | | 2 | 00/0502 : F0 32 | beq SECOND ;Only to read the rest part of result
|
||||
336 | 1 Unidrive4.asm 317 | Empty | 11 | | 0 | 00/0504 |
|
||||
337 | 1 Unidrive4.asm 318 | Comment | 11 | | 0 | 00/0504 | ** Input data to Zero Page **
|
||||
338 | 1 Unidrive4.asm 319 | Empty | 11 | | 0 | 00/0504 |
|
||||
339 | 1 Unidrive4.asm 320 | Comment | 11 | | 0 | 00/0504 | ** FP1 **
|
||||
340 | 1 Unidrive4.asm 321 | Code | 11 | | 3 | 00/0504 : AD 31 06 | lda FP1
|
||||
341 | 1 Unidrive4.asm 322 | Code | 11 | | 2 | 00/0507 : 85 C5 | sta {$C5}
|
||||
342 | 1 Unidrive4.asm 323 | Empty | 11 | | 0 | 00/0509 |
|
||||
343 | 1 Unidrive4.asm 324 | Code | 11 | | 3 | 00/0509 : AD 32 06 | lda FP1+1
|
||||
344 | 1 Unidrive4.asm 325 | Code | 11 | | 2 | 00/050C : 85 C6 | sta {$C6}
|
||||
345 | 1 Unidrive4.asm 326 | Code | 11 | | 3 | 00/050E : AD 33 06 | lda FP1+2
|
||||
346 | 1 Unidrive4.asm 327 | Code | 11 | | 2 | 00/0511 : 85 C7 | sta {$C6}+1
|
||||
347 | 1 Unidrive4.asm 328 | Code | 11 | | 3 | 00/0513 : AD 34 06 | lda FP1+3
|
||||
348 | 1 Unidrive4.asm 329 | Code | 11 | | 2 | 00/0516 : 85 C8 | sta {$C6}+2
|
||||
349 | 1 Unidrive4.asm 330 | Empty | 11 | | 0 | 00/0518 |
|
||||
350 | 1 Unidrive4.asm 331 | Comment | 11 | | 0 | 00/0518 | ** FP2 **
|
||||
351 | 1 Unidrive4.asm 332 | Code | 11 | | 3 | 00/0518 : AD 35 06 | lda FP2
|
||||
352 | 1 Unidrive4.asm 333 | Code | 11 | | 2 | 00/051B : 85 C1 | sta {$C1}
|
||||
353 | 1 Unidrive4.asm 334 | Empty | 11 | | 0 | 00/051D |
|
||||
354 | 1 Unidrive4.asm 335 | Code | 11 | | 3 | 00/051D : AD 36 06 | lda FP2+1
|
||||
355 | 1 Unidrive4.asm 336 | Code | 11 | | 2 | 00/0520 : 85 C2 | sta {$C2}
|
||||
356 | 1 Unidrive4.asm 337 | Code | 11 | | 3 | 00/0522 : AD 37 06 | lda FP2+2
|
||||
357 | 1 Unidrive4.asm 338 | Code | 11 | | 2 | 00/0525 : 85 C3 | sta {$C2}+1
|
||||
358 | 1 Unidrive4.asm 339 | Code | 11 | | 3 | 00/0527 : AD 38 06 | lda FP2+3
|
||||
359 | 1 Unidrive4.asm 340 | Code | 11 | | 2 | 00/052A : 85 C4 | sta {$C2}+2
|
||||
360 | 1 Unidrive4.asm 341 | Empty | 11 | | 0 | 00/052C |
|
||||
361 | 1 Unidrive4.asm 342 | Comment | 11 | | 0 | 00/052C | ************************** Target Function ***********************
|
||||
362 | 1 Unidrive4.asm 343 | Comment | 11 | | 0 | 00/052C | * Y=N1+N2 *
|
||||
363 | 1 Unidrive4.asm 344 | Comment | 11 | | 0 | 00/052C | ******************************************************************
|
||||
364 | 1 Unidrive4.asm 345 | Comment | 11 | | 0 | 00/052C | *
|
||||
365 | 1 Unidrive4.asm 346 | Comment | 11 | | 0 | 00/052C | ** Simple ADD **
|
||||
366 | 1 Unidrive4.asm 347 | Code | 11 | | 3 | 00/052C : 20 82 05 | jsr FADD ; Call FP routine
|
||||
367 | 1 Unidrive4.asm 348 | Empty | 11 | | 0 | 00/052F |
|
||||
368 | 1 Unidrive4.asm 349 | Comment | 11 | | 0 | 00/052F | *** Output Data result FP1 to Unidisk registers First Time first 3 Byte out ***
|
||||
369 | 1 Unidrive4.asm 350 | Code | 11 | | 2 | 00/052F : A5 C5 | lda {$C5}
|
||||
370 | 1 Unidrive4.asm 351 | Code | 11 | | 2 | 00/0531 : A6 C6 | ldx {$C6}
|
||||
371 | 1 Unidrive4.asm 352 | Code | 11 | | 2 | 00/0533 : A4 C7 | ldy {$C6}+1
|
||||
372 | 1 Unidrive4.asm 353 | Empty | 11 | | 0 | 00/0535 |
|
||||
373 | 1 Unidrive4.asm 354 | Code | 11 | | 1 | 00/0535 : 60 | rts
|
||||
374 | 1 Unidrive4.asm 355 | Comment | 11 | | 0 | 00/0536 | *** Output Data result FP1 to Unidisk registers Second Time latest 1 Byte out ***
|
||||
375 | 1 Unidrive4.asm 356 | Code | 11 | | 2 | 00/0536 : A5 C8 | SECOND lda {$C6}+2
|
||||
376 | 1 Unidrive4.asm 357 | Empty | 11 | | 0 | 00/0538 |
|
||||
377 | 1 Unidrive4.asm 358 | Code | 11 | | 1 | 00/0538 : 60 | rts
|
||||
378 | 1 Unidrive4.asm 359 | Comment | 11 | | 0 | 00/0539 | ***************************************************
|
||||
379 | 1 Unidrive4.asm 360 | Comment | 11 | | 0 | 00/0539 | *
|
||||
380 | 1 Unidrive4.asm 361 | Comment | 11 | | 0 | 00/0539 | ***************** FP Routine *****************
|
||||
381 | 1 Unidrive4.asm 362 | Comment | 11 | | 0 | 00/0539 | *
|
||||
382 | 1 Unidrive4.asm 363 | Comment | 11 | | 0 | 00/0539 | ***********************
|
||||
383 | 1 Unidrive4.asm 364 | Comment | 11 | | 0 | 00/0539 | * *
|
||||
384 | 1 Unidrive4.asm 365 | Comment | 11 | | 0 | 00/0539 | * APPLE-II FLOATING *
|
||||
385 | 1 Unidrive4.asm 366 | Comment | 11 | | 0 | 00/0539 | * POINT ROUTINES *
|
||||
386 | 1 Unidrive4.asm 367 | Comment | 11 | | 0 | 00/0539 | * *
|
||||
387 | 1 Unidrive4.asm 368 | Comment | 11 | | 0 | 00/0539 | * COPYRIGHT 1977 BY *
|
||||
388 | 1 Unidrive4.asm 369 | Comment | 11 | | 0 | 00/0539 | * APPLE COMPUTER INC. *
|
||||
389 | 1 Unidrive4.asm 370 | Comment | 11 | | 0 | 00/0539 | * *
|
||||
390 | 1 Unidrive4.asm 371 | Comment | 11 | | 0 | 00/0539 | * ALL RIGHTS RESERVED *
|
||||
391 | 1 Unidrive4.asm 372 | Comment | 11 | | 0 | 00/0539 | * *
|
||||
392 | 1 Unidrive4.asm 373 | Comment | 11 | | 0 | 00/0539 | * S. WOZNIAK *
|
||||
393 | 1 Unidrive4.asm 374 | Comment | 11 | | 0 | 00/0539 | * *
|
||||
394 | 1 Unidrive4.asm 375 | Comment | 11 | | 0 | 00/0539 | ***********************
|
||||
395 | 1 Unidrive4.asm 376 | Comment | 11 | | 0 | 00/0539 | * TITLE "FLOATING POINT ROUTINES for Unidisk memory"
|
||||
396 | 1 Unidrive4.asm 377 | Comment | 11 | | 0 | 00/0539 | *
|
||||
397 | 1 Unidrive4.asm 378 | Empty | 11 | | 0 | 00/0539 |
|
||||
398 | 1 Unidrive4.asm 379 | Comment | 11 | | 0 | 00/0539 | * ORG $300
|
||||
399 | 1 Unidrive4.asm 380 | Empty | 11 | | 0 | 00/0539 |
|
||||
400 | 1 Unidrive4.asm 381 | Code | 11 | | 1 | 00/0539 : 18 | ADD CLC ;CLEAR CARRY
|
||||
401 | 1 Unidrive4.asm 382 | Code | 11 | | 2 | 00/053A : A2 02 | LDX #$2 ;INDEX FOR 3-BYTE ADD.
|
||||
402 | 1 Unidrive4.asm 383 | Code | 11 | | 2 | 00/053C : B5 C6 | ADD1 LDA {$C6},X
|
||||
403 | 1 Unidrive4.asm 384 | Code | 11 | | 2 | 00/053E : 75 C2 | ADC {$C2},X ;ADD A BYTE OF MANT2 TO MANT1
|
||||
404 | 1 Unidrive4.asm 385 | Code | 11 | | 2 | 00/0540 : 95 C6 | STA {$C6},X
|
||||
405 | 1 Unidrive4.asm 386 | Code | 11 | | 1 | 00/0542 : CA | DEX ;INDEX TO NEXT MORE SIGNIF. BYTE.
|
||||
406 | 1 Unidrive4.asm 387 | Code | 11 | | 2 | 00/0543 : 10 F7 | BPL ADD1 ;LOOP UNTIL DONE.
|
||||
407 | 1 Unidrive4.asm 388 | Code | 11 | | 1 | 00/0545 : 60 | RTS ;RETURN
|
||||
408 | 1 Unidrive4.asm 389 | Code | 11 | | 2 | 00/0546 : 06 C0 | MD1 ASL {$C0} ;CLEAR LSB OF SIGN.
|
||||
409 | 1 Unidrive4.asm 390 | Code | 11 | | 3 | 00/0548 : 20 4B 05 | JSR ABSWAP ;ABS VAL OF M1, THEN SWAP WITH M2
|
||||
410 | 1 Unidrive4.asm 391 | Code | 11 | | 2 | 00/054B : 24 C6 | ABSWAP BIT {$C6} ;MANT1 NEGATIVE?
|
||||
411 | 1 Unidrive4.asm 392 | Code | 11 | | 2 | 00/054D : 10 05 | BPL ABSWAP1 ;NO, SWAP WITH MANT2 AND RETURN.
|
||||
412 | 1 Unidrive4.asm 393 | Code | 11 | | 3 | 00/054F : 20 B8 05 | JSR FCOMPL ;YES, COMPLEMENT IT.
|
||||
413 | 1 Unidrive4.asm 394 | Code | 11 | | 2 | 00/0552 : E6 C0 | INC {$C0} ;INCR SIGN, COMPLEMENTING LSB.
|
||||
414 | 1 Unidrive4.asm 395 | Code | 11 | | 1 | 00/0554 : 38 | ABSWAP1 SEC ;SET CARRY FOR RETURN TO MUL/DIV.
|
||||
415 | 1 Unidrive4.asm 396 | Code | 11 | | 2 | 00/0555 : A2 04 | SWAP LDX #$4 ;INDEX FOR 4 BYTE SWAP.
|
||||
416 | 1 Unidrive4.asm 397 | Code | 11 | | 2 | 00/0557 : 94 C8 | SWAP1 STY {$C9}-1,X
|
||||
417 | 1 Unidrive4.asm 398 | Code | 11 | | 2 | 00/0559 : B5 C4 | LDA {$C5}-1,X ;SWAP A BYTE OF EXP/MANT1 WITH
|
||||
418 | 1 Unidrive4.asm 399 | Code | 11 | | 2 | 00/055B : B4 C0 | LDY {$C1}-1,X ;EXP/MANT2 AND LEAVE A COPY OF
|
||||
419 | 1 Unidrive4.asm 400 | Code | 11 | | 2 | 00/055D : 94 C4 | STY {$C5}-1,X ;MANT1 IN E (3 BYTES). E+3 USED
|
||||
420 | 1 Unidrive4.asm 401 | Code | 11 | | 2 | 00/055F : 95 C0 | STA {$C1}-1,X
|
||||
421 | 1 Unidrive4.asm 402 | Code | 11 | | 1 | 00/0561 : CA | DEX ;ADVANCE INDEX TO NEXT BYTE
|
||||
422 | 1 Unidrive4.asm 403 | Code | 11 | | 2 | 00/0562 : D0 F3 | BNE SWAP1 ;LOOP UNTIL DONE.
|
||||
423 | 1 Unidrive4.asm 404 | Code | 11 | | 1 | 00/0564 : 60 | RTS ;RETURN
|
||||
424 | 1 Unidrive4.asm 405 | Code | 11 | | 2 | 00/0565 : A9 8E | FLOAT LDA #$8E ;INIT EXP1 TO 14, <--------------- int to fp
|
||||
425 | 1 Unidrive4.asm 406 | Code | 11 | | 2 | 00/0567 : 85 C5 | STA {$C5} ;THEN NORMALIZE TO FLOAT.
|
||||
426 | 1 Unidrive4.asm 407 | Code | 11 | | 2 | 00/0569 : A5 C6 | NORM1 LDA {$C6} ;HIGH-ORDER MANT1 BYTE.
|
||||
427 | 1 Unidrive4.asm 408 | Code | 11 | | 2 | 00/056B : C9 C0 | CMP #$C0 ;UPPER TWO BITS UNEQUAL?
|
||||
428 | 1 Unidrive4.asm 409 | Code | 11 | | 2 | 00/056D : 30 0C | BMI RTS1 ;YES, RETURN WITH MANT1 NORMALIZED
|
||||
429 | 1 Unidrive4.asm 410 | Code | 11 | | 2 | 00/056F : C6 C5 | DEC {$C5} ;DECREMENT EXP1.
|
||||
430 | 1 Unidrive4.asm 411 | Code | 11 | | 2 | 00/0571 : 06 C8 | ASL {$C6}+2
|
||||
431 | 1 Unidrive4.asm 412 | Code | 11 | | 2 | 00/0573 : 26 C7 | ROL {$C6}+1 ;SHIFT MANT1 (3 BYTES) LEFT.
|
||||
432 | 1 Unidrive4.asm 413 | Code | 11 | | 2 | 00/0575 : 26 C6 | ROL {$C6}
|
||||
433 | 1 Unidrive4.asm 414 | Code | 11 | | 2 | 00/0577 : A5 C5 | NORM LDA {$C5} ;EXP1 ZERO?
|
||||
434 | 1 Unidrive4.asm 415 | Code | 11 | | 2 | 00/0579 : D0 EE | BNE NORM1 ;NO, CONTINUE NORMALIZING.
|
||||
435 | 1 Unidrive4.asm 416 | Code | 11 | | 1 | 00/057B : 60 | RTS1 RTS ;RETURN.
|
||||
436 | 1 Unidrive4.asm 417 | Code | 11 | | 3 | 00/057C : 20 B8 05 | FSUB JSR FCOMPL ;CMPL MANT1,CLEARS CARRY UNLESS 0 <---- sub
|
||||
437 | 1 Unidrive4.asm 418 | Code | 11 | | 3 | 00/057F : 20 8F 05 | SWPALGN JSR ALGNSWP ;RIGHT SHIFT MANT1 OR SWAP WITH
|
||||
438 | 1 Unidrive4.asm 419 | Code | 11 | | 2 | 00/0582 : A5 C1 | FADD LDA {$C1} ;<------------------------------------- add
|
||||
439 | 1 Unidrive4.asm 420 | Code | 11 | | 2 | 00/0584 : C5 C5 | CMP {$C5} ;COMPARE EXP1 WITH EXP2.
|
||||
440 | 1 Unidrive4.asm 421 | Code | 11 | | 2 | 00/0586 : D0 F7 | BNE SWPALGN ;IF #,SWAP ADDENDS OR ALIGN MANTS.
|
||||
441 | 1 Unidrive4.asm 422 | Code | 11 | | 3 | 00/0588 : 20 39 05 | JSR ADD ;ADD ALIGNED MANTISSAS.
|
||||
442 | 1 Unidrive4.asm 423 | Code | 11 | | 2 | 00/058B : 50 EA | ADDEND BVC NORM ;NO OVERFLOW, NORMALIZE RESULT.
|
||||
443 | 1 Unidrive4.asm 424 | Code | 11 | | 2 | 00/058D : 70 05 | BVS RTLOG ;OV: SHIFT M1 RIGHT, CARRY INTO SIGN
|
||||
444 | 1 Unidrive4.asm 425 | Code | 11 | | 2 | 00/058F : 90 C4 | ALGNSWP BCC SWAP ;SWAP IF CARRY CLEAR,
|
||||
445 | 1 Unidrive4.asm 426 | Comment | 11 | | 0 | 00/0591 | * ELSE SHIFT RIGHT ARITH.
|
||||
446 | 1 Unidrive4.asm 427 | Code | 11 | | 2 | 00/0591 : A5 C6 | RTAR LDA {$C6} ;SIGN OF MANT1 INTO CARRY FOR
|
||||
447 | 1 Unidrive4.asm 428 | Code | 11 | | 1 | 00/0593 : 0A | ASL ;RIGHT ARITH SHIFT.
|
||||
448 | 1 Unidrive4.asm 429 | Code | 11 | | 2 | 00/0594 : E6 C5 | RTLOG INC {$C5} ;INCR X1 TO ADJUST FOR RIGHT SHIFT
|
||||
449 | 1 Unidrive4.asm 430 | Code | 11 | | 2 | 00/0596 : F0 75 | BEQ OVFL ;EXP1 OUT OF RANGE.
|
||||
450 | 1 Unidrive4.asm 431 | Code | 11 | | 2 | 00/0598 : A2 FA | RTLOG1 LDX #$FA ;INDEX FOR 6:BYTE RIGHT SHIFT.
|
||||
451 | 1 Unidrive4.asm 432 | Code | 11 | | 2 | 00/059A : 76 CC | ROR1 ROR {$C9}+3,X
|
||||
452 | 1 Unidrive4.asm 433 | Code | 11 | | 1 | 00/059C : E8 | INX ;NEXT BYTE OF SHIFT.
|
||||
453 | 1 Unidrive4.asm 434 | Code | 11 | | 2 | 00/059D : D0 FB | BNE ROR1 ;LOOP UNTIL DONE.
|
||||
454 | 1 Unidrive4.asm 435 | Code | 11 | | 1 | 00/059F : 60 | RTS ;RETURN.
|
||||
455 | 1 Unidrive4.asm 436 | Code | 11 | | 3 | 00/05A0 : 20 46 05 | FMUL JSR MD1 ;ABS VAL OF MANT1, MANT2 <-------------- mul
|
||||
456 | 1 Unidrive4.asm 437 | Code | 11 | | 2 | 00/05A3 : 65 C5 | ADC {$C5} ;ADD EXP1 TO EXP2 FOR PRODUCT EXP
|
||||
457 | 1 Unidrive4.asm 438 | Code | 11 | | 3 | 00/05A5 : 20 F6 05 | JSR MD2 ;CHECK PROD. EXP AND PREP. FOR MUL
|
||||
458 | 1 Unidrive4.asm 439 | Code | 11 | | 1 | 00/05A8 : 18 | CLC ;CLEAR CARRY FOR FIRST BIT.
|
||||
459 | 1 Unidrive4.asm 440 | Code | 11 | | 3 | 00/05A9 : 20 98 05 | MUL1 JSR RTLOG1 ;M1 AND E RIGHT (PROD AND MPLIER)
|
||||
460 | 1 Unidrive4.asm 441 | Code | 11 | | 2 | 00/05AC : 90 03 | BCC MUL2 ;IF CARRY CLEAR, SKIP PARTIAL PROD
|
||||
461 | 1 Unidrive4.asm 442 | Code | 11 | | 3 | 00/05AE : 20 39 05 | JSR ADD ;ADD MULTIPLICAND TO PRODUCT.
|
||||
462 | 1 Unidrive4.asm 443 | Code | 11 | | 1 | 00/05B1 : 88 | MUL2 DEY ;NEXT MUL ITERATION.
|
||||
463 | 1 Unidrive4.asm 444 | Code | 11 | | 2 | 00/05B2 : 10 F5 | BPL MUL1 ;LOOP UNTIL DONE.
|
||||
464 | 1 Unidrive4.asm 445 | Code | 11 | | 2 | 00/05B4 : 46 C0 | MDEND LSR {$C0} ;TEST SIGN LSB.
|
||||
465 | 1 Unidrive4.asm 446 | Code | 11 | | 2 | 00/05B6 : 90 BF | NORMX BCC NORM ;IF EVEN,NORMALIZE PROD,ELSE COMP
|
||||
466 | 1 Unidrive4.asm 447 | Code | 11 | | 1 | 00/05B8 : 38 | FCOMPL SEC ;SET CARRY FOR SUBTRACT. <--------------- not
|
||||
467 | 1 Unidrive4.asm 448 | Code | 11 | | 2 | 00/05B9 : A2 03 | LDX #$3 ;INDEX FOR 3 BYTE SUBTRACT.
|
||||
468 | 1 Unidrive4.asm 449 | Code | 11 | | 2 | 00/05BB : A9 00 | COMPL1 LDA #$0 ;CLEAR A.
|
||||
469 | 1 Unidrive4.asm 450 | Code | 11 | | 2 | 00/05BD : F5 C5 | SBC {$C5},X ;SUBTRACT BYTE OF EXP1.
|
||||
470 | 1 Unidrive4.asm 451 | Code | 11 | | 2 | 00/05BF : 95 C5 | STA {$C5},X ;RESTORE IT.
|
||||
471 | 1 Unidrive4.asm 452 | Code | 11 | | 1 | 00/05C1 : CA | DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
472 | 1 Unidrive4.asm 453 | Code | 11 | | 2 | 00/05C2 : D0 F7 | BNE COMPL1 ;LOOP UNTIL DONE.
|
||||
473 | 1 Unidrive4.asm 454 | Code | 11 | | 2 | 00/05C4 : F0 C5 | BEQ ADDEND ;NORMALIZE (OR SHIFT RT IF OVFL).
|
||||
474 | 1 Unidrive4.asm 455 | Code | 11 | | 3 | 00/05C6 : 20 46 05 | FDIV JSR MD1 ;TAKE ABS VAL OF MANT1, MANT2. <--------- div
|
||||
475 | 1 Unidrive4.asm 456 | Code | 11 | | 2 | 00/05C9 : E5 C5 | SBC {$C5} ;SUBTRACT EXP1 FROM EXP2.
|
||||
476 | 1 Unidrive4.asm 457 | Code | 11 | | 3 | 00/05CB : 20 F6 05 | JSR MD2 ;SAVE AS QUOTIENT EXP.
|
||||
477 | 1 Unidrive4.asm 458 | Code | 11 | | 1 | 00/05CE : 38 | DIV1 SEC ;SET CARRY FOR SUBTRACT.
|
||||
478 | 1 Unidrive4.asm 459 | Code | 11 | | 2 | 00/05CF : A2 02 | LDX #$2 ;INDEX FOR 3-BYTE SUBTRACTION.
|
||||
479 | 1 Unidrive4.asm 460 | Code | 11 | | 2 | 00/05D1 : B5 C2 | DIV2 LDA {$C2},X
|
||||
480 | 1 Unidrive4.asm 461 | Code | 11 | | 2 | 00/05D3 : F5 C9 | SBC {$C9},X ;SUBTRACT A BYTE OF E FROM MANT2.
|
||||
481 | 1 Unidrive4.asm 462 | Code | 11 | | 1 | 00/05D5 : 48 | PHA ;SAVE ON STACK.
|
||||
482 | 1 Unidrive4.asm 463 | Code | 11 | | 1 | 00/05D6 : CA | DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
483 | 1 Unidrive4.asm 464 | Code | 11 | | 2 | 00/05D7 : 10 F8 | BPL DIV2 ;LOOP UNTIL DONE.
|
||||
484 | 1 Unidrive4.asm 465 | Code | 11 | | 2 | 00/05D9 : A2 FD | LDX #$FD ;INDEX FOR 3-BYTE CONDITIONAL MOVE
|
||||
485 | 1 Unidrive4.asm 466 | Code | 11 | | 1 | 00/05DB : 68 | DIV3 PLA ;PULL BYTE OF DIFFERENCE OFF STACK
|
||||
486 | 1 Unidrive4.asm 467 | Code | 11 | | 2 | 00/05DC : 90 02 | BCC DIV4 ;IF M2<E THEN DON'T RESTORE M2.
|
||||
487 | 1 Unidrive4.asm 468 | Code | 11 | | 2 | 00/05DE : 95 C5 | STA {$C2}+3,X
|
||||
488 | 1 Unidrive4.asm 469 | Code | 11 | | 1 | 00/05E0 : E8 | DIV4 INX ;NEXT LESS SIGNIFICANT BYTE.
|
||||
489 | 1 Unidrive4.asm 470 | Code | 11 | | 2 | 00/05E1 : D0 F8 | BNE DIV3 ;LOOP UNTIL DONE.
|
||||
490 | 1 Unidrive4.asm 471 | Code | 11 | | 2 | 00/05E3 : 26 C8 | ROL {$C6}+2
|
||||
491 | 1 Unidrive4.asm 472 | Code | 11 | | 2 | 00/05E5 : 26 C7 | ROL {$C6}+1 ;ROLL QUOTIENT LEFT, CARRY INTO LSB
|
||||
492 | 1 Unidrive4.asm 473 | Code | 11 | | 2 | 00/05E7 : 26 C6 | ROL {$C6}
|
||||
493 | 1 Unidrive4.asm 474 | Code | 11 | | 2 | 00/05E9 : 06 C4 | ASL {$C2}+2
|
||||
494 | 1 Unidrive4.asm 475 | Code | 11 | | 2 | 00/05EB : 26 C3 | ROL {$C2}+1 ;SHIFT DIVIDEND LEFT
|
||||
495 | 1 Unidrive4.asm 476 | Code | 11 | | 2 | 00/05ED : 26 C2 | ROL {$C2}
|
||||
496 | 1 Unidrive4.asm 477 | Code | 11 | | 2 | 00/05EF : B0 1C | BCS OVFL ;OVFL IS DUE TO UNNORMED DIVISOR
|
||||
497 | 1 Unidrive4.asm 478 | Code | 11 | | 1 | 00/05F1 : 88 | DEY ;NEXT DIVIDE ITERATION.
|
||||
498 | 1 Unidrive4.asm 479 | Code | 11 | | 2 | 00/05F2 : D0 DA | BNE DIV1 ;LOOP UNTIL DONE 23 ITERATIONS.
|
||||
499 | 1 Unidrive4.asm 480 | Code | 11 | | 2 | 00/05F4 : F0 BE | BEQ MDEND ;NORM. QUOTIENT AND CORRECT SIGN.
|
||||
500 | 1 Unidrive4.asm 481 | Code | 11 | | 2 | 00/05F6 : 86 C8 | MD2 STX {$C6}+2
|
||||
501 | 1 Unidrive4.asm 482 | Code | 11 | | 2 | 00/05F8 : 86 C7 | STX {$C6}+1 ;CLEAR MANT1 (3 BYTES) FOR MUL/DIV.
|
||||
502 | 1 Unidrive4.asm 483 | Code | 11 | | 2 | 00/05FA : 86 C6 | STX {$C6}
|
||||
503 | 1 Unidrive4.asm 484 | Code | 11 | | 2 | 00/05FC : B0 0D | BCS OVCHK ;IF CALC. SET CARRY,CHECK FOR OVFL
|
||||
504 | 1 Unidrive4.asm 485 | Code | 11 | | 2 | 00/05FE : 30 04 | BMI MD3 ;IF NEG THEN NO UNDERFLOW.
|
||||
505 | 1 Unidrive4.asm 486 | Code | 11 | | 1 | 00/0600 : 68 | PLA ;POP ONE RETURN LEVEL.
|
||||
506 | 1 Unidrive4.asm 487 | Code | 11 | | 1 | 00/0601 : 68 | PLA
|
||||
507 | 1 Unidrive4.asm 488 | Code | 11 | | 2 | 00/0602 : 90 B2 | BCC NORMX ;CLEAR X1 AND RETURN.
|
||||
508 | 1 Unidrive4.asm 489 | Code | 11 | | 2 | 00/0604 : 49 80 | MD3 EOR #$80 ;COMPLEMENT SIGN BIT OF EXPONENT.
|
||||
509 | 1 Unidrive4.asm 490 | Code | 11 | | 2 | 00/0606 : 85 C5 | STA {$C5} ;STORE IT.
|
||||
510 | 1 Unidrive4.asm 491 | Code | 11 | | 2 | 00/0608 : A0 17 | LDY #$17 ;COUNT 24 MUL/23 DIV ITERATIONS.
|
||||
511 | 1 Unidrive4.asm 492 | Code | 11 | | 1 | 00/060A : 60 | RTS ;RETURN.
|
||||
512 | 1 Unidrive4.asm 493 | Code | 11 | | 2 | 00/060B : 10 F7 | OVCHK BPL MD3 ;IF POSITIVE EXP THEN NO OVFL.
|
||||
513 | 1 Unidrive4.asm 494 | Code | 11 | | 3 | 00/060D : 4C 10 0C | OVFL JMP {$C10}
|
||||
514 | 1 Unidrive4.asm 495 | Comment | 11 | | 0 | 00/0610 | * ORG $F63D
|
||||
515 | 1 Unidrive4.asm 496 | Code | 11 | | 3 | 00/0610 : 20 91 05 | FIX1 JSR RTAR
|
||||
516 | 1 Unidrive4.asm 497 | Code | 11 | | 2 | 00/0613 : A5 C5 | FIX LDA {$C5} ; <------------------------------ fp to int
|
||||
517 | 1 Unidrive4.asm 498 | Code | 11 | | 2 | 00/0615 : 10 13 | BPL UNDFL
|
||||
518 | 1 Unidrive4.asm 499 | Code | 11 | | 2 | 00/0617 : C9 8E | CMP #$8E
|
||||
519 | 1 Unidrive4.asm 500 | Code | 11 | | 2 | 00/0619 : D0 F5 | BNE FIX1
|
||||
520 | 1 Unidrive4.asm 501 | Code | 11 | | 2 | 00/061B : 24 C6 | BIT {$C6}
|
||||
521 | 1 Unidrive4.asm 502 | Code | 11 | | 2 | 00/061D : 10 0A | BPL FIXRTS
|
||||
522 | 1 Unidrive4.asm 503 | Code | 11 | | 2 | 00/061F : A5 C8 | LDA {$C6}+2
|
||||
523 | 1 Unidrive4.asm 504 | Code | 11 | | 2 | 00/0621 : F0 06 | BEQ FIXRTS
|
||||
524 | 1 Unidrive4.asm 505 | Code | 11 | | 2 | 00/0623 : E6 C7 | INC {$C6}+1
|
||||
525 | 1 Unidrive4.asm 506 | Code | 11 | | 2 | 00/0625 : D0 02 | BNE FIXRTS
|
||||
526 | 1 Unidrive4.asm 507 | Code | 11 | | 2 | 00/0627 : E6 C6 | INC {$C6}
|
||||
527 | 1 Unidrive4.asm 508 | Code | 11 | | 1 | 00/0629 : 60 | FIXRTS RTS
|
||||
528 | 1 Unidrive4.asm 509 | Code | 11 | | 2 | 00/062A : A9 00 | UNDFL LDA #$0
|
||||
529 | 1 Unidrive4.asm 510 | Code | 11 | | 2 | 00/062C : 85 C6 | STA {$C6}
|
||||
530 | 1 Unidrive4.asm 511 | Code | 11 | | 2 | 00/062E : 85 C7 | STA {$C6}+1
|
||||
531 | 1 Unidrive4.asm 512 | Code | 11 | | 1 | 00/0630 : 60 | RTS
|
||||
532 | 1 Unidrive4.asm 513 | Comment | 11 | | 0 | 00/0631 | ** Input Dynamic Data append in the end of Unidisk routine **
|
||||
533 | 1 Unidrive4.asm 514 | Data | 11 | | 1 | 00/0631 : 00 | FP1 dfb $00
|
||||
534 | 1 Unidrive4.asm 515 | Data | 11 | | 1 | 00/0632 : 00 | dfb $00
|
||||
535 | 1 Unidrive4.asm 516 | Data | 11 | | 1 | 00/0633 : 00 | dfb $00
|
||||
536 | 1 Unidrive4.asm 517 | Data | 11 | | 1 | 00/0634 : 00 | dfb $00
|
||||
537 | 1 Unidrive4.asm 518 | Comment | 11 | | 0 | 00/0635 | *
|
||||
538 | 1 Unidrive4.asm 519 | Data | 11 | | 1 | 00/0635 : 00 | FP2 dfb $00
|
||||
539 | 1 Unidrive4.asm 520 | Data | 11 | | 1 | 00/0636 : 00 | dfb $00
|
||||
540 | 1 Unidrive4.asm 521 | Data | 11 | | 1 | 00/0637 : 00 | dfb $00
|
||||
541 | 1 Unidrive4.asm 522 | Data | 11 | | 1 | 00/0638 : 00 | dfb $00
|
||||
319 | 1 Unidrive4.asm 300 | Equivalence | 11 | | 0 | 00/0500 | SIGN EQU $C0 ;$EB ; $F3
|
||||
320 | 1 Unidrive4.asm 301 | Empty | 11 | | 0 | 00/0500 |
|
||||
321 | 1 Unidrive4.asm 302 | Comment | 11 | | 0 | 00/0500 | ** FP2 4 Bytes **
|
||||
322 | 1 Unidrive4.asm 303 | Equivalence | 11 | | 0 | 00/0500 | X2 EQU $C1 ;$EC ; $F4
|
||||
323 | 1 Unidrive4.asm 304 | Equivalence | 11 | | 0 | 00/0500 | M2 EQU $C2 ;$ED ; $F5 - $F7
|
||||
324 | 1 Unidrive4.asm 305 | Empty | 11 | | 0 | 00/0500 |
|
||||
325 | 1 Unidrive4.asm 306 | Comment | 11 | | 0 | 00/0500 | ** FP1 4 Bytes + E extension **
|
||||
326 | 1 Unidrive4.asm 307 | Equivalence | 11 | | 0 | 00/0500 | X1 EQU $C5 ;$FA ; $F8
|
||||
327 | 1 Unidrive4.asm 308 | Equivalence | 11 | | 0 | 00/0500 | M1 EQU $C6 ;$FB ; $F9 - $FB
|
||||
328 | 1 Unidrive4.asm 309 | Equivalence | 11 | | 0 | 00/0500 | E EQU $C9 ;$FE ; $FC
|
||||
329 | 1 Unidrive4.asm 310 | Empty | 11 | | 0 | 00/0500 |
|
||||
330 | 1 Unidrive4.asm 311 | Equivalence | 11 | | 0 | 00/0500 | OVLOC EQU $C10 ;$3F5 ;Overflow routine is not implemented at now)
|
||||
331 | 1 Unidrive4.asm 312 | Empty | 11 | | 0 | 00/0500 |
|
||||
332 | 1 Unidrive4.asm 313 | Comment | 11 | | 0 | 00/0500 | *
|
||||
333 | 1 Unidrive4.asm 314 | Comment | 11 | | 0 | 00/0500 | ** Main program **
|
||||
334 | 1 Unidrive4.asm 315 | Comment | 11 | | 0 | 00/0500 | *
|
||||
335 | 1 Unidrive4.asm 316 | Comment | 11 | | 0 | 00/0500 | ** Input data to Zero Page **
|
||||
336 | 1 Unidrive4.asm 317 | Empty | 11 | | 0 | 00/0500 |
|
||||
337 | 1 Unidrive4.asm 318 | Comment | 11 | | 0 | 00/0500 | ** FP1 **
|
||||
338 | 1 Unidrive4.asm 319 | Code | 11 | | 3 | 00/0500 : AD 2D 06 | lda FP1
|
||||
339 | 1 Unidrive4.asm 320 | Code | 11 | | 2 | 00/0503 : 85 C5 | sta {$C5}
|
||||
340 | 1 Unidrive4.asm 321 | Empty | 11 | | 0 | 00/0505 |
|
||||
341 | 1 Unidrive4.asm 322 | Code | 11 | | 3 | 00/0505 : AD 2E 06 | lda FP1+1
|
||||
342 | 1 Unidrive4.asm 323 | Code | 11 | | 2 | 00/0508 : 85 C6 | sta {$C6}
|
||||
343 | 1 Unidrive4.asm 324 | Code | 11 | | 3 | 00/050A : AD 2F 06 | lda FP1+2
|
||||
344 | 1 Unidrive4.asm 325 | Code | 11 | | 2 | 00/050D : 85 C7 | sta {$C6}+1
|
||||
345 | 1 Unidrive4.asm 326 | Code | 11 | | 3 | 00/050F : AD 30 06 | lda FP1+3
|
||||
346 | 1 Unidrive4.asm 327 | Code | 11 | | 2 | 00/0512 : 85 C8 | sta {$C6}+2
|
||||
347 | 1 Unidrive4.asm 328 | Empty | 11 | | 0 | 00/0514 |
|
||||
348 | 1 Unidrive4.asm 329 | Comment | 11 | | 0 | 00/0514 | ** FP2 **
|
||||
349 | 1 Unidrive4.asm 330 | Code | 11 | | 3 | 00/0514 : AD 31 06 | lda FP2
|
||||
350 | 1 Unidrive4.asm 331 | Code | 11 | | 2 | 00/0517 : 85 C1 | sta {$C1}
|
||||
351 | 1 Unidrive4.asm 332 | Empty | 11 | | 0 | 00/0519 |
|
||||
352 | 1 Unidrive4.asm 333 | Code | 11 | | 3 | 00/0519 : AD 32 06 | lda FP2+1
|
||||
353 | 1 Unidrive4.asm 334 | Code | 11 | | 2 | 00/051C : 85 C2 | sta {$C2}
|
||||
354 | 1 Unidrive4.asm 335 | Code | 11 | | 3 | 00/051E : AD 33 06 | lda FP2+2
|
||||
355 | 1 Unidrive4.asm 336 | Code | 11 | | 2 | 00/0521 : 85 C3 | sta {$C2}+1
|
||||
356 | 1 Unidrive4.asm 337 | Code | 11 | | 3 | 00/0523 : AD 34 06 | lda FP2+3
|
||||
357 | 1 Unidrive4.asm 338 | Code | 11 | | 2 | 00/0526 : 85 C4 | sta {$C2}+2
|
||||
358 | 1 Unidrive4.asm 339 | Empty | 11 | | 0 | 00/0528 |
|
||||
359 | 1 Unidrive4.asm 340 | Comment | 11 | | 0 | 00/0528 | ************************** Target Function ***********************
|
||||
360 | 1 Unidrive4.asm 341 | Comment | 11 | | 0 | 00/0528 | * Y=N1+N2 *
|
||||
361 | 1 Unidrive4.asm 342 | Comment | 11 | | 0 | 00/0528 | ******************************************************************
|
||||
362 | 1 Unidrive4.asm 343 | Comment | 11 | | 0 | 00/0528 | *
|
||||
363 | 1 Unidrive4.asm 344 | Comment | 11 | | 0 | 00/0528 | ** Simple ADD **
|
||||
364 | 1 Unidrive4.asm 345 | Code | 11 | | 3 | 00/0528 : 20 7E 05 | jsr FADD ; Call FP routine
|
||||
365 | 1 Unidrive4.asm 346 | Empty | 11 | | 0 | 00/052B |
|
||||
366 | 1 Unidrive4.asm 347 | Comment | 11 | | 0 | 00/052B | *** Output Data result FP1 to Unidisk registers First Time first 3 Byte out ***
|
||||
367 | 1 Unidrive4.asm 348 | Code | 11 | | 2 | 00/052B : A5 C5 | lda {$C5}
|
||||
368 | 1 Unidrive4.asm 349 | Code | 11 | | 2 | 00/052D : A6 C6 | ldx {$C6}
|
||||
369 | 1 Unidrive4.asm 350 | Code | 11 | | 2 | 00/052F : A4 C7 | ldy {$C6}+1
|
||||
370 | 1 Unidrive4.asm 351 | Empty | 11 | | 0 | 00/0531 |
|
||||
371 | 1 Unidrive4.asm 352 | Code | 11 | | 1 | 00/0531 : 60 | rts
|
||||
372 | 1 Unidrive4.asm 353 | Comment | 11 | | 0 | 00/0532 | *** Output Data result FP1 to Unidisk registers Second Time latest 1 Byte out ***
|
||||
373 | 1 Unidrive4.asm 354 | Code | 11 | | 2 | 00/0532 : A5 C8 | SECOND lda {$C6}+2 ; Entry point by Program Counter set
|
||||
374 | 1 Unidrive4.asm 355 | Empty | 11 | | 0 | 00/0534 |
|
||||
375 | 1 Unidrive4.asm 356 | Code | 11 | | 1 | 00/0534 : 60 | rts
|
||||
376 | 1 Unidrive4.asm 357 | Comment | 11 | | 0 | 00/0535 | ***************************************************
|
||||
377 | 1 Unidrive4.asm 358 | Comment | 11 | | 0 | 00/0535 | *
|
||||
378 | 1 Unidrive4.asm 359 | Comment | 11 | | 0 | 00/0535 | ***************** FP Routine *****************
|
||||
379 | 1 Unidrive4.asm 360 | Comment | 11 | | 0 | 00/0535 | *
|
||||
380 | 1 Unidrive4.asm 361 | Comment | 11 | | 0 | 00/0535 | ***********************
|
||||
381 | 1 Unidrive4.asm 362 | Comment | 11 | | 0 | 00/0535 | * *
|
||||
382 | 1 Unidrive4.asm 363 | Comment | 11 | | 0 | 00/0535 | * APPLE-II FLOATING *
|
||||
383 | 1 Unidrive4.asm 364 | Comment | 11 | | 0 | 00/0535 | * POINT ROUTINES *
|
||||
384 | 1 Unidrive4.asm 365 | Comment | 11 | | 0 | 00/0535 | * *
|
||||
385 | 1 Unidrive4.asm 366 | Comment | 11 | | 0 | 00/0535 | * COPYRIGHT 1977 BY *
|
||||
386 | 1 Unidrive4.asm 367 | Comment | 11 | | 0 | 00/0535 | * APPLE COMPUTER INC. *
|
||||
387 | 1 Unidrive4.asm 368 | Comment | 11 | | 0 | 00/0535 | * *
|
||||
388 | 1 Unidrive4.asm 369 | Comment | 11 | | 0 | 00/0535 | * ALL RIGHTS RESERVED *
|
||||
389 | 1 Unidrive4.asm 370 | Comment | 11 | | 0 | 00/0535 | * *
|
||||
390 | 1 Unidrive4.asm 371 | Comment | 11 | | 0 | 00/0535 | * S. WOZNIAK *
|
||||
391 | 1 Unidrive4.asm 372 | Comment | 11 | | 0 | 00/0535 | * *
|
||||
392 | 1 Unidrive4.asm 373 | Comment | 11 | | 0 | 00/0535 | ***********************
|
||||
393 | 1 Unidrive4.asm 374 | Comment | 11 | | 0 | 00/0535 | * TITLE "FLOATING POINT ROUTINES for Unidisk memory"
|
||||
394 | 1 Unidrive4.asm 375 | Comment | 11 | | 0 | 00/0535 | *
|
||||
395 | 1 Unidrive4.asm 376 | Empty | 11 | | 0 | 00/0535 |
|
||||
396 | 1 Unidrive4.asm 377 | Code | 11 | | 1 | 00/0535 : 18 | ADD CLC ;CLEAR CARRY
|
||||
397 | 1 Unidrive4.asm 378 | Code | 11 | | 2 | 00/0536 : A2 02 | LDX #$2 ;INDEX FOR 3-BYTE ADD.
|
||||
398 | 1 Unidrive4.asm 379 | Code | 11 | | 2 | 00/0538 : B5 C6 | ADD1 LDA {$C6},X
|
||||
399 | 1 Unidrive4.asm 380 | Code | 11 | | 2 | 00/053A : 75 C2 | ADC {$C2},X ;ADD A BYTE OF MANT2 TO MANT1
|
||||
400 | 1 Unidrive4.asm 381 | Code | 11 | | 2 | 00/053C : 95 C6 | STA {$C6},X
|
||||
401 | 1 Unidrive4.asm 382 | Code | 11 | | 1 | 00/053E : CA | DEX ;INDEX TO NEXT MORE SIGNIF. BYTE.
|
||||
402 | 1 Unidrive4.asm 383 | Code | 11 | | 2 | 00/053F : 10 F7 | BPL ADD1 ;LOOP UNTIL DONE.
|
||||
403 | 1 Unidrive4.asm 384 | Code | 11 | | 1 | 00/0541 : 60 | RTS ;RETURN
|
||||
404 | 1 Unidrive4.asm 385 | Code | 11 | | 2 | 00/0542 : 06 C0 | MD1 ASL {$C0} ;CLEAR LSB OF SIGN.
|
||||
405 | 1 Unidrive4.asm 386 | Code | 11 | | 3 | 00/0544 : 20 47 05 | JSR ABSWAP ;ABS VAL OF M1, THEN SWAP WITH M2
|
||||
406 | 1 Unidrive4.asm 387 | Code | 11 | | 2 | 00/0547 : 24 C6 | ABSWAP BIT {$C6} ;MANT1 NEGATIVE?
|
||||
407 | 1 Unidrive4.asm 388 | Code | 11 | | 2 | 00/0549 : 10 05 | BPL ABSWAP1 ;NO, SWAP WITH MANT2 AND RETURN.
|
||||
408 | 1 Unidrive4.asm 389 | Code | 11 | | 3 | 00/054B : 20 B4 05 | JSR FCOMPL ;YES, COMPLEMENT IT.
|
||||
409 | 1 Unidrive4.asm 390 | Code | 11 | | 2 | 00/054E : E6 C0 | INC {$C0} ;INCR SIGN, COMPLEMENTING LSB.
|
||||
410 | 1 Unidrive4.asm 391 | Code | 11 | | 1 | 00/0550 : 38 | ABSWAP1 SEC ;SET CARRY FOR RETURN TO MUL/DIV.
|
||||
411 | 1 Unidrive4.asm 392 | Code | 11 | | 2 | 00/0551 : A2 04 | SWAP LDX #$4 ;INDEX FOR 4 BYTE SWAP.
|
||||
412 | 1 Unidrive4.asm 393 | Code | 11 | | 2 | 00/0553 : 94 C8 | SWAP1 STY {$C9}-1,X
|
||||
413 | 1 Unidrive4.asm 394 | Code | 11 | | 2 | 00/0555 : B5 C4 | LDA {$C5}-1,X ;SWAP A BYTE OF EXP/MANT1 WITH
|
||||
414 | 1 Unidrive4.asm 395 | Code | 11 | | 2 | 00/0557 : B4 C0 | LDY {$C1}-1,X ;EXP/MANT2 AND LEAVE A COPY OF
|
||||
415 | 1 Unidrive4.asm 396 | Code | 11 | | 2 | 00/0559 : 94 C4 | STY {$C5}-1,X ;MANT1 IN E (3 BYTES). E+3 USED
|
||||
416 | 1 Unidrive4.asm 397 | Code | 11 | | 2 | 00/055B : 95 C0 | STA {$C1}-1,X
|
||||
417 | 1 Unidrive4.asm 398 | Code | 11 | | 1 | 00/055D : CA | DEX ;ADVANCE INDEX TO NEXT BYTE
|
||||
418 | 1 Unidrive4.asm 399 | Code | 11 | | 2 | 00/055E : D0 F3 | BNE SWAP1 ;LOOP UNTIL DONE.
|
||||
419 | 1 Unidrive4.asm 400 | Code | 11 | | 1 | 00/0560 : 60 | RTS ;RETURN
|
||||
420 | 1 Unidrive4.asm 401 | Code | 11 | | 2 | 00/0561 : A9 8E | FLOAT LDA #$8E ;INIT EXP1 TO 14, <--------------- int to fp
|
||||
421 | 1 Unidrive4.asm 402 | Code | 11 | | 2 | 00/0563 : 85 C5 | STA {$C5} ;THEN NORMALIZE TO FLOAT.
|
||||
422 | 1 Unidrive4.asm 403 | Code | 11 | | 2 | 00/0565 : A5 C6 | NORM1 LDA {$C6} ;HIGH-ORDER MANT1 BYTE.
|
||||
423 | 1 Unidrive4.asm 404 | Code | 11 | | 2 | 00/0567 : C9 C0 | CMP #$C0 ;UPPER TWO BITS UNEQUAL?
|
||||
424 | 1 Unidrive4.asm 405 | Code | 11 | | 2 | 00/0569 : 30 0C | BMI RTS1 ;YES, RETURN WITH MANT1 NORMALIZED
|
||||
425 | 1 Unidrive4.asm 406 | Code | 11 | | 2 | 00/056B : C6 C5 | DEC {$C5} ;DECREMENT EXP1.
|
||||
426 | 1 Unidrive4.asm 407 | Code | 11 | | 2 | 00/056D : 06 C8 | ASL {$C6}+2
|
||||
427 | 1 Unidrive4.asm 408 | Code | 11 | | 2 | 00/056F : 26 C7 | ROL {$C6}+1 ;SHIFT MANT1 (3 BYTES) LEFT.
|
||||
428 | 1 Unidrive4.asm 409 | Code | 11 | | 2 | 00/0571 : 26 C6 | ROL {$C6}
|
||||
429 | 1 Unidrive4.asm 410 | Code | 11 | | 2 | 00/0573 : A5 C5 | NORM LDA {$C5} ;EXP1 ZERO?
|
||||
430 | 1 Unidrive4.asm 411 | Code | 11 | | 2 | 00/0575 : D0 EE | BNE NORM1 ;NO, CONTINUE NORMALIZING.
|
||||
431 | 1 Unidrive4.asm 412 | Code | 11 | | 1 | 00/0577 : 60 | RTS1 RTS ;RETURN.
|
||||
432 | 1 Unidrive4.asm 413 | Code | 11 | | 3 | 00/0578 : 20 B4 05 | FSUB JSR FCOMPL ;CMPL MANT1,CLEARS CARRY UNLESS 0 <---- sub
|
||||
433 | 1 Unidrive4.asm 414 | Code | 11 | | 3 | 00/057B : 20 8B 05 | SWPALGN JSR ALGNSWP ;RIGHT SHIFT MANT1 OR SWAP WITH
|
||||
434 | 1 Unidrive4.asm 415 | Code | 11 | | 2 | 00/057E : A5 C1 | FADD LDA {$C1} ;<------------------------------------- add
|
||||
435 | 1 Unidrive4.asm 416 | Code | 11 | | 2 | 00/0580 : C5 C5 | CMP {$C5} ;COMPARE EXP1 WITH EXP2.
|
||||
436 | 1 Unidrive4.asm 417 | Code | 11 | | 2 | 00/0582 : D0 F7 | BNE SWPALGN ;IF #,SWAP ADDENDS OR ALIGN MANTS.
|
||||
437 | 1 Unidrive4.asm 418 | Code | 11 | | 3 | 00/0584 : 20 35 05 | JSR ADD ;ADD ALIGNED MANTISSAS.
|
||||
438 | 1 Unidrive4.asm 419 | Code | 11 | | 2 | 00/0587 : 50 EA | ADDEND BVC NORM ;NO OVERFLOW, NORMALIZE RESULT.
|
||||
439 | 1 Unidrive4.asm 420 | Code | 11 | | 2 | 00/0589 : 70 05 | BVS RTLOG ;OV: SHIFT M1 RIGHT, CARRY INTO SIGN
|
||||
440 | 1 Unidrive4.asm 421 | Code | 11 | | 2 | 00/058B : 90 C4 | ALGNSWP BCC SWAP ;SWAP IF CARRY CLEAR,
|
||||
441 | 1 Unidrive4.asm 422 | Comment | 11 | | 0 | 00/058D | * ELSE SHIFT RIGHT ARITH.
|
||||
442 | 1 Unidrive4.asm 423 | Code | 11 | | 2 | 00/058D : A5 C6 | RTAR LDA {$C6} ;SIGN OF MANT1 INTO CARRY FOR
|
||||
443 | 1 Unidrive4.asm 424 | Code | 11 | | 1 | 00/058F : 0A | ASL ;RIGHT ARITH SHIFT.
|
||||
444 | 1 Unidrive4.asm 425 | Code | 11 | | 2 | 00/0590 : E6 C5 | RTLOG INC {$C5} ;INCR X1 TO ADJUST FOR RIGHT SHIFT
|
||||
445 | 1 Unidrive4.asm 426 | Code | 11 | | 2 | 00/0592 : F0 75 | BEQ OVFL ;EXP1 OUT OF RANGE.
|
||||
446 | 1 Unidrive4.asm 427 | Code | 11 | | 2 | 00/0594 : A2 FA | RTLOG1 LDX #$FA ;INDEX FOR 6:BYTE RIGHT SHIFT.
|
||||
447 | 1 Unidrive4.asm 428 | Code | 11 | | 2 | 00/0596 : 76 CC | ROR1 ROR {$C9}+3,X
|
||||
448 | 1 Unidrive4.asm 429 | Code | 11 | | 1 | 00/0598 : E8 | INX ;NEXT BYTE OF SHIFT.
|
||||
449 | 1 Unidrive4.asm 430 | Code | 11 | | 2 | 00/0599 : D0 FB | BNE ROR1 ;LOOP UNTIL DONE.
|
||||
450 | 1 Unidrive4.asm 431 | Code | 11 | | 1 | 00/059B : 60 | RTS ;RETURN.
|
||||
451 | 1 Unidrive4.asm 432 | Code | 11 | | 3 | 00/059C : 20 42 05 | FMUL JSR MD1 ;ABS VAL OF MANT1, MANT2 <-------------- mul
|
||||
452 | 1 Unidrive4.asm 433 | Code | 11 | | 2 | 00/059F : 65 C5 | ADC {$C5} ;ADD EXP1 TO EXP2 FOR PRODUCT EXP
|
||||
453 | 1 Unidrive4.asm 434 | Code | 11 | | 3 | 00/05A1 : 20 F2 05 | JSR MD2 ;CHECK PROD. EXP AND PREP. FOR MUL
|
||||
454 | 1 Unidrive4.asm 435 | Code | 11 | | 1 | 00/05A4 : 18 | CLC ;CLEAR CARRY FOR FIRST BIT.
|
||||
455 | 1 Unidrive4.asm 436 | Code | 11 | | 3 | 00/05A5 : 20 94 05 | MUL1 JSR RTLOG1 ;M1 AND E RIGHT (PROD AND MPLIER)
|
||||
456 | 1 Unidrive4.asm 437 | Code | 11 | | 2 | 00/05A8 : 90 03 | BCC MUL2 ;IF CARRY CLEAR, SKIP PARTIAL PROD
|
||||
457 | 1 Unidrive4.asm 438 | Code | 11 | | 3 | 00/05AA : 20 35 05 | JSR ADD ;ADD MULTIPLICAND TO PRODUCT.
|
||||
458 | 1 Unidrive4.asm 439 | Code | 11 | | 1 | 00/05AD : 88 | MUL2 DEY ;NEXT MUL ITERATION.
|
||||
459 | 1 Unidrive4.asm 440 | Code | 11 | | 2 | 00/05AE : 10 F5 | BPL MUL1 ;LOOP UNTIL DONE.
|
||||
460 | 1 Unidrive4.asm 441 | Code | 11 | | 2 | 00/05B0 : 46 C0 | MDEND LSR {$C0} ;TEST SIGN LSB.
|
||||
461 | 1 Unidrive4.asm 442 | Code | 11 | | 2 | 00/05B2 : 90 BF | NORMX BCC NORM ;IF EVEN,NORMALIZE PROD,ELSE COMP
|
||||
462 | 1 Unidrive4.asm 443 | Code | 11 | | 1 | 00/05B4 : 38 | FCOMPL SEC ;SET CARRY FOR SUBTRACT. <--------------- not
|
||||
463 | 1 Unidrive4.asm 444 | Code | 11 | | 2 | 00/05B5 : A2 03 | LDX #$3 ;INDEX FOR 3 BYTE SUBTRACT.
|
||||
464 | 1 Unidrive4.asm 445 | Code | 11 | | 2 | 00/05B7 : A9 00 | COMPL1 LDA #$0 ;CLEAR A.
|
||||
465 | 1 Unidrive4.asm 446 | Code | 11 | | 2 | 00/05B9 : F5 C5 | SBC {$C5},X ;SUBTRACT BYTE OF EXP1.
|
||||
466 | 1 Unidrive4.asm 447 | Code | 11 | | 2 | 00/05BB : 95 C5 | STA {$C5},X ;RESTORE IT.
|
||||
467 | 1 Unidrive4.asm 448 | Code | 11 | | 1 | 00/05BD : CA | DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
468 | 1 Unidrive4.asm 449 | Code | 11 | | 2 | 00/05BE : D0 F7 | BNE COMPL1 ;LOOP UNTIL DONE.
|
||||
469 | 1 Unidrive4.asm 450 | Code | 11 | | 2 | 00/05C0 : F0 C5 | BEQ ADDEND ;NORMALIZE (OR SHIFT RT IF OVFL).
|
||||
470 | 1 Unidrive4.asm 451 | Code | 11 | | 3 | 00/05C2 : 20 42 05 | FDIV JSR MD1 ;TAKE ABS VAL OF MANT1, MANT2. <--------- div
|
||||
471 | 1 Unidrive4.asm 452 | Code | 11 | | 2 | 00/05C5 : E5 C5 | SBC {$C5} ;SUBTRACT EXP1 FROM EXP2.
|
||||
472 | 1 Unidrive4.asm 453 | Code | 11 | | 3 | 00/05C7 : 20 F2 05 | JSR MD2 ;SAVE AS QUOTIENT EXP.
|
||||
473 | 1 Unidrive4.asm 454 | Code | 11 | | 1 | 00/05CA : 38 | DIV1 SEC ;SET CARRY FOR SUBTRACT.
|
||||
474 | 1 Unidrive4.asm 455 | Code | 11 | | 2 | 00/05CB : A2 02 | LDX #$2 ;INDEX FOR 3-BYTE SUBTRACTION.
|
||||
475 | 1 Unidrive4.asm 456 | Code | 11 | | 2 | 00/05CD : B5 C2 | DIV2 LDA {$C2},X
|
||||
476 | 1 Unidrive4.asm 457 | Code | 11 | | 2 | 00/05CF : F5 C9 | SBC {$C9},X ;SUBTRACT A BYTE OF E FROM MANT2.
|
||||
477 | 1 Unidrive4.asm 458 | Code | 11 | | 1 | 00/05D1 : 48 | PHA ;SAVE ON STACK.
|
||||
478 | 1 Unidrive4.asm 459 | Code | 11 | | 1 | 00/05D2 : CA | DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
479 | 1 Unidrive4.asm 460 | Code | 11 | | 2 | 00/05D3 : 10 F8 | BPL DIV2 ;LOOP UNTIL DONE.
|
||||
480 | 1 Unidrive4.asm 461 | Code | 11 | | 2 | 00/05D5 : A2 FD | LDX #$FD ;INDEX FOR 3-BYTE CONDITIONAL MOVE
|
||||
481 | 1 Unidrive4.asm 462 | Code | 11 | | 1 | 00/05D7 : 68 | DIV3 PLA ;PULL BYTE OF DIFFERENCE OFF STACK
|
||||
482 | 1 Unidrive4.asm 463 | Code | 11 | | 2 | 00/05D8 : 90 02 | BCC DIV4 ;IF M2<E THEN DON'T RESTORE M2.
|
||||
483 | 1 Unidrive4.asm 464 | Code | 11 | | 2 | 00/05DA : 95 C5 | STA {$C2}+3,X
|
||||
484 | 1 Unidrive4.asm 465 | Code | 11 | | 1 | 00/05DC : E8 | DIV4 INX ;NEXT LESS SIGNIFICANT BYTE.
|
||||
485 | 1 Unidrive4.asm 466 | Code | 11 | | 2 | 00/05DD : D0 F8 | BNE DIV3 ;LOOP UNTIL DONE.
|
||||
486 | 1 Unidrive4.asm 467 | Code | 11 | | 2 | 00/05DF : 26 C8 | ROL {$C6}+2
|
||||
487 | 1 Unidrive4.asm 468 | Code | 11 | | 2 | 00/05E1 : 26 C7 | ROL {$C6}+1 ;ROLL QUOTIENT LEFT, CARRY INTO LSB
|
||||
488 | 1 Unidrive4.asm 469 | Code | 11 | | 2 | 00/05E3 : 26 C6 | ROL {$C6}
|
||||
489 | 1 Unidrive4.asm 470 | Code | 11 | | 2 | 00/05E5 : 06 C4 | ASL {$C2}+2
|
||||
490 | 1 Unidrive4.asm 471 | Code | 11 | | 2 | 00/05E7 : 26 C3 | ROL {$C2}+1 ;SHIFT DIVIDEND LEFT
|
||||
491 | 1 Unidrive4.asm 472 | Code | 11 | | 2 | 00/05E9 : 26 C2 | ROL {$C2}
|
||||
492 | 1 Unidrive4.asm 473 | Code | 11 | | 2 | 00/05EB : B0 1C | BCS OVFL ;OVFL IS DUE TO UNNORMED DIVISOR
|
||||
493 | 1 Unidrive4.asm 474 | Code | 11 | | 1 | 00/05ED : 88 | DEY ;NEXT DIVIDE ITERATION.
|
||||
494 | 1 Unidrive4.asm 475 | Code | 11 | | 2 | 00/05EE : D0 DA | BNE DIV1 ;LOOP UNTIL DONE 23 ITERATIONS.
|
||||
495 | 1 Unidrive4.asm 476 | Code | 11 | | 2 | 00/05F0 : F0 BE | BEQ MDEND ;NORM. QUOTIENT AND CORRECT SIGN.
|
||||
496 | 1 Unidrive4.asm 477 | Code | 11 | | 2 | 00/05F2 : 86 C8 | MD2 STX {$C6}+2
|
||||
497 | 1 Unidrive4.asm 478 | Code | 11 | | 2 | 00/05F4 : 86 C7 | STX {$C6}+1 ;CLEAR MANT1 (3 BYTES) FOR MUL/DIV.
|
||||
498 | 1 Unidrive4.asm 479 | Code | 11 | | 2 | 00/05F6 : 86 C6 | STX {$C6}
|
||||
499 | 1 Unidrive4.asm 480 | Code | 11 | | 2 | 00/05F8 : B0 0D | BCS OVCHK ;IF CALC. SET CARRY,CHECK FOR OVFL
|
||||
500 | 1 Unidrive4.asm 481 | Code | 11 | | 2 | 00/05FA : 30 04 | BMI MD3 ;IF NEG THEN NO UNDERFLOW.
|
||||
501 | 1 Unidrive4.asm 482 | Code | 11 | | 1 | 00/05FC : 68 | PLA ;POP ONE RETURN LEVEL.
|
||||
502 | 1 Unidrive4.asm 483 | Code | 11 | | 1 | 00/05FD : 68 | PLA
|
||||
503 | 1 Unidrive4.asm 484 | Code | 11 | | 2 | 00/05FE : 90 B2 | BCC NORMX ;CLEAR X1 AND RETURN.
|
||||
504 | 1 Unidrive4.asm 485 | Code | 11 | | 2 | 00/0600 : 49 80 | MD3 EOR #$80 ;COMPLEMENT SIGN BIT OF EXPONENT.
|
||||
505 | 1 Unidrive4.asm 486 | Code | 11 | | 2 | 00/0602 : 85 C5 | STA {$C5} ;STORE IT.
|
||||
506 | 1 Unidrive4.asm 487 | Code | 11 | | 2 | 00/0604 : A0 17 | LDY #$17 ;COUNT 24 MUL/23 DIV ITERATIONS.
|
||||
507 | 1 Unidrive4.asm 488 | Code | 11 | | 1 | 00/0606 : 60 | RTS ;RETURN.
|
||||
508 | 1 Unidrive4.asm 489 | Code | 11 | | 2 | 00/0607 : 10 F7 | OVCHK BPL MD3 ;IF POSITIVE EXP THEN NO OVFL.
|
||||
509 | 1 Unidrive4.asm 490 | Code | 11 | | 3 | 00/0609 : 4C 10 0C | OVFL JMP {$C10}
|
||||
510 | 1 Unidrive4.asm 491 | Comment | 11 | | 0 | 00/060C | * ORG $F63D
|
||||
511 | 1 Unidrive4.asm 492 | Code | 11 | | 3 | 00/060C : 20 8D 05 | FIX1 JSR RTAR
|
||||
512 | 1 Unidrive4.asm 493 | Code | 11 | | 2 | 00/060F : A5 C5 | FIX LDA {$C5} ; <------------------------------ fp to int
|
||||
513 | 1 Unidrive4.asm 494 | Code | 11 | | 2 | 00/0611 : 10 13 | BPL UNDFL
|
||||
514 | 1 Unidrive4.asm 495 | Code | 11 | | 2 | 00/0613 : C9 8E | CMP #$8E
|
||||
515 | 1 Unidrive4.asm 496 | Code | 11 | | 2 | 00/0615 : D0 F5 | BNE FIX1
|
||||
516 | 1 Unidrive4.asm 497 | Code | 11 | | 2 | 00/0617 : 24 C6 | BIT {$C6}
|
||||
517 | 1 Unidrive4.asm 498 | Code | 11 | | 2 | 00/0619 : 10 0A | BPL FIXRTS
|
||||
518 | 1 Unidrive4.asm 499 | Code | 11 | | 2 | 00/061B : A5 C8 | LDA {$C6}+2
|
||||
519 | 1 Unidrive4.asm 500 | Code | 11 | | 2 | 00/061D : F0 06 | BEQ FIXRTS
|
||||
520 | 1 Unidrive4.asm 501 | Code | 11 | | 2 | 00/061F : E6 C7 | INC {$C6}+1
|
||||
521 | 1 Unidrive4.asm 502 | Code | 11 | | 2 | 00/0621 : D0 02 | BNE FIXRTS
|
||||
522 | 1 Unidrive4.asm 503 | Code | 11 | | 2 | 00/0623 : E6 C6 | INC {$C6}
|
||||
523 | 1 Unidrive4.asm 504 | Code | 11 | | 1 | 00/0625 : 60 | FIXRTS RTS
|
||||
524 | 1 Unidrive4.asm 505 | Code | 11 | | 2 | 00/0626 : A9 00 | UNDFL LDA #$0
|
||||
525 | 1 Unidrive4.asm 506 | Code | 11 | | 2 | 00/0628 : 85 C6 | STA {$C6}
|
||||
526 | 1 Unidrive4.asm 507 | Code | 11 | | 2 | 00/062A : 85 C7 | STA {$C6}+1
|
||||
527 | 1 Unidrive4.asm 508 | Code | 11 | | 1 | 00/062C : 60 | RTS
|
||||
528 | 1 Unidrive4.asm 509 | Comment | 11 | | 0 | 00/062D | ** Input Dynamic Data append in the end of Unidisk routine **
|
||||
529 | 1 Unidrive4.asm 510 | Data | 11 | | 1 | 00/062D : 00 | FP1 dfb $00
|
||||
530 | 1 Unidrive4.asm 511 | Data | 11 | | 1 | 00/062E : 00 | dfb $00
|
||||
531 | 1 Unidrive4.asm 512 | Data | 11 | | 1 | 00/062F : 00 | dfb $00
|
||||
532 | 1 Unidrive4.asm 513 | Data | 11 | | 1 | 00/0630 : 00 | dfb $00
|
||||
533 | 1 Unidrive4.asm 514 | Comment | 11 | | 0 | 00/0631 | *
|
||||
534 | 1 Unidrive4.asm 515 | Data | 11 | | 1 | 00/0631 : 00 | FP2 dfb $00
|
||||
535 | 1 Unidrive4.asm 516 | Data | 11 | | 1 | 00/0632 : 00 | dfb $00
|
||||
536 | 1 Unidrive4.asm 517 | Data | 11 | | 1 | 00/0633 : 00 | dfb $00
|
||||
537 | 1 Unidrive4.asm 518 | Data | 11 | | 1 | 00/0634 : 00 | dfb $00
|
||||
------+-------------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
|
BIN
AppleII/FP operations/Unidrive4t
Normal file
BIN
AppleII/FP operations/Unidrive4t
Normal file
Binary file not shown.
522
AppleII/FP operations/Unidrive4t.asm
Normal file
522
AppleII/FP operations/Unidrive4t.asm
Normal file
@ -0,0 +1,522 @@
|
||||
*
|
||||
* Unidisk 3.5 Driver <alfa>
|
||||
*
|
||||
* The target of this project is to use the Unidisk 3.5 drive to perform
|
||||
* specific numerical routines (integers and floating point numbers)
|
||||
* calculation in order to use it as a Apple II co-processor unit.
|
||||
*
|
||||
* Copyright (C) 2015 Riccardo Greco <rigreco.grc@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* @com.wudsn.ide.asm.hardware=APPLE2
|
||||
*
|
||||
* Protocol Converter Call
|
||||
XC
|
||||
ZPTempL equ $0006 ;Temporary zero page storage
|
||||
ZPTempH equ $0007
|
||||
** Zero page storage **
|
||||
N1 equ $FA ;25 4 Byte FP FA--FD (FP1)
|
||||
N2 equ $EC ;27 4 Byte FP EC--EF (FP2)
|
||||
; RSLT equ $1D ;29
|
||||
*** Monitor routines ***
|
||||
COut equ $FDED ;Console output ASCII
|
||||
CROut equ $FD8E ;Carriage return
|
||||
** Command Code **
|
||||
StatusCmd equ 0
|
||||
** Status Code **
|
||||
* StatusDIB equ 3
|
||||
StatusUNI equ 5
|
||||
*
|
||||
ControlCmd equ 4
|
||||
** Control Codes **
|
||||
Eject equ 4
|
||||
Run equ 5
|
||||
SetDWLoad equ 6
|
||||
DWLoad equ 7
|
||||
*
|
||||
org $8000
|
||||
*****************************************************
|
||||
|
||||
*
|
||||
* Find a Protocol Converter in one of the slots.
|
||||
START jsr FindPC
|
||||
bcs Error
|
||||
*** Eject ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw E_JECT
|
||||
*** Set Address ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw SET_ADD
|
||||
*
|
||||
jsr EXEC ; Jump the Error routine
|
||||
rts
|
||||
*********************************************
|
||||
Error equ *
|
||||
*
|
||||
* There is either no PC around, or there was no give message
|
||||
*
|
||||
ldx #0
|
||||
err1 equ *
|
||||
lda Message,x
|
||||
beq errout
|
||||
jsr COut
|
||||
inx
|
||||
bne err1
|
||||
*
|
||||
errout equ *
|
||||
rts
|
||||
*
|
||||
Message asc 'NO PC OR NO DEVICE'
|
||||
dfb $8D,0
|
||||
*********************************************
|
||||
*
|
||||
|
||||
** Set the Input Value first in Dynamic data **
|
||||
** 4 Byte N1 to FP1 **
|
||||
EXEC lda N1 ;X1
|
||||
sta $8236 ; Absolute addressing
|
||||
lda N1+1 ;M1 (1)
|
||||
sta $8237
|
||||
lda N1+2 ;M1 (2)
|
||||
sta $8238
|
||||
lda N1+3 ;M1 (3)
|
||||
sta $8239
|
||||
|
||||
** 4 Byte N2 to FP2 **
|
||||
lda N2 ;X2
|
||||
sta $823A
|
||||
lda N2+1 ;M2 (1)
|
||||
sta $823B
|
||||
lda N2+2 ;M2 (2)
|
||||
sta $823C
|
||||
lda N2+3 ;M2 (3)
|
||||
sta $823D
|
||||
|
||||
*** Download ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw DOWNLOAD
|
||||
** Set Unidisk Registers **
|
||||
lda #00 ;First time
|
||||
sta UNIP_val
|
||||
** Execute **
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw EXE
|
||||
** Read **
|
||||
READ jsr Dispatch
|
||||
dfb StatusCmd
|
||||
dw DParms
|
||||
bcs Error
|
||||
*
|
||||
**** Store Output results in //c ****
|
||||
|
||||
* First time execute *
|
||||
lda UNIAcc_reg
|
||||
sta N1
|
||||
lda UNIX_reg
|
||||
sta N1+1 ; Store the result
|
||||
lda UNIY_reg
|
||||
sta N1+2
|
||||
|
||||
** Second time execute **
|
||||
lda #02 ; Second time
|
||||
sta UNIP_val
|
||||
** Execute **
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw EXE
|
||||
** Read **
|
||||
jsr Dispatch
|
||||
dfb StatusCmd
|
||||
dw DParms
|
||||
* bcs Error
|
||||
|
||||
* Second time execute only to read the latest Byte of FP1*
|
||||
lda UNIAcc_reg
|
||||
sta N1+3
|
||||
*
|
||||
rts
|
||||
|
||||
******************************************************
|
||||
FindPC equ *
|
||||
*
|
||||
* Search slot 7 to slot 1 looking for signature bytes
|
||||
*
|
||||
ldx #7 ;Do for seven slots
|
||||
lda #$C7
|
||||
sta ZPTempH
|
||||
lda #$00
|
||||
sta ZPTempL
|
||||
*
|
||||
newslot equ *
|
||||
ldy #7
|
||||
*
|
||||
again equ *
|
||||
lda (ZPTempL),y
|
||||
cmp sigtab,y ;One for byte signature
|
||||
beq maybe ;Found one signature byte
|
||||
dec ZPTempH
|
||||
dex
|
||||
bne newslot
|
||||
*
|
||||
* if we get here, no PC find
|
||||
sec
|
||||
rts
|
||||
*
|
||||
* if we get here, no byte find on PC
|
||||
maybe equ *
|
||||
dey
|
||||
dey ;if N=1 then all sig bytes OK
|
||||
bpl again
|
||||
* Found PC interface. Set up call address.
|
||||
* we already have high byte ($CN), we need low byte
|
||||
*
|
||||
foundPC equ *
|
||||
lda #$FF
|
||||
sta ZPTempL
|
||||
ldy #0 ;For indirect load
|
||||
lda (ZPTempL),y ;Get the byte
|
||||
*
|
||||
* Now the Acc has the low oreder ProDOS entry point.
|
||||
* The PC entry is three locations past this ...
|
||||
*
|
||||
clc
|
||||
adc #3
|
||||
sta ZPTempL
|
||||
*
|
||||
* Now ZPTempL has PC entry point.
|
||||
* Return with carry clear.
|
||||
*
|
||||
clc
|
||||
rts
|
||||
***********************************************************
|
||||
*
|
||||
* There are the PC signature bytes in their relative order.
|
||||
* The $FF bytes are filler bytes and are not compared.
|
||||
*
|
||||
sigtab dfb $FF,$20,$FF,$00
|
||||
dfb $FF,$03,$FF,$00
|
||||
*
|
||||
Dispatch equ *
|
||||
jmp (ZPTempL) ;Simulate an indirect JSR to PC
|
||||
*
|
||||
*** Status Parameter Set for UNI ***
|
||||
DParms equ *
|
||||
DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
DPUnit dfb 1
|
||||
DPBuffer dw UNI
|
||||
DPStatCode dfb StatusUNI
|
||||
*
|
||||
*
|
||||
*
|
||||
*** Status List UNI ***
|
||||
UNI equ *
|
||||
dfb 0
|
||||
UNIError dfb 0
|
||||
UNIRetries dfb 0
|
||||
UNIAcc_reg dfb 0
|
||||
UNIX_reg dfb 0
|
||||
UNIY_reg dfb 0
|
||||
UNIP_val dfb 0
|
||||
HHH dfb 0
|
||||
*
|
||||
*** Set Address ***
|
||||
SET_ADD equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST3
|
||||
dfb SetDWLoad
|
||||
*
|
||||
*** Download ***
|
||||
DOWNLOAD equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST4
|
||||
dfb DWLoad
|
||||
*
|
||||
*** Execute ***
|
||||
EXE equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST2
|
||||
dfb Run
|
||||
*** Eject ***
|
||||
E_JECT equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST1
|
||||
dfb Eject
|
||||
*
|
||||
******** CONTROL LISTS ********
|
||||
*
|
||||
*
|
||||
*** Eject ***
|
||||
CNTL_LIST1 equ *
|
||||
dw $0000
|
||||
*
|
||||
*** Execute ***
|
||||
CNTL_LIST2 equ *
|
||||
Clow_byte dfb $06
|
||||
Chigh_byte dfb $00
|
||||
AccValue dfb $00 ; Init Value Unidisk Accumulator Register
|
||||
X_reg dfb $00 ; Init Value Unidisk X Register
|
||||
Y_reg dfb $00 ; Init Value Unidisk Y Register
|
||||
ProStatus dfb $00 ; Init Value Unidisk Status Register
|
||||
LowPC_reg dfb $00 ; Init Value Unidisk Program Counter $0500
|
||||
HighPC_reg dfb $05
|
||||
*
|
||||
*** Set Address ***
|
||||
CNTL_LIST3 equ *
|
||||
CountL_byte dfb $02
|
||||
CountH_byte dfb $00
|
||||
LByte_Addr dfb $00 ; ORG of Unidisk program, set begin program address $0500
|
||||
HByte_Addr dfb $05
|
||||
*
|
||||
*** Download ***
|
||||
CNTL_LIST4 equ *
|
||||
LenghtL_byte dfb $36 ;<----- Lenght of Unidisk program Lo - Byte 312 byte
|
||||
LenghtH_byte dfb $01 ;<----- Lenght of Unidisk program Hi Byte
|
||||
*
|
||||
**************** Start UNIDISK Program ****************
|
||||
*
|
||||
org $0500 ; Start Unidisk program address
|
||||
|
||||
SIGN EQU $C0 ;$EB ; $F3
|
||||
|
||||
** FP2 4 Bytes **
|
||||
X2 EQU $C1 ;$EC ; $F4
|
||||
M2 EQU $C2 ;$ED ; $F5 - $F7
|
||||
|
||||
** FP1 4 Bytes + E extension **
|
||||
X1 EQU $C5 ;$FA ; $F8
|
||||
M1 EQU $C6 ;$FB ; $F9 - $FB
|
||||
E EQU $C9 ;$FE ; $FC
|
||||
|
||||
OVLOC EQU $C10 ;$3F5 ;Overflow routine is not implemented at now)
|
||||
*
|
||||
** Main program **
|
||||
*
|
||||
* CHK if is the second execution *
|
||||
|
||||
* cmp #01
|
||||
beq SECOND ;Only to read the rest part of result
|
||||
|
||||
** Input data to Zero Page **
|
||||
|
||||
** FP1 **
|
||||
lda FP1
|
||||
sta X1
|
||||
|
||||
lda FP1+1
|
||||
sta M1
|
||||
lda FP1+2
|
||||
sta M1+1
|
||||
lda FP1+3
|
||||
sta M1+2
|
||||
|
||||
** FP2 **
|
||||
lda FP2
|
||||
sta X2
|
||||
|
||||
lda FP2+1
|
||||
sta M2
|
||||
lda FP2+2
|
||||
sta M2+1
|
||||
lda FP2+3
|
||||
sta M2+2
|
||||
|
||||
************************** Target Function ***********************
|
||||
* Y=N1+N2 *
|
||||
******************************************************************
|
||||
*
|
||||
** Simple ADD **
|
||||
jsr FADD ; Call FP routine
|
||||
|
||||
*** Output Data result FP1 to Unidisk registers First Time first 3 Byte out ***
|
||||
lda X1
|
||||
ldx M1
|
||||
ldy M1+1
|
||||
|
||||
rts
|
||||
*** Output Data result FP1 to Unidisk registers Second Time latest 1 Byte out ***
|
||||
SECOND lda M1+2
|
||||
|
||||
rts
|
||||
***************************************************
|
||||
*
|
||||
***************** FP Routine *****************
|
||||
*
|
||||
***********************
|
||||
* *
|
||||
* APPLE-II FLOATING *
|
||||
* POINT ROUTINES *
|
||||
* *
|
||||
* COPYRIGHT 1977 BY *
|
||||
* APPLE COMPUTER INC. *
|
||||
* *
|
||||
* ALL RIGHTS RESERVED *
|
||||
* *
|
||||
* S. WOZNIAK *
|
||||
* *
|
||||
***********************
|
||||
* TITLE "FLOATING POINT ROUTINES for Unidisk memory"
|
||||
*
|
||||
|
||||
* ORG $300
|
||||
|
||||
ADD CLC ;CLEAR CARRY
|
||||
LDX #$2 ;INDEX FOR 3-BYTE ADD.
|
||||
ADD1 LDA M1,X
|
||||
ADC M2,X ;ADD A BYTE OF MANT2 TO MANT1
|
||||
STA M1,X
|
||||
DEX ;INDEX TO NEXT MORE SIGNIF. BYTE.
|
||||
BPL ADD1 ;LOOP UNTIL DONE.
|
||||
RTS ;RETURN
|
||||
MD1 ASL SIGN ;CLEAR LSB OF SIGN.
|
||||
JSR ABSWAP ;ABS VAL OF M1, THEN SWAP WITH M2
|
||||
ABSWAP BIT M1 ;MANT1 NEGATIVE?
|
||||
BPL ABSWAP1 ;NO, SWAP WITH MANT2 AND RETURN.
|
||||
JSR FCOMPL ;YES, COMPLEMENT IT.
|
||||
INC SIGN ;INCR SIGN, COMPLEMENTING LSB.
|
||||
ABSWAP1 SEC ;SET CARRY FOR RETURN TO MUL/DIV.
|
||||
SWAP LDX #$4 ;INDEX FOR 4 BYTE SWAP.
|
||||
SWAP1 STY E-1,X
|
||||
LDA X1-1,X ;SWAP A BYTE OF EXP/MANT1 WITH
|
||||
LDY X2-1,X ;EXP/MANT2 AND LEAVE A COPY OF
|
||||
STY X1-1,X ;MANT1 IN E (3 BYTES). E+3 USED
|
||||
STA X2-1,X
|
||||
DEX ;ADVANCE INDEX TO NEXT BYTE
|
||||
BNE SWAP1 ;LOOP UNTIL DONE.
|
||||
RTS ;RETURN
|
||||
FLOAT LDA #$8E ;INIT EXP1 TO 14, <--------------- int to fp
|
||||
STA X1 ;THEN NORMALIZE TO FLOAT.
|
||||
NORM1 LDA M1 ;HIGH-ORDER MANT1 BYTE.
|
||||
CMP #$C0 ;UPPER TWO BITS UNEQUAL?
|
||||
BMI RTS1 ;YES, RETURN WITH MANT1 NORMALIZED
|
||||
DEC X1 ;DECREMENT EXP1.
|
||||
ASL M1+2
|
||||
ROL M1+1 ;SHIFT MANT1 (3 BYTES) LEFT.
|
||||
ROL M1
|
||||
NORM LDA X1 ;EXP1 ZERO?
|
||||
BNE NORM1 ;NO, CONTINUE NORMALIZING.
|
||||
RTS1 RTS ;RETURN.
|
||||
FSUB JSR FCOMPL ;CMPL MANT1,CLEARS CARRY UNLESS 0 <---- sub
|
||||
SWPALGN JSR ALGNSWP ;RIGHT SHIFT MANT1 OR SWAP WITH
|
||||
FADD LDA X2 ;<------------------------------------- add
|
||||
CMP X1 ;COMPARE EXP1 WITH EXP2.
|
||||
BNE SWPALGN ;IF #,SWAP ADDENDS OR ALIGN MANTS.
|
||||
JSR ADD ;ADD ALIGNED MANTISSAS.
|
||||
ADDEND BVC NORM ;NO OVERFLOW, NORMALIZE RESULT.
|
||||
BVS RTLOG ;OV: SHIFT M1 RIGHT, CARRY INTO SIGN
|
||||
ALGNSWP BCC SWAP ;SWAP IF CARRY CLEAR,
|
||||
* ELSE SHIFT RIGHT ARITH.
|
||||
RTAR LDA M1 ;SIGN OF MANT1 INTO CARRY FOR
|
||||
ASL ;RIGHT ARITH SHIFT.
|
||||
RTLOG INC X1 ;INCR X1 TO ADJUST FOR RIGHT SHIFT
|
||||
BEQ OVFL ;EXP1 OUT OF RANGE.
|
||||
RTLOG1 LDX #$FA ;INDEX FOR 6:BYTE RIGHT SHIFT.
|
||||
ROR1 ROR E+3,X
|
||||
INX ;NEXT BYTE OF SHIFT.
|
||||
BNE ROR1 ;LOOP UNTIL DONE.
|
||||
RTS ;RETURN.
|
||||
FMUL JSR MD1 ;ABS VAL OF MANT1, MANT2 <-------------- mul
|
||||
ADC X1 ;ADD EXP1 TO EXP2 FOR PRODUCT EXP
|
||||
JSR MD2 ;CHECK PROD. EXP AND PREP. FOR MUL
|
||||
CLC ;CLEAR CARRY FOR FIRST BIT.
|
||||
MUL1 JSR RTLOG1 ;M1 AND E RIGHT (PROD AND MPLIER)
|
||||
BCC MUL2 ;IF CARRY CLEAR, SKIP PARTIAL PROD
|
||||
JSR ADD ;ADD MULTIPLICAND TO PRODUCT.
|
||||
MUL2 DEY ;NEXT MUL ITERATION.
|
||||
BPL MUL1 ;LOOP UNTIL DONE.
|
||||
MDEND LSR SIGN ;TEST SIGN LSB.
|
||||
NORMX BCC NORM ;IF EVEN,NORMALIZE PROD,ELSE COMP
|
||||
FCOMPL SEC ;SET CARRY FOR SUBTRACT. <--------------- not
|
||||
LDX #$3 ;INDEX FOR 3 BYTE SUBTRACT.
|
||||
COMPL1 LDA #$0 ;CLEAR A.
|
||||
SBC X1,X ;SUBTRACT BYTE OF EXP1.
|
||||
STA X1,X ;RESTORE IT.
|
||||
DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
BNE COMPL1 ;LOOP UNTIL DONE.
|
||||
BEQ ADDEND ;NORMALIZE (OR SHIFT RT IF OVFL).
|
||||
FDIV JSR MD1 ;TAKE ABS VAL OF MANT1, MANT2. <--------- div
|
||||
SBC X1 ;SUBTRACT EXP1 FROM EXP2.
|
||||
JSR MD2 ;SAVE AS QUOTIENT EXP.
|
||||
DIV1 SEC ;SET CARRY FOR SUBTRACT.
|
||||
LDX #$2 ;INDEX FOR 3-BYTE SUBTRACTION.
|
||||
DIV2 LDA M2,X
|
||||
SBC E,X ;SUBTRACT A BYTE OF E FROM MANT2.
|
||||
PHA ;SAVE ON STACK.
|
||||
DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
BPL DIV2 ;LOOP UNTIL DONE.
|
||||
LDX #$FD ;INDEX FOR 3-BYTE CONDITIONAL MOVE
|
||||
DIV3 PLA ;PULL BYTE OF DIFFERENCE OFF STACK
|
||||
BCC DIV4 ;IF M2<E THEN DON'T RESTORE M2.
|
||||
STA M2+3,X
|
||||
DIV4 INX ;NEXT LESS SIGNIFICANT BYTE.
|
||||
BNE DIV3 ;LOOP UNTIL DONE.
|
||||
ROL M1+2
|
||||
ROL M1+1 ;ROLL QUOTIENT LEFT, CARRY INTO LSB
|
||||
ROL M1
|
||||
ASL M2+2
|
||||
ROL M2+1 ;SHIFT DIVIDEND LEFT
|
||||
ROL M2
|
||||
BCS OVFL ;OVFL IS DUE TO UNNORMED DIVISOR
|
||||
DEY ;NEXT DIVIDE ITERATION.
|
||||
BNE DIV1 ;LOOP UNTIL DONE 23 ITERATIONS.
|
||||
BEQ MDEND ;NORM. QUOTIENT AND CORRECT SIGN.
|
||||
MD2 STX M1+2
|
||||
STX M1+1 ;CLEAR MANT1 (3 BYTES) FOR MUL/DIV.
|
||||
STX M1
|
||||
BCS OVCHK ;IF CALC. SET CARRY,CHECK FOR OVFL
|
||||
BMI MD3 ;IF NEG THEN NO UNDERFLOW.
|
||||
PLA ;POP ONE RETURN LEVEL.
|
||||
PLA
|
||||
BCC NORMX ;CLEAR X1 AND RETURN.
|
||||
MD3 EOR #$80 ;COMPLEMENT SIGN BIT OF EXPONENT.
|
||||
STA X1 ;STORE IT.
|
||||
LDY #$17 ;COUNT 24 MUL/23 DIV ITERATIONS.
|
||||
RTS ;RETURN.
|
||||
OVCHK BPL MD3 ;IF POSITIVE EXP THEN NO OVFL.
|
||||
OVFL JMP OVLOC
|
||||
* ORG $F63D
|
||||
FIX1 JSR RTAR
|
||||
FIX LDA X1 ; <------------------------------ fp to int
|
||||
BPL UNDFL
|
||||
CMP #$8E
|
||||
BNE FIX1
|
||||
BIT M1
|
||||
BPL FIXRTS
|
||||
LDA M1+2
|
||||
BEQ FIXRTS
|
||||
INC M1+1
|
||||
BNE FIXRTS
|
||||
INC M1
|
||||
FIXRTS RTS
|
||||
UNDFL LDA #$0
|
||||
STA M1
|
||||
STA M1+1
|
||||
RTS
|
||||
** Input Dynamic Data append in the end of Unidisk routine **
|
||||
FP1 dfb $00
|
||||
dfb $00
|
||||
dfb $00
|
||||
dfb $00
|
||||
*
|
||||
FP2 dfb $00
|
||||
dfb $00
|
||||
dfb $00
|
||||
dfb $00
|
549
AppleII/FP operations/Unidrive4t_Output.txt
Normal file
549
AppleII/FP operations/Unidrive4t_Output.txt
Normal file
@ -0,0 +1,549 @@
|
||||
------+--------------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
Line | # File Line | Line Type | MX | Reloc | Size | Address Object Code | Source Code
|
||||
------+--------------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
1 | 1 Unidrive4t.asm 1 | Comment | 11 | | 0 | 00/8000 | *
|
||||
2 | 1 Unidrive4t.asm 2 | Comment | 11 | | 0 | 00/8000 | * Unidisk 3.5 Driver <alfa>
|
||||
3 | 1 Unidrive4t.asm 3 | Comment | 11 | | 0 | 00/8000 | *
|
||||
4 | 1 Unidrive4t.asm 4 | Comment | 11 | | 0 | 00/8000 | * The target of this project is to use the Unidisk 3.5 drive to perform
|
||||
5 | 1 Unidrive4t.asm 5 | Comment | 11 | | 0 | 00/8000 | * specific numerical routines (integers and floating point numbers)
|
||||
6 | 1 Unidrive4t.asm 6 | Comment | 11 | | 0 | 00/8000 | * calculation in order to use it as a Apple II co-processor unit.
|
||||
7 | 1 Unidrive4t.asm 7 | Comment | 11 | | 0 | 00/8000 | *
|
||||
8 | 1 Unidrive4t.asm 8 | Comment | 11 | | 0 | 00/8000 | * Copyright (C) 2015 Riccardo Greco <rigreco.grc@gmail.com>.
|
||||
9 | 1 Unidrive4t.asm 9 | Comment | 11 | | 0 | 00/8000 | *
|
||||
10 | 1 Unidrive4t.asm 10 | Comment | 11 | | 0 | 00/8000 | * This program is free software: you can redistribute it and/or modify
|
||||
11 | 1 Unidrive4t.asm 11 | Comment | 11 | | 0 | 00/8000 | * it under the terms of the GNU General Public License as published by
|
||||
12 | 1 Unidrive4t.asm 12 | Comment | 11 | | 0 | 00/8000 | * the Free Software Foundation, either version 3 of the License, or
|
||||
13 | 1 Unidrive4t.asm 13 | Comment | 11 | | 0 | 00/8000 | * (at your option) any later version.
|
||||
14 | 1 Unidrive4t.asm 14 | Comment | 11 | | 0 | 00/8000 | * This program is distributed in the hope that it will be useful,
|
||||
15 | 1 Unidrive4t.asm 15 | Comment | 11 | | 0 | 00/8000 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
16 | 1 Unidrive4t.asm 16 | Comment | 11 | | 0 | 00/8000 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
17 | 1 Unidrive4t.asm 17 | Comment | 11 | | 0 | 00/8000 | * GNU General Public License for more details.
|
||||
18 | 1 Unidrive4t.asm 18 | Comment | 11 | | 0 | 00/8000 | * You should have received a copy of the GNU General Public License
|
||||
19 | 1 Unidrive4t.asm 19 | Comment | 11 | | 0 | 00/8000 | * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
20 | 1 Unidrive4t.asm 20 | Comment | 11 | | 0 | 00/8000 | *
|
||||
21 | 1 Unidrive4t.asm 21 | Comment | 11 | | 0 | 00/8000 | *
|
||||
22 | 1 Unidrive4t.asm 22 | Comment | 11 | | 0 | 00/8000 | * @com.wudsn.ide.asm.hardware=APPLE2
|
||||
23 | 1 Unidrive4t.asm 23 | Comment | 11 | | 0 | 00/8000 | *
|
||||
24 | 1 Unidrive4t.asm 24 | Comment | 11 | | 0 | 00/8000 | * Protocol Converter Call
|
||||
25 | 1 Unidrive4t.asm 25 | Directive | 11 | | 0 | 00/8000 | XC
|
||||
26 | 1 Unidrive4t.asm 26 | Equivalence | 11 | | 0 | 00/8000 | ZPTempL equ $0006 ;Temporary zero page storage
|
||||
27 | 1 Unidrive4t.asm 27 | Equivalence | 11 | | 0 | 00/8000 | ZPTempH equ $0007
|
||||
28 | 1 Unidrive4t.asm 28 | Comment | 11 | | 0 | 00/8000 | ** Zero page storage **
|
||||
29 | 1 Unidrive4t.asm 29 | Equivalence | 11 | | 0 | 00/8000 | N1 equ $FA ;25 4 Byte FP FA--FD (FP1)
|
||||
30 | 1 Unidrive4t.asm 30 | Equivalence | 11 | | 0 | 00/8000 | N2 equ $EC ;27 4 Byte FP EC--EF (FP2)
|
||||
31 | 1 Unidrive4t.asm 31 | Comment | 11 | | 0 | 00/8000 | ; RSLT equ $1D ;29
|
||||
32 | 1 Unidrive4t.asm 32 | Comment | 11 | | 0 | 00/8000 | *** Monitor routines ***
|
||||
33 | 1 Unidrive4t.asm 33 | Equivalence | 11 | | 0 | 00/8000 | COut equ $FDED ;Console output ASCII
|
||||
34 | 1 Unidrive4t.asm 34 | Equivalence | 11 | | 0 | 00/8000 | CROut equ $FD8E ;Carriage return
|
||||
35 | 1 Unidrive4t.asm 35 | Comment | 11 | | 0 | 00/8000 | ** Command Code **
|
||||
36 | 1 Unidrive4t.asm 36 | Equivalence | 11 | | 0 | 00/8000 | StatusCmd equ 0
|
||||
37 | 1 Unidrive4t.asm 37 | Comment | 11 | | 0 | 00/8000 | ** Status Code **
|
||||
38 | 1 Unidrive4t.asm 38 | Comment | 11 | | 0 | 00/8000 | * StatusDIB equ 3
|
||||
39 | 1 Unidrive4t.asm 39 | Equivalence | 11 | | 0 | 00/8000 | StatusUNI equ 5
|
||||
40 | 1 Unidrive4t.asm 40 | Comment | 11 | | 0 | 00/8000 | *
|
||||
41 | 1 Unidrive4t.asm 41 | Equivalence | 11 | | 0 | 00/8000 | ControlCmd equ 4
|
||||
42 | 1 Unidrive4t.asm 42 | Comment | 11 | | 0 | 00/8000 | ** Control Codes **
|
||||
43 | 1 Unidrive4t.asm 43 | Equivalence | 11 | | 0 | 00/8000 | Eject equ 4
|
||||
44 | 1 Unidrive4t.asm 44 | Equivalence | 11 | | 0 | 00/8000 | Run equ 5
|
||||
45 | 1 Unidrive4t.asm 45 | Equivalence | 11 | | 0 | 00/8000 | SetDWLoad equ 6
|
||||
46 | 1 Unidrive4t.asm 46 | Equivalence | 11 | | 0 | 00/8000 | DWLoad equ 7
|
||||
47 | 1 Unidrive4t.asm 47 | Comment | 11 | | 0 | 00/8000 | *
|
||||
48 | 1 Unidrive4t.asm 48 | Directive | 11 | | 0 | 00/8000 | org $8000
|
||||
49 | 1 Unidrive4t.asm 49 | Comment | 11 | | 0 | 00/8000 | *****************************************************
|
||||
50 | 1 Unidrive4t.asm 50 | Empty | 11 | | 0 | 00/8000 |
|
||||
51 | 1 Unidrive4t.asm 51 | Comment | 11 | | 0 | 00/8000 | *
|
||||
52 | 1 Unidrive4t.asm 52 | Comment | 11 | | 0 | 00/8000 | * Find a Protocol Converter in one of the slots.
|
||||
53 | 1 Unidrive4t.asm 53 | Code | 11 | | 3 | 00/8000 : 20 9E 80 | START jsr {ozunid_4}
|
||||
54 | 1 Unidrive4t.asm 54 | Code | 11 | | 2 | 00/8003 : B0 10 | bcs {ozunid_1}
|
||||
55 | 1 Unidrive4t.asm 55 | Comment | 11 | | 0 | 00/8005 | *** Eject ***
|
||||
56 | 1 Unidrive4t.asm 56 | Code | 11 | | 3 | 00/8005 : 20 D3 80 | jsr {ozunid_9}
|
||||
57 | 1 Unidrive4t.asm 57 | Data | 11 | | 1 | 00/8008 : 04 | dfb {4}
|
||||
58 | 1 Unidrive4t.asm 58 | Data | 11 | | 2 | 00/8009 : F2 80 | dw {ozunid_15}
|
||||
59 | 1 Unidrive4t.asm 59 | Comment | 11 | | 0 | 00/800B | *** Set Address ***
|
||||
60 | 1 Unidrive4t.asm 60 | Code | 11 | | 3 | 00/800B : 20 D3 80 | jsr {ozunid_9}
|
||||
61 | 1 Unidrive4t.asm 61 | Data | 11 | | 1 | 00/800E : 04 | dfb {4}
|
||||
62 | 1 Unidrive4t.asm 62 | Data | 11 | | 2 | 00/800F : E3 80 | dw {ozunid_12}
|
||||
63 | 1 Unidrive4t.asm 63 | Comment | 11 | | 0 | 00/8011 | *
|
||||
64 | 1 Unidrive4t.asm 64 | Code | 11 | | 3 | 00/8011 : 20 37 80 | jsr EXEC ; Jump the Error routine
|
||||
65 | 1 Unidrive4t.asm 65 | Code | 11 | | 1 | 00/8014 : 60 | rts
|
||||
66 | 1 Unidrive4t.asm 66 | Comment | 11 | | 0 | 00/8015 | *********************************************
|
||||
67 | 1 Unidrive4t.asm 67 | Empty | 11 | | 0 | 00/8015 | ozunid_1
|
||||
68 | 1 Unidrive4t.asm 67 | Equivalence | 11 | | 0 | 00/8015 | Error equ ozunid_1
|
||||
69 | 1 Unidrive4t.asm 68 | Comment | 11 | | 0 | 00/8015 | *
|
||||
70 | 1 Unidrive4t.asm 69 | Comment | 11 | | 0 | 00/8015 | * There is either no PC around, or there was no give message
|
||||
71 | 1 Unidrive4t.asm 70 | Comment | 11 | | 0 | 00/8015 | *
|
||||
72 | 1 Unidrive4t.asm 71 | Code | 11 | | 2 | 00/8015 : A2 00 | ldx #0
|
||||
73 | 1 Unidrive4t.asm 72 | Empty | 11 | | 0 | 00/8017 | ozunid_2
|
||||
74 | 1 Unidrive4t.asm 72 | Equivalence | 11 | | 0 | 00/8017 | err1 equ ozunid_2
|
||||
75 | 1 Unidrive4t.asm 73 | Code | 11 | | 3 | 00/8017 : BD 23 80 | lda Message,x
|
||||
76 | 1 Unidrive4t.asm 74 | Code | 11 | | 2 | 00/801A : F0 06 | beq {ozunid_3}
|
||||
77 | 1 Unidrive4t.asm 75 | Code | 11 | | 3 | 00/801C : 20 ED FD | jsr {$FDED}
|
||||
78 | 1 Unidrive4t.asm 76 | Code | 11 | | 1 | 00/801F : E8 | inx
|
||||
79 | 1 Unidrive4t.asm 77 | Code | 11 | | 2 | 00/8020 : D0 F5 | bne {ozunid_2}
|
||||
80 | 1 Unidrive4t.asm 78 | Comment | 11 | | 0 | 00/8022 | *
|
||||
81 | 1 Unidrive4t.asm 79 | Empty | 11 | | 0 | 00/8022 | ozunid_3
|
||||
82 | 1 Unidrive4t.asm 79 | Equivalence | 11 | | 0 | 00/8022 | errout equ ozunid_3
|
||||
83 | 1 Unidrive4t.asm 80 | Code | 11 | | 1 | 00/8022 : 60 | rts
|
||||
84 | 1 Unidrive4t.asm 81 | Comment | 11 | | 0 | 00/8023 | *
|
||||
85 | 1 Unidrive4t.asm 82 | Data | 11 | | 18 | 00/8023 : 4E 4F 20 50 | Message asc 'NO PC OR NO DEVICE'
|
||||
| | | | | | 43 20 4F 52 |
|
||||
| | | | | | 20 4E 4F 20 |
|
||||
| | | | | | 44 45 56 49 |
|
||||
| | | | | | 43 45 |
|
||||
86 | 1 Unidrive4t.asm 83 | Data | 11 | | 2 | 00/8035 : 8D 00 | dfb $8D,0
|
||||
87 | 1 Unidrive4t.asm 84 | Comment | 11 | | 0 | 00/8037 | *********************************************
|
||||
88 | 1 Unidrive4t.asm 85 | Comment | 11 | | 0 | 00/8037 | *
|
||||
89 | 1 Unidrive4t.asm 86 | Empty | 11 | | 0 | 00/8037 |
|
||||
90 | 1 Unidrive4t.asm 87 | Comment | 11 | | 0 | 00/8037 | ** Set the Input Value first in Dynamic data **
|
||||
91 | 1 Unidrive4t.asm 88 | Comment | 11 | | 0 | 00/8037 | ** 4 Byte N1 to FP1 **
|
||||
92 | 1 Unidrive4t.asm 89 | Code | 11 | | 2 | 00/8037 : A5 FA | EXEC lda {$FA} ;X1
|
||||
93 | 1 Unidrive4t.asm 90 | Code | 11 | | 3 | 00/8039 : 8D 36 82 | sta $8236 ; Absolute addressing
|
||||
94 | 1 Unidrive4t.asm 91 | Code | 11 | | 2 | 00/803C : A5 FB | lda {$FA}+1 ;M1 (1)
|
||||
95 | 1 Unidrive4t.asm 92 | Code | 11 | | 3 | 00/803E : 8D 37 82 | sta $8237
|
||||
96 | 1 Unidrive4t.asm 93 | Code | 11 | | 2 | 00/8041 : A5 FC | lda {$FA}+2 ;M1 (2)
|
||||
97 | 1 Unidrive4t.asm 94 | Code | 11 | | 3 | 00/8043 : 8D 38 82 | sta $8238
|
||||
98 | 1 Unidrive4t.asm 95 | Code | 11 | | 2 | 00/8046 : A5 FD | lda {$FA}+3 ;M1 (3)
|
||||
99 | 1 Unidrive4t.asm 96 | Code | 11 | | 3 | 00/8048 : 8D 39 82 | sta $8239
|
||||
100 | 1 Unidrive4t.asm 97 | Empty | 11 | | 0 | 00/804B |
|
||||
101 | 1 Unidrive4t.asm 98 | Comment | 11 | | 0 | 00/804B | ** 4 Byte N2 to FP2 **
|
||||
102 | 1 Unidrive4t.asm 99 | Code | 11 | | 2 | 00/804B : A5 EC | lda {$EC} ;X2
|
||||
103 | 1 Unidrive4t.asm 100 | Code | 11 | | 3 | 00/804D : 8D 3A 82 | sta $823A
|
||||
104 | 1 Unidrive4t.asm 101 | Code | 11 | | 2 | 00/8050 : A5 ED | lda {$EC}+1 ;M2 (1)
|
||||
105 | 1 Unidrive4t.asm 102 | Code | 11 | | 3 | 00/8052 : 8D 3B 82 | sta $823B
|
||||
106 | 1 Unidrive4t.asm 103 | Code | 11 | | 2 | 00/8055 : A5 EE | lda {$EC}+2 ;M2 (2)
|
||||
107 | 1 Unidrive4t.asm 104 | Code | 11 | | 3 | 00/8057 : 8D 3C 82 | sta $823C
|
||||
108 | 1 Unidrive4t.asm 105 | Code | 11 | | 2 | 00/805A : A5 EF | lda {$EC}+3 ;M2 (3)
|
||||
109 | 1 Unidrive4t.asm 106 | Code | 11 | | 3 | 00/805C : 8D 3D 82 | sta $823D
|
||||
110 | 1 Unidrive4t.asm 107 | Empty | 11 | | 0 | 00/805F |
|
||||
111 | 1 Unidrive4t.asm 108 | Comment | 11 | | 0 | 00/805F | *** Download ***
|
||||
112 | 1 Unidrive4t.asm 109 | Code | 11 | | 3 | 00/805F : 20 D3 80 | jsr {ozunid_9}
|
||||
113 | 1 Unidrive4t.asm 110 | Data | 11 | | 1 | 00/8062 : 04 | dfb {4}
|
||||
114 | 1 Unidrive4t.asm 111 | Data | 11 | | 2 | 00/8063 : E8 80 | dw {ozunid_13}
|
||||
115 | 1 Unidrive4t.asm 112 | Comment | 11 | | 0 | 00/8065 | ** Set Unidisk Registers **
|
||||
116 | 1 Unidrive4t.asm 113 | Code | 11 | | 2 | 00/8065 : A9 00 | lda #00 ;First time
|
||||
117 | 1 Unidrive4t.asm 114 | Code | 11 | | 3 | 00/8067 : 8D E1 80 | sta UNIP_val
|
||||
118 | 1 Unidrive4t.asm 115 | Comment | 11 | | 0 | 00/806A | ** Execute **
|
||||
119 | 1 Unidrive4t.asm 116 | Code | 11 | | 3 | 00/806A : 20 D3 80 | jsr {ozunid_9}
|
||||
120 | 1 Unidrive4t.asm 117 | Data | 11 | | 1 | 00/806D : 04 | dfb {4}
|
||||
121 | 1 Unidrive4t.asm 118 | Data | 11 | | 2 | 00/806E : ED 80 | dw {ozunid_14}
|
||||
122 | 1 Unidrive4t.asm 119 | Comment | 11 | | 0 | 00/8070 | ** Read **
|
||||
123 | 1 Unidrive4t.asm 120 | Code | 11 | | 3 | 00/8070 : 20 D3 80 | READ jsr {ozunid_9}
|
||||
124 | 1 Unidrive4t.asm 121 | Data | 11 | | 1 | 00/8073 : 00 | dfb {0}
|
||||
125 | 1 Unidrive4t.asm 122 | Data | 11 | | 2 | 00/8074 : D6 80 | dw {ozunid_10}
|
||||
126 | 1 Unidrive4t.asm 123 | Code | 11 | | 2 | 00/8076 : B0 9D | bcs {ozunid_1}
|
||||
127 | 1 Unidrive4t.asm 124 | Comment | 11 | | 0 | 00/8078 | *
|
||||
128 | 1 Unidrive4t.asm 125 | Comment | 11 | | 0 | 00/8078 | **** Store Output results in //c ****
|
||||
129 | 1 Unidrive4t.asm 126 | Empty | 11 | | 0 | 00/8078 |
|
||||
130 | 1 Unidrive4t.asm 127 | Comment | 11 | | 0 | 00/8078 | * First time execute *
|
||||
131 | 1 Unidrive4t.asm 128 | Code | 11 | | 3 | 00/8078 : AD DE 80 | lda UNIAcc_reg
|
||||
132 | 1 Unidrive4t.asm 129 | Code | 11 | | 2 | 00/807B : 85 FA | sta {$FA}
|
||||
133 | 1 Unidrive4t.asm 130 | Code | 11 | | 3 | 00/807D : AD DF 80 | lda UNIX_reg
|
||||
134 | 1 Unidrive4t.asm 131 | Code | 11 | | 2 | 00/8080 : 85 FB | sta {$FA}+1 ; Store the result
|
||||
135 | 1 Unidrive4t.asm 132 | Code | 11 | | 3 | 00/8082 : AD E0 80 | lda UNIY_reg
|
||||
136 | 1 Unidrive4t.asm 133 | Code | 11 | | 2 | 00/8085 : 85 FC | sta {$FA}+2
|
||||
137 | 1 Unidrive4t.asm 134 | Empty | 11 | | 0 | 00/8087 |
|
||||
138 | 1 Unidrive4t.asm 135 | Comment | 11 | | 0 | 00/8087 | ** Second time execute **
|
||||
139 | 1 Unidrive4t.asm 136 | Code | 11 | | 2 | 00/8087 : A9 02 | lda #02 ; Second time
|
||||
140 | 1 Unidrive4t.asm 137 | Code | 11 | | 3 | 00/8089 : 8D E1 80 | sta UNIP_val
|
||||
141 | 1 Unidrive4t.asm 138 | Comment | 11 | | 0 | 00/808C | ** Execute **
|
||||
142 | 1 Unidrive4t.asm 139 | Code | 11 | | 3 | 00/808C : 20 D3 80 | jsr {ozunid_9}
|
||||
143 | 1 Unidrive4t.asm 140 | Data | 11 | | 1 | 00/808F : 04 | dfb {4}
|
||||
144 | 1 Unidrive4t.asm 141 | Data | 11 | | 2 | 00/8090 : ED 80 | dw {ozunid_14}
|
||||
145 | 1 Unidrive4t.asm 142 | Comment | 11 | | 0 | 00/8092 | ** Read **
|
||||
146 | 1 Unidrive4t.asm 143 | Code | 11 | | 3 | 00/8092 : 20 D3 80 | jsr {ozunid_9}
|
||||
147 | 1 Unidrive4t.asm 144 | Data | 11 | | 1 | 00/8095 : 00 | dfb {0}
|
||||
148 | 1 Unidrive4t.asm 145 | Data | 11 | | 2 | 00/8096 : D6 80 | dw {ozunid_10}
|
||||
149 | 1 Unidrive4t.asm 146 | Comment | 11 | | 0 | 00/8098 | * bcs Error
|
||||
150 | 1 Unidrive4t.asm 147 | Empty | 11 | | 0 | 00/8098 |
|
||||
151 | 1 Unidrive4t.asm 148 | Comment | 11 | | 0 | 00/8098 | * Second time execute only to read the latest Byte of FP1*
|
||||
152 | 1 Unidrive4t.asm 149 | Code | 11 | | 3 | 00/8098 : AD DE 80 | lda UNIAcc_reg
|
||||
153 | 1 Unidrive4t.asm 150 | Code | 11 | | 2 | 00/809B : 85 FD | sta {$FA}+3
|
||||
154 | 1 Unidrive4t.asm 151 | Comment | 11 | | 0 | 00/809D | *
|
||||
155 | 1 Unidrive4t.asm 152 | Code | 11 | | 1 | 00/809D : 60 | rts
|
||||
156 | 1 Unidrive4t.asm 153 | Empty | 11 | | 0 | 00/809E |
|
||||
157 | 1 Unidrive4t.asm 154 | Comment | 11 | | 0 | 00/809E | ******************************************************
|
||||
158 | 1 Unidrive4t.asm 155 | Empty | 11 | | 0 | 00/809E | ozunid_4
|
||||
159 | 1 Unidrive4t.asm 155 | Equivalence | 11 | | 0 | 00/809E | FindPC equ ozunid_4
|
||||
160 | 1 Unidrive4t.asm 156 | Comment | 11 | | 0 | 00/809E | *
|
||||
161 | 1 Unidrive4t.asm 157 | Comment | 11 | | 0 | 00/809E | * Search slot 7 to slot 1 looking for signature bytes
|
||||
162 | 1 Unidrive4t.asm 158 | Comment | 11 | | 0 | 00/809E | *
|
||||
163 | 1 Unidrive4t.asm 159 | Code | 11 | | 2 | 00/809E : A2 07 | ldx #7 ;Do for seven slots
|
||||
164 | 1 Unidrive4t.asm 160 | Code | 11 | | 2 | 00/80A0 : A9 C7 | lda #$C7
|
||||
165 | 1 Unidrive4t.asm 161 | Code | 11 | | 2 | 00/80A2 : 85 07 | sta {$0007}
|
||||
166 | 1 Unidrive4t.asm 162 | Code | 11 | | 2 | 00/80A4 : A9 00 | lda #$00
|
||||
167 | 1 Unidrive4t.asm 163 | Code | 11 | | 2 | 00/80A6 : 85 06 | sta {$0006}
|
||||
168 | 1 Unidrive4t.asm 164 | Comment | 11 | | 0 | 00/80A8 | *
|
||||
169 | 1 Unidrive4t.asm 165 | Empty | 11 | | 0 | 00/80A8 | ozunid_5
|
||||
170 | 1 Unidrive4t.asm 165 | Equivalence | 11 | | 0 | 00/80A8 | newslot equ ozunid_5
|
||||
171 | 1 Unidrive4t.asm 166 | Code | 11 | | 2 | 00/80A8 : A0 07 | ldy #7
|
||||
172 | 1 Unidrive4t.asm 167 | Comment | 11 | | 0 | 00/80AA | *
|
||||
173 | 1 Unidrive4t.asm 168 | Empty | 11 | | 0 | 00/80AA | ozunid_6
|
||||
174 | 1 Unidrive4t.asm 168 | Equivalence | 11 | | 0 | 00/80AA | again equ ozunid_6
|
||||
175 | 1 Unidrive4t.asm 169 | Code | 11 | | 2 | 00/80AA : B1 06 | lda ({$0006}),y
|
||||
176 | 1 Unidrive4t.asm 170 | Code | 11 | | 3 | 00/80AC : D9 CB 80 | cmp sigtab,y ;One for byte signature
|
||||
177 | 1 Unidrive4t.asm 171 | Code | 11 | | 2 | 00/80AF : F0 07 | beq {ozunid_7} ;Found one signature byte
|
||||
178 | 1 Unidrive4t.asm 172 | Code | 11 | | 2 | 00/80B1 : C6 07 | dec {$0007}
|
||||
179 | 1 Unidrive4t.asm 173 | Code | 11 | | 1 | 00/80B3 : CA | dex
|
||||
180 | 1 Unidrive4t.asm 174 | Code | 11 | | 2 | 00/80B4 : D0 F2 | bne {ozunid_5}
|
||||
181 | 1 Unidrive4t.asm 175 | Comment | 11 | | 0 | 00/80B6 | *
|
||||
182 | 1 Unidrive4t.asm 176 | Comment | 11 | | 0 | 00/80B6 | * if we get here, no PC find
|
||||
183 | 1 Unidrive4t.asm 177 | Code | 11 | | 1 | 00/80B6 : 38 | sec
|
||||
184 | 1 Unidrive4t.asm 178 | Code | 11 | | 1 | 00/80B7 : 60 | rts
|
||||
185 | 1 Unidrive4t.asm 179 | Comment | 11 | | 0 | 00/80B8 | *
|
||||
186 | 1 Unidrive4t.asm 180 | Comment | 11 | | 0 | 00/80B8 | * if we get here, no byte find on PC
|
||||
187 | 1 Unidrive4t.asm 181 | Empty | 11 | | 0 | 00/80B8 | ozunid_7
|
||||
188 | 1 Unidrive4t.asm 181 | Equivalence | 11 | | 0 | 00/80B8 | maybe equ ozunid_7
|
||||
189 | 1 Unidrive4t.asm 182 | Code | 11 | | 1 | 00/80B8 : 88 | dey
|
||||
190 | 1 Unidrive4t.asm 183 | Code | 11 | | 1 | 00/80B9 : 88 | dey ;if N=1 then all sig bytes OK
|
||||
191 | 1 Unidrive4t.asm 184 | Code | 11 | | 2 | 00/80BA : 10 EE | bpl {ozunid_6}
|
||||
192 | 1 Unidrive4t.asm 185 | Comment | 11 | | 0 | 00/80BC | * Found PC interface. Set up call address.
|
||||
193 | 1 Unidrive4t.asm 186 | Comment | 11 | | 0 | 00/80BC | * we already have high byte ($CN), we need low byte
|
||||
194 | 1 Unidrive4t.asm 187 | Comment | 11 | | 0 | 00/80BC | *
|
||||
195 | 1 Unidrive4t.asm 188 | Empty | 11 | | 0 | 00/80BC | ozunid_8
|
||||
196 | 1 Unidrive4t.asm 188 | Equivalence | 11 | | 0 | 00/80BC | foundPC equ ozunid_8
|
||||
197 | 1 Unidrive4t.asm 189 | Code | 11 | | 2 | 00/80BC : A9 FF | lda #$FF
|
||||
198 | 1 Unidrive4t.asm 190 | Code | 11 | | 2 | 00/80BE : 85 06 | sta {$0006}
|
||||
199 | 1 Unidrive4t.asm 191 | Code | 11 | | 2 | 00/80C0 : A0 00 | ldy #0 ;For indirect load
|
||||
200 | 1 Unidrive4t.asm 192 | Code | 11 | | 2 | 00/80C2 : B1 06 | lda ({$0006}),y ;Get the byte
|
||||
201 | 1 Unidrive4t.asm 193 | Comment | 11 | | 0 | 00/80C4 | *
|
||||
202 | 1 Unidrive4t.asm 194 | Comment | 11 | | 0 | 00/80C4 | * Now the Acc has the low oreder ProDOS entry point.
|
||||
203 | 1 Unidrive4t.asm 195 | Comment | 11 | | 0 | 00/80C4 | * The PC entry is three locations past this ...
|
||||
204 | 1 Unidrive4t.asm 196 | Comment | 11 | | 0 | 00/80C4 | *
|
||||
205 | 1 Unidrive4t.asm 197 | Code | 11 | | 1 | 00/80C4 : 18 | clc
|
||||
206 | 1 Unidrive4t.asm 198 | Code | 11 | | 2 | 00/80C5 : 69 03 | adc #3
|
||||
207 | 1 Unidrive4t.asm 199 | Code | 11 | | 2 | 00/80C7 : 85 06 | sta {$0006}
|
||||
208 | 1 Unidrive4t.asm 200 | Comment | 11 | | 0 | 00/80C9 | *
|
||||
209 | 1 Unidrive4t.asm 201 | Comment | 11 | | 0 | 00/80C9 | * Now ZPTempL has PC entry point.
|
||||
210 | 1 Unidrive4t.asm 202 | Comment | 11 | | 0 | 00/80C9 | * Return with carry clear.
|
||||
211 | 1 Unidrive4t.asm 203 | Comment | 11 | | 0 | 00/80C9 | *
|
||||
212 | 1 Unidrive4t.asm 204 | Code | 11 | | 1 | 00/80C9 : 18 | clc
|
||||
213 | 1 Unidrive4t.asm 205 | Code | 11 | | 1 | 00/80CA : 60 | rts
|
||||
214 | 1 Unidrive4t.asm 206 | Comment | 11 | | 0 | 00/80CB | ***********************************************************
|
||||
215 | 1 Unidrive4t.asm 207 | Comment | 11 | | 0 | 00/80CB | *
|
||||
216 | 1 Unidrive4t.asm 208 | Comment | 11 | | 0 | 00/80CB | * There are the PC signature bytes in their relative order.
|
||||
217 | 1 Unidrive4t.asm 209 | Comment | 11 | | 0 | 00/80CB | * The $FF bytes are filler bytes and are not compared.
|
||||
218 | 1 Unidrive4t.asm 210 | Comment | 11 | | 0 | 00/80CB | *
|
||||
219 | 1 Unidrive4t.asm 211 | Data | 11 | | 4 | 00/80CB : FF 20 FF 00 | sigtab dfb $FF,$20,$FF,$00
|
||||
220 | 1 Unidrive4t.asm 212 | Data | 11 | | 4 | 00/80CF : FF 03 FF 00 | dfb $FF,$03,$FF,$00
|
||||
221 | 1 Unidrive4t.asm 213 | Comment | 11 | | 0 | 00/80D3 | *
|
||||
222 | 1 Unidrive4t.asm 214 | Empty | 11 | | 0 | 00/80D3 | ozunid_9
|
||||
223 | 1 Unidrive4t.asm 214 | Equivalence | 11 | | 0 | 00/80D3 | Dispatch equ ozunid_9
|
||||
224 | 1 Unidrive4t.asm 215 | Code | 11 | | 3 | 00/80D3 : 6C 06 00 | jmp ({$0006}) ;Simulate an indirect JSR to PC
|
||||
225 | 1 Unidrive4t.asm 216 | Comment | 11 | | 0 | 00/80D6 | *
|
||||
226 | 1 Unidrive4t.asm 217 | Comment | 11 | | 0 | 00/80D6 | *** Status Parameter Set for UNI ***
|
||||
227 | 1 Unidrive4t.asm 218 | Empty | 11 | | 0 | 00/80D6 | ozunid_10
|
||||
228 | 1 Unidrive4t.asm 218 | Equivalence | 11 | | 0 | 00/80D6 | DParms equ ozunid_10
|
||||
229 | 1 Unidrive4t.asm 219 | Data | 11 | | 1 | 00/80D6 : 03 | DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
230 | 1 Unidrive4t.asm 220 | Data | 11 | | 1 | 00/80D7 : 01 | DPUnit dfb 1
|
||||
231 | 1 Unidrive4t.asm 221 | Data | 11 | | 2 | 00/80D8 : DB 80 | DPBuffer dw {ozunid_11}
|
||||
232 | 1 Unidrive4t.asm 222 | Data | 11 | | 1 | 00/80DA : 05 | DPStatCode dfb {5}
|
||||
233 | 1 Unidrive4t.asm 223 | Comment | 11 | | 0 | 00/80DB | *
|
||||
234 | 1 Unidrive4t.asm 224 | Comment | 11 | | 0 | 00/80DB | *
|
||||
235 | 1 Unidrive4t.asm 225 | Comment | 11 | | 0 | 00/80DB | *
|
||||
236 | 1 Unidrive4t.asm 226 | Comment | 11 | | 0 | 00/80DB | *** Status List UNI ***
|
||||
237 | 1 Unidrive4t.asm 227 | Empty | 11 | | 0 | 00/80DB | ozunid_11
|
||||
238 | 1 Unidrive4t.asm 227 | Equivalence | 11 | | 0 | 00/80DB | UNI equ ozunid_11
|
||||
239 | 1 Unidrive4t.asm 228 | Data | 11 | | 1 | 00/80DB : 00 | dfb 0
|
||||
240 | 1 Unidrive4t.asm 229 | Data | 11 | | 1 | 00/80DC : 00 | UNIError dfb 0
|
||||
241 | 1 Unidrive4t.asm 230 | Data | 11 | | 1 | 00/80DD : 00 | UNIRetries dfb 0
|
||||
242 | 1 Unidrive4t.asm 231 | Data | 11 | | 1 | 00/80DE : 00 | UNIAcc_reg dfb 0
|
||||
243 | 1 Unidrive4t.asm 232 | Data | 11 | | 1 | 00/80DF : 00 | UNIX_reg dfb 0
|
||||
244 | 1 Unidrive4t.asm 233 | Data | 11 | | 1 | 00/80E0 : 00 | UNIY_reg dfb 0
|
||||
245 | 1 Unidrive4t.asm 234 | Data | 11 | | 1 | 00/80E1 : 00 | UNIP_val dfb 0
|
||||
246 | 1 Unidrive4t.asm 235 | Data | 11 | | 1 | 00/80E2 : 00 | HHH dfb 0
|
||||
247 | 1 Unidrive4t.asm 236 | Comment | 11 | | 0 | 00/80E3 | *
|
||||
248 | 1 Unidrive4t.asm 237 | Comment | 11 | | 0 | 00/80E3 | *** Set Address ***
|
||||
249 | 1 Unidrive4t.asm 238 | Empty | 11 | | 0 | 00/80E3 | ozunid_12
|
||||
250 | 1 Unidrive4t.asm 238 | Equivalence | 11 | | 0 | 00/80E3 | SET_ADD equ ozunid_12
|
||||
251 | 1 Unidrive4t.asm 239 | Data | 11 | | 1 | 00/80E3 : 03 | dfb 3
|
||||
252 | 1 Unidrive4t.asm 240 | Data | 11 | | 1 | 00/80E4 : 01 | dfb 1
|
||||
253 | 1 Unidrive4t.asm 241 | Data | 11 | | 2 | 00/80E5 : 01 81 | dw {ozunid_18}
|
||||
254 | 1 Unidrive4t.asm 242 | Data | 11 | | 1 | 00/80E7 : 06 | dfb {6}
|
||||
255 | 1 Unidrive4t.asm 243 | Comment | 11 | | 0 | 00/80E8 | *
|
||||
256 | 1 Unidrive4t.asm 244 | Comment | 11 | | 0 | 00/80E8 | *** Download ***
|
||||
257 | 1 Unidrive4t.asm 245 | Empty | 11 | | 0 | 00/80E8 | ozunid_13
|
||||
258 | 1 Unidrive4t.asm 245 | Equivalence | 11 | | 0 | 00/80E8 | DOWNLOAD equ ozunid_13
|
||||
259 | 1 Unidrive4t.asm 246 | Data | 11 | | 1 | 00/80E8 : 03 | dfb 3
|
||||
260 | 1 Unidrive4t.asm 247 | Data | 11 | | 1 | 00/80E9 : 01 | dfb 1
|
||||
261 | 1 Unidrive4t.asm 248 | Data | 11 | | 2 | 00/80EA : 05 81 | dw {ozunid_19}
|
||||
262 | 1 Unidrive4t.asm 249 | Data | 11 | | 1 | 00/80EC : 07 | dfb {7}
|
||||
263 | 1 Unidrive4t.asm 250 | Comment | 11 | | 0 | 00/80ED | *
|
||||
264 | 1 Unidrive4t.asm 251 | Comment | 11 | | 0 | 00/80ED | *** Execute ***
|
||||
265 | 1 Unidrive4t.asm 252 | Empty | 11 | | 0 | 00/80ED | ozunid_14
|
||||
266 | 1 Unidrive4t.asm 252 | Equivalence | 11 | | 0 | 00/80ED | EXE equ ozunid_14
|
||||
267 | 1 Unidrive4t.asm 253 | Data | 11 | | 1 | 00/80ED : 03 | dfb 3
|
||||
268 | 1 Unidrive4t.asm 254 | Data | 11 | | 1 | 00/80EE : 01 | dfb 1
|
||||
269 | 1 Unidrive4t.asm 255 | Data | 11 | | 2 | 00/80EF : F9 80 | dw {ozunid_17}
|
||||
270 | 1 Unidrive4t.asm 256 | Data | 11 | | 1 | 00/80F1 : 05 | dfb {5}
|
||||
271 | 1 Unidrive4t.asm 257 | Comment | 11 | | 0 | 00/80F2 | *** Eject ***
|
||||
272 | 1 Unidrive4t.asm 258 | Empty | 11 | | 0 | 00/80F2 | ozunid_15
|
||||
273 | 1 Unidrive4t.asm 258 | Equivalence | 11 | | 0 | 00/80F2 | E_JECT equ ozunid_15
|
||||
274 | 1 Unidrive4t.asm 259 | Data | 11 | | 1 | 00/80F2 : 03 | dfb 3
|
||||
275 | 1 Unidrive4t.asm 260 | Data | 11 | | 1 | 00/80F3 : 01 | dfb 1
|
||||
276 | 1 Unidrive4t.asm 261 | Data | 11 | | 2 | 00/80F4 : F7 80 | dw {ozunid_16}
|
||||
277 | 1 Unidrive4t.asm 262 | Data | 11 | | 1 | 00/80F6 : 04 | dfb {4}
|
||||
278 | 1 Unidrive4t.asm 263 | Comment | 11 | | 0 | 00/80F7 | *
|
||||
279 | 1 Unidrive4t.asm 264 | Comment | 11 | | 0 | 00/80F7 | ******** CONTROL LISTS ********
|
||||
280 | 1 Unidrive4t.asm 265 | Comment | 11 | | 0 | 00/80F7 | *
|
||||
281 | 1 Unidrive4t.asm 266 | Comment | 11 | | 0 | 00/80F7 | *
|
||||
282 | 1 Unidrive4t.asm 267 | Comment | 11 | | 0 | 00/80F7 | *** Eject ***
|
||||
283 | 1 Unidrive4t.asm 268 | Empty | 11 | | 0 | 00/80F7 | ozunid_16
|
||||
284 | 1 Unidrive4t.asm 268 | Equivalence | 11 | | 0 | 00/80F7 | CNTL_LIST1 equ ozunid_16
|
||||
285 | 1 Unidrive4t.asm 269 | Data | 11 | | 2 | 00/80F7 : 00 00 | dw $0000
|
||||
286 | 1 Unidrive4t.asm 270 | Comment | 11 | | 0 | 00/80F9 | *
|
||||
287 | 1 Unidrive4t.asm 271 | Comment | 11 | | 0 | 00/80F9 | *** Execute ***
|
||||
288 | 1 Unidrive4t.asm 272 | Empty | 11 | | 0 | 00/80F9 | ozunid_17
|
||||
289 | 1 Unidrive4t.asm 272 | Equivalence | 11 | | 0 | 00/80F9 | CNTL_LIST2 equ ozunid_17
|
||||
290 | 1 Unidrive4t.asm 273 | Data | 11 | | 1 | 00/80F9 : 06 | Clow_byte dfb $06
|
||||
291 | 1 Unidrive4t.asm 274 | Data | 11 | | 1 | 00/80FA : 00 | Chigh_byte dfb $00
|
||||
292 | 1 Unidrive4t.asm 275 | Data | 11 | | 1 | 00/80FB : 00 | AccValue dfb $00 ; Init Value Unidisk Accumulator Register
|
||||
293 | 1 Unidrive4t.asm 276 | Data | 11 | | 1 | 00/80FC : 00 | X_reg dfb $00 ; Init Value Unidisk X Register
|
||||
294 | 1 Unidrive4t.asm 277 | Data | 11 | | 1 | 00/80FD : 00 | Y_reg dfb $00 ; Init Value Unidisk Y Register
|
||||
295 | 1 Unidrive4t.asm 278 | Data | 11 | | 1 | 00/80FE : 00 | ProStatus dfb $00 ; Init Value Unidisk Status Register
|
||||
296 | 1 Unidrive4t.asm 279 | Data | 11 | | 1 | 00/80FF : 00 | LowPC_reg dfb $00 ; Init Value Unidisk Program Counter $0500
|
||||
297 | 1 Unidrive4t.asm 280 | Data | 11 | | 1 | 00/8100 : 05 | HighPC_reg dfb $05
|
||||
298 | 1 Unidrive4t.asm 281 | Comment | 11 | | 0 | 00/8101 | *
|
||||
299 | 1 Unidrive4t.asm 282 | Comment | 11 | | 0 | 00/8101 | *** Set Address ***
|
||||
300 | 1 Unidrive4t.asm 283 | Empty | 11 | | 0 | 00/8101 | ozunid_18
|
||||
301 | 1 Unidrive4t.asm 283 | Equivalence | 11 | | 0 | 00/8101 | CNTL_LIST3 equ ozunid_18
|
||||
302 | 1 Unidrive4t.asm 284 | Data | 11 | | 1 | 00/8101 : 02 | CountL_byte dfb $02
|
||||
303 | 1 Unidrive4t.asm 285 | Data | 11 | | 1 | 00/8102 : 00 | CountH_byte dfb $00
|
||||
304 | 1 Unidrive4t.asm 286 | Data | 11 | | 1 | 00/8103 : 00 | LByte_Addr dfb $00 ; ORG of Unidisk program, set begin program address $0500
|
||||
305 | 1 Unidrive4t.asm 287 | Data | 11 | | 1 | 00/8104 : 05 | HByte_Addr dfb $05
|
||||
306 | 1 Unidrive4t.asm 288 | Comment | 11 | | 0 | 00/8105 | *
|
||||
307 | 1 Unidrive4t.asm 289 | Comment | 11 | | 0 | 00/8105 | *** Download ***
|
||||
308 | 1 Unidrive4t.asm 290 | Empty | 11 | | 0 | 00/8105 | ozunid_19
|
||||
309 | 1 Unidrive4t.asm 290 | Equivalence | 11 | | 0 | 00/8105 | CNTL_LIST4 equ ozunid_19
|
||||
310 | 1 Unidrive4t.asm 291 | Data | 11 | | 1 | 00/8105 : 36 | LenghtL_byte dfb $36 ;<----- Lenght of Unidisk program Lo - Byte 312 byte
|
||||
311 | 1 Unidrive4t.asm 292 | Data | 11 | | 1 | 00/8106 : 01 | LenghtH_byte dfb $01 ;<----- Lenght of Unidisk program Hi Byte
|
||||
312 | 1 Unidrive4t.asm 293 | Comment | 11 | | 0 | 00/8107 | *
|
||||
313 | 1 Unidrive4t.asm 294 | Comment | 11 | | 0 | 00/8107 | **************** Start UNIDISK Program ****************
|
||||
314 | 1 Unidrive4t.asm 295 | Comment | 11 | | 0 | 00/8107 | *
|
||||
315 | 1 Unidrive4t.asm 296 | Directive | 11 | | 0 | 00/8107 | org $0500 ; Start Unidisk program address
|
||||
316 | 1 Unidrive4t.asm 297 | Empty | 11 | | 0 | 00/0500 |
|
||||
317 | 1 Unidrive4t.asm 298 | Equivalence | 11 | | 0 | 00/0500 | SIGN EQU $C0 ;$EB ; $F3
|
||||
318 | 1 Unidrive4t.asm 299 | Empty | 11 | | 0 | 00/0500 |
|
||||
319 | 1 Unidrive4t.asm 300 | Comment | 11 | | 0 | 00/0500 | ** FP2 4 Bytes **
|
||||
320 | 1 Unidrive4t.asm 301 | Equivalence | 11 | | 0 | 00/0500 | X2 EQU $C1 ;$EC ; $F4
|
||||
321 | 1 Unidrive4t.asm 302 | Equivalence | 11 | | 0 | 00/0500 | M2 EQU $C2 ;$ED ; $F5 - $F7
|
||||
322 | 1 Unidrive4t.asm 303 | Empty | 11 | | 0 | 00/0500 |
|
||||
323 | 1 Unidrive4t.asm 304 | Comment | 11 | | 0 | 00/0500 | ** FP1 4 Bytes + E extension **
|
||||
324 | 1 Unidrive4t.asm 305 | Equivalence | 11 | | 0 | 00/0500 | X1 EQU $C5 ;$FA ; $F8
|
||||
325 | 1 Unidrive4t.asm 306 | Equivalence | 11 | | 0 | 00/0500 | M1 EQU $C6 ;$FB ; $F9 - $FB
|
||||
326 | 1 Unidrive4t.asm 307 | Equivalence | 11 | | 0 | 00/0500 | E EQU $C9 ;$FE ; $FC
|
||||
327 | 1 Unidrive4t.asm 308 | Empty | 11 | | 0 | 00/0500 |
|
||||
328 | 1 Unidrive4t.asm 309 | Equivalence | 11 | | 0 | 00/0500 | OVLOC EQU $C10 ;$3F5 ;Overflow routine is not implemented at now)
|
||||
329 | 1 Unidrive4t.asm 310 | Comment | 11 | | 0 | 00/0500 | *
|
||||
330 | 1 Unidrive4t.asm 311 | Comment | 11 | | 0 | 00/0500 | ** Main program **
|
||||
331 | 1 Unidrive4t.asm 312 | Comment | 11 | | 0 | 00/0500 | *
|
||||
332 | 1 Unidrive4t.asm 313 | Comment | 11 | | 0 | 00/0500 | * CHK if is the second execution *
|
||||
333 | 1 Unidrive4t.asm 314 | Empty | 11 | | 0 | 00/0500 |
|
||||
334 | 1 Unidrive4t.asm 315 | Comment | 11 | | 0 | 00/0500 | * cmp #01
|
||||
335 | 1 Unidrive4t.asm 316 | Code | 11 | | 2 | 00/0500 : F0 32 | beq SECOND ;Only to read the rest part of result
|
||||
336 | 1 Unidrive4t.asm 317 | Empty | 11 | | 0 | 00/0502 |
|
||||
337 | 1 Unidrive4t.asm 318 | Comment | 11 | | 0 | 00/0502 | ** Input data to Zero Page **
|
||||
338 | 1 Unidrive4t.asm 319 | Empty | 11 | | 0 | 00/0502 |
|
||||
339 | 1 Unidrive4t.asm 320 | Comment | 11 | | 0 | 00/0502 | ** FP1 **
|
||||
340 | 1 Unidrive4t.asm 321 | Code | 11 | | 3 | 00/0502 : AD 2F 06 | lda FP1
|
||||
341 | 1 Unidrive4t.asm 322 | Code | 11 | | 2 | 00/0505 : 85 C5 | sta {$C5}
|
||||
342 | 1 Unidrive4t.asm 323 | Empty | 11 | | 0 | 00/0507 |
|
||||
343 | 1 Unidrive4t.asm 324 | Code | 11 | | 3 | 00/0507 : AD 30 06 | lda FP1+1
|
||||
344 | 1 Unidrive4t.asm 325 | Code | 11 | | 2 | 00/050A : 85 C6 | sta {$C6}
|
||||
345 | 1 Unidrive4t.asm 326 | Code | 11 | | 3 | 00/050C : AD 31 06 | lda FP1+2
|
||||
346 | 1 Unidrive4t.asm 327 | Code | 11 | | 2 | 00/050F : 85 C7 | sta {$C6}+1
|
||||
347 | 1 Unidrive4t.asm 328 | Code | 11 | | 3 | 00/0511 : AD 32 06 | lda FP1+3
|
||||
348 | 1 Unidrive4t.asm 329 | Code | 11 | | 2 | 00/0514 : 85 C8 | sta {$C6}+2
|
||||
349 | 1 Unidrive4t.asm 330 | Empty | 11 | | 0 | 00/0516 |
|
||||
350 | 1 Unidrive4t.asm 331 | Comment | 11 | | 0 | 00/0516 | ** FP2 **
|
||||
351 | 1 Unidrive4t.asm 332 | Code | 11 | | 3 | 00/0516 : AD 33 06 | lda FP2
|
||||
352 | 1 Unidrive4t.asm 333 | Code | 11 | | 2 | 00/0519 : 85 C1 | sta {$C1}
|
||||
353 | 1 Unidrive4t.asm 334 | Empty | 11 | | 0 | 00/051B |
|
||||
354 | 1 Unidrive4t.asm 335 | Code | 11 | | 3 | 00/051B : AD 34 06 | lda FP2+1
|
||||
355 | 1 Unidrive4t.asm 336 | Code | 11 | | 2 | 00/051E : 85 C2 | sta {$C2}
|
||||
356 | 1 Unidrive4t.asm 337 | Code | 11 | | 3 | 00/0520 : AD 35 06 | lda FP2+2
|
||||
357 | 1 Unidrive4t.asm 338 | Code | 11 | | 2 | 00/0523 : 85 C3 | sta {$C2}+1
|
||||
358 | 1 Unidrive4t.asm 339 | Code | 11 | | 3 | 00/0525 : AD 36 06 | lda FP2+3
|
||||
359 | 1 Unidrive4t.asm 340 | Code | 11 | | 2 | 00/0528 : 85 C4 | sta {$C2}+2
|
||||
360 | 1 Unidrive4t.asm 341 | Empty | 11 | | 0 | 00/052A |
|
||||
361 | 1 Unidrive4t.asm 342 | Comment | 11 | | 0 | 00/052A | ************************** Target Function ***********************
|
||||
362 | 1 Unidrive4t.asm 343 | Comment | 11 | | 0 | 00/052A | * Y=N1+N2 *
|
||||
363 | 1 Unidrive4t.asm 344 | Comment | 11 | | 0 | 00/052A | ******************************************************************
|
||||
364 | 1 Unidrive4t.asm 345 | Comment | 11 | | 0 | 00/052A | *
|
||||
365 | 1 Unidrive4t.asm 346 | Comment | 11 | | 0 | 00/052A | ** Simple ADD **
|
||||
366 | 1 Unidrive4t.asm 347 | Code | 11 | | 3 | 00/052A : 20 80 05 | jsr FADD ; Call FP routine
|
||||
367 | 1 Unidrive4t.asm 348 | Empty | 11 | | 0 | 00/052D |
|
||||
368 | 1 Unidrive4t.asm 349 | Comment | 11 | | 0 | 00/052D | *** Output Data result FP1 to Unidisk registers First Time first 3 Byte out ***
|
||||
369 | 1 Unidrive4t.asm 350 | Code | 11 | | 2 | 00/052D : A5 C5 | lda {$C5}
|
||||
370 | 1 Unidrive4t.asm 351 | Code | 11 | | 2 | 00/052F : A6 C6 | ldx {$C6}
|
||||
371 | 1 Unidrive4t.asm 352 | Code | 11 | | 2 | 00/0531 : A4 C7 | ldy {$C6}+1
|
||||
372 | 1 Unidrive4t.asm 353 | Empty | 11 | | 0 | 00/0533 |
|
||||
373 | 1 Unidrive4t.asm 354 | Code | 11 | | 1 | 00/0533 : 60 | rts
|
||||
374 | 1 Unidrive4t.asm 355 | Comment | 11 | | 0 | 00/0534 | *** Output Data result FP1 to Unidisk registers Second Time latest 1 Byte out ***
|
||||
375 | 1 Unidrive4t.asm 356 | Code | 11 | | 2 | 00/0534 : A5 C8 | SECOND lda {$C6}+2
|
||||
376 | 1 Unidrive4t.asm 357 | Empty | 11 | | 0 | 00/0536 |
|
||||
377 | 1 Unidrive4t.asm 358 | Code | 11 | | 1 | 00/0536 : 60 | rts
|
||||
378 | 1 Unidrive4t.asm 359 | Comment | 11 | | 0 | 00/0537 | ***************************************************
|
||||
379 | 1 Unidrive4t.asm 360 | Comment | 11 | | 0 | 00/0537 | *
|
||||
380 | 1 Unidrive4t.asm 361 | Comment | 11 | | 0 | 00/0537 | ***************** FP Routine *****************
|
||||
381 | 1 Unidrive4t.asm 362 | Comment | 11 | | 0 | 00/0537 | *
|
||||
382 | 1 Unidrive4t.asm 363 | Comment | 11 | | 0 | 00/0537 | ***********************
|
||||
383 | 1 Unidrive4t.asm 364 | Comment | 11 | | 0 | 00/0537 | * *
|
||||
384 | 1 Unidrive4t.asm 365 | Comment | 11 | | 0 | 00/0537 | * APPLE-II FLOATING *
|
||||
385 | 1 Unidrive4t.asm 366 | Comment | 11 | | 0 | 00/0537 | * POINT ROUTINES *
|
||||
386 | 1 Unidrive4t.asm 367 | Comment | 11 | | 0 | 00/0537 | * *
|
||||
387 | 1 Unidrive4t.asm 368 | Comment | 11 | | 0 | 00/0537 | * COPYRIGHT 1977 BY *
|
||||
388 | 1 Unidrive4t.asm 369 | Comment | 11 | | 0 | 00/0537 | * APPLE COMPUTER INC. *
|
||||
389 | 1 Unidrive4t.asm 370 | Comment | 11 | | 0 | 00/0537 | * *
|
||||
390 | 1 Unidrive4t.asm 371 | Comment | 11 | | 0 | 00/0537 | * ALL RIGHTS RESERVED *
|
||||
391 | 1 Unidrive4t.asm 372 | Comment | 11 | | 0 | 00/0537 | * *
|
||||
392 | 1 Unidrive4t.asm 373 | Comment | 11 | | 0 | 00/0537 | * S. WOZNIAK *
|
||||
393 | 1 Unidrive4t.asm 374 | Comment | 11 | | 0 | 00/0537 | * *
|
||||
394 | 1 Unidrive4t.asm 375 | Comment | 11 | | 0 | 00/0537 | ***********************
|
||||
395 | 1 Unidrive4t.asm 376 | Comment | 11 | | 0 | 00/0537 | * TITLE "FLOATING POINT ROUTINES for Unidisk memory"
|
||||
396 | 1 Unidrive4t.asm 377 | Comment | 11 | | 0 | 00/0537 | *
|
||||
397 | 1 Unidrive4t.asm 378 | Empty | 11 | | 0 | 00/0537 |
|
||||
398 | 1 Unidrive4t.asm 379 | Comment | 11 | | 0 | 00/0537 | * ORG $300
|
||||
399 | 1 Unidrive4t.asm 380 | Empty | 11 | | 0 | 00/0537 |
|
||||
400 | 1 Unidrive4t.asm 381 | Code | 11 | | 1 | 00/0537 : 18 | ADD CLC ;CLEAR CARRY
|
||||
401 | 1 Unidrive4t.asm 382 | Code | 11 | | 2 | 00/0538 : A2 02 | LDX #$2 ;INDEX FOR 3-BYTE ADD.
|
||||
402 | 1 Unidrive4t.asm 383 | Code | 11 | | 2 | 00/053A : B5 C6 | ADD1 LDA {$C6},X
|
||||
403 | 1 Unidrive4t.asm 384 | Code | 11 | | 2 | 00/053C : 75 C2 | ADC {$C2},X ;ADD A BYTE OF MANT2 TO MANT1
|
||||
404 | 1 Unidrive4t.asm 385 | Code | 11 | | 2 | 00/053E : 95 C6 | STA {$C6},X
|
||||
405 | 1 Unidrive4t.asm 386 | Code | 11 | | 1 | 00/0540 : CA | DEX ;INDEX TO NEXT MORE SIGNIF. BYTE.
|
||||
406 | 1 Unidrive4t.asm 387 | Code | 11 | | 2 | 00/0541 : 10 F7 | BPL ADD1 ;LOOP UNTIL DONE.
|
||||
407 | 1 Unidrive4t.asm 388 | Code | 11 | | 1 | 00/0543 : 60 | RTS ;RETURN
|
||||
408 | 1 Unidrive4t.asm 389 | Code | 11 | | 2 | 00/0544 : 06 C0 | MD1 ASL {$C0} ;CLEAR LSB OF SIGN.
|
||||
409 | 1 Unidrive4t.asm 390 | Code | 11 | | 3 | 00/0546 : 20 49 05 | JSR ABSWAP ;ABS VAL OF M1, THEN SWAP WITH M2
|
||||
410 | 1 Unidrive4t.asm 391 | Code | 11 | | 2 | 00/0549 : 24 C6 | ABSWAP BIT {$C6} ;MANT1 NEGATIVE?
|
||||
411 | 1 Unidrive4t.asm 392 | Code | 11 | | 2 | 00/054B : 10 05 | BPL ABSWAP1 ;NO, SWAP WITH MANT2 AND RETURN.
|
||||
412 | 1 Unidrive4t.asm 393 | Code | 11 | | 3 | 00/054D : 20 B6 05 | JSR FCOMPL ;YES, COMPLEMENT IT.
|
||||
413 | 1 Unidrive4t.asm 394 | Code | 11 | | 2 | 00/0550 : E6 C0 | INC {$C0} ;INCR SIGN, COMPLEMENTING LSB.
|
||||
414 | 1 Unidrive4t.asm 395 | Code | 11 | | 1 | 00/0552 : 38 | ABSWAP1 SEC ;SET CARRY FOR RETURN TO MUL/DIV.
|
||||
415 | 1 Unidrive4t.asm 396 | Code | 11 | | 2 | 00/0553 : A2 04 | SWAP LDX #$4 ;INDEX FOR 4 BYTE SWAP.
|
||||
416 | 1 Unidrive4t.asm 397 | Code | 11 | | 2 | 00/0555 : 94 C8 | SWAP1 STY {$C9}-1,X
|
||||
417 | 1 Unidrive4t.asm 398 | Code | 11 | | 2 | 00/0557 : B5 C4 | LDA {$C5}-1,X ;SWAP A BYTE OF EXP/MANT1 WITH
|
||||
418 | 1 Unidrive4t.asm 399 | Code | 11 | | 2 | 00/0559 : B4 C0 | LDY {$C1}-1,X ;EXP/MANT2 AND LEAVE A COPY OF
|
||||
419 | 1 Unidrive4t.asm 400 | Code | 11 | | 2 | 00/055B : 94 C4 | STY {$C5}-1,X ;MANT1 IN E (3 BYTES). E+3 USED
|
||||
420 | 1 Unidrive4t.asm 401 | Code | 11 | | 2 | 00/055D : 95 C0 | STA {$C1}-1,X
|
||||
421 | 1 Unidrive4t.asm 402 | Code | 11 | | 1 | 00/055F : CA | DEX ;ADVANCE INDEX TO NEXT BYTE
|
||||
422 | 1 Unidrive4t.asm 403 | Code | 11 | | 2 | 00/0560 : D0 F3 | BNE SWAP1 ;LOOP UNTIL DONE.
|
||||
423 | 1 Unidrive4t.asm 404 | Code | 11 | | 1 | 00/0562 : 60 | RTS ;RETURN
|
||||
424 | 1 Unidrive4t.asm 405 | Code | 11 | | 2 | 00/0563 : A9 8E | FLOAT LDA #$8E ;INIT EXP1 TO 14, <--------------- int to fp
|
||||
425 | 1 Unidrive4t.asm 406 | Code | 11 | | 2 | 00/0565 : 85 C5 | STA {$C5} ;THEN NORMALIZE TO FLOAT.
|
||||
426 | 1 Unidrive4t.asm 407 | Code | 11 | | 2 | 00/0567 : A5 C6 | NORM1 LDA {$C6} ;HIGH-ORDER MANT1 BYTE.
|
||||
427 | 1 Unidrive4t.asm 408 | Code | 11 | | 2 | 00/0569 : C9 C0 | CMP #$C0 ;UPPER TWO BITS UNEQUAL?
|
||||
428 | 1 Unidrive4t.asm 409 | Code | 11 | | 2 | 00/056B : 30 0C | BMI RTS1 ;YES, RETURN WITH MANT1 NORMALIZED
|
||||
429 | 1 Unidrive4t.asm 410 | Code | 11 | | 2 | 00/056D : C6 C5 | DEC {$C5} ;DECREMENT EXP1.
|
||||
430 | 1 Unidrive4t.asm 411 | Code | 11 | | 2 | 00/056F : 06 C8 | ASL {$C6}+2
|
||||
431 | 1 Unidrive4t.asm 412 | Code | 11 | | 2 | 00/0571 : 26 C7 | ROL {$C6}+1 ;SHIFT MANT1 (3 BYTES) LEFT.
|
||||
432 | 1 Unidrive4t.asm 413 | Code | 11 | | 2 | 00/0573 : 26 C6 | ROL {$C6}
|
||||
433 | 1 Unidrive4t.asm 414 | Code | 11 | | 2 | 00/0575 : A5 C5 | NORM LDA {$C5} ;EXP1 ZERO?
|
||||
434 | 1 Unidrive4t.asm 415 | Code | 11 | | 2 | 00/0577 : D0 EE | BNE NORM1 ;NO, CONTINUE NORMALIZING.
|
||||
435 | 1 Unidrive4t.asm 416 | Code | 11 | | 1 | 00/0579 : 60 | RTS1 RTS ;RETURN.
|
||||
436 | 1 Unidrive4t.asm 417 | Code | 11 | | 3 | 00/057A : 20 B6 05 | FSUB JSR FCOMPL ;CMPL MANT1,CLEARS CARRY UNLESS 0 <---- sub
|
||||
437 | 1 Unidrive4t.asm 418 | Code | 11 | | 3 | 00/057D : 20 8D 05 | SWPALGN JSR ALGNSWP ;RIGHT SHIFT MANT1 OR SWAP WITH
|
||||
438 | 1 Unidrive4t.asm 419 | Code | 11 | | 2 | 00/0580 : A5 C1 | FADD LDA {$C1} ;<------------------------------------- add
|
||||
439 | 1 Unidrive4t.asm 420 | Code | 11 | | 2 | 00/0582 : C5 C5 | CMP {$C5} ;COMPARE EXP1 WITH EXP2.
|
||||
440 | 1 Unidrive4t.asm 421 | Code | 11 | | 2 | 00/0584 : D0 F7 | BNE SWPALGN ;IF #,SWAP ADDENDS OR ALIGN MANTS.
|
||||
441 | 1 Unidrive4t.asm 422 | Code | 11 | | 3 | 00/0586 : 20 37 05 | JSR ADD ;ADD ALIGNED MANTISSAS.
|
||||
442 | 1 Unidrive4t.asm 423 | Code | 11 | | 2 | 00/0589 : 50 EA | ADDEND BVC NORM ;NO OVERFLOW, NORMALIZE RESULT.
|
||||
443 | 1 Unidrive4t.asm 424 | Code | 11 | | 2 | 00/058B : 70 05 | BVS RTLOG ;OV: SHIFT M1 RIGHT, CARRY INTO SIGN
|
||||
444 | 1 Unidrive4t.asm 425 | Code | 11 | | 2 | 00/058D : 90 C4 | ALGNSWP BCC SWAP ;SWAP IF CARRY CLEAR,
|
||||
445 | 1 Unidrive4t.asm 426 | Comment | 11 | | 0 | 00/058F | * ELSE SHIFT RIGHT ARITH.
|
||||
446 | 1 Unidrive4t.asm 427 | Code | 11 | | 2 | 00/058F : A5 C6 | RTAR LDA {$C6} ;SIGN OF MANT1 INTO CARRY FOR
|
||||
447 | 1 Unidrive4t.asm 428 | Code | 11 | | 1 | 00/0591 : 0A | ASL ;RIGHT ARITH SHIFT.
|
||||
448 | 1 Unidrive4t.asm 429 | Code | 11 | | 2 | 00/0592 : E6 C5 | RTLOG INC {$C5} ;INCR X1 TO ADJUST FOR RIGHT SHIFT
|
||||
449 | 1 Unidrive4t.asm 430 | Code | 11 | | 2 | 00/0594 : F0 75 | BEQ OVFL ;EXP1 OUT OF RANGE.
|
||||
450 | 1 Unidrive4t.asm 431 | Code | 11 | | 2 | 00/0596 : A2 FA | RTLOG1 LDX #$FA ;INDEX FOR 6:BYTE RIGHT SHIFT.
|
||||
451 | 1 Unidrive4t.asm 432 | Code | 11 | | 2 | 00/0598 : 76 CC | ROR1 ROR {$C9}+3,X
|
||||
452 | 1 Unidrive4t.asm 433 | Code | 11 | | 1 | 00/059A : E8 | INX ;NEXT BYTE OF SHIFT.
|
||||
453 | 1 Unidrive4t.asm 434 | Code | 11 | | 2 | 00/059B : D0 FB | BNE ROR1 ;LOOP UNTIL DONE.
|
||||
454 | 1 Unidrive4t.asm 435 | Code | 11 | | 1 | 00/059D : 60 | RTS ;RETURN.
|
||||
455 | 1 Unidrive4t.asm 436 | Code | 11 | | 3 | 00/059E : 20 44 05 | FMUL JSR MD1 ;ABS VAL OF MANT1, MANT2 <-------------- mul
|
||||
456 | 1 Unidrive4t.asm 437 | Code | 11 | | 2 | 00/05A1 : 65 C5 | ADC {$C5} ;ADD EXP1 TO EXP2 FOR PRODUCT EXP
|
||||
457 | 1 Unidrive4t.asm 438 | Code | 11 | | 3 | 00/05A3 : 20 F4 05 | JSR MD2 ;CHECK PROD. EXP AND PREP. FOR MUL
|
||||
458 | 1 Unidrive4t.asm 439 | Code | 11 | | 1 | 00/05A6 : 18 | CLC ;CLEAR CARRY FOR FIRST BIT.
|
||||
459 | 1 Unidrive4t.asm 440 | Code | 11 | | 3 | 00/05A7 : 20 96 05 | MUL1 JSR RTLOG1 ;M1 AND E RIGHT (PROD AND MPLIER)
|
||||
460 | 1 Unidrive4t.asm 441 | Code | 11 | | 2 | 00/05AA : 90 03 | BCC MUL2 ;IF CARRY CLEAR, SKIP PARTIAL PROD
|
||||
461 | 1 Unidrive4t.asm 442 | Code | 11 | | 3 | 00/05AC : 20 37 05 | JSR ADD ;ADD MULTIPLICAND TO PRODUCT.
|
||||
462 | 1 Unidrive4t.asm 443 | Code | 11 | | 1 | 00/05AF : 88 | MUL2 DEY ;NEXT MUL ITERATION.
|
||||
463 | 1 Unidrive4t.asm 444 | Code | 11 | | 2 | 00/05B0 : 10 F5 | BPL MUL1 ;LOOP UNTIL DONE.
|
||||
464 | 1 Unidrive4t.asm 445 | Code | 11 | | 2 | 00/05B2 : 46 C0 | MDEND LSR {$C0} ;TEST SIGN LSB.
|
||||
465 | 1 Unidrive4t.asm 446 | Code | 11 | | 2 | 00/05B4 : 90 BF | NORMX BCC NORM ;IF EVEN,NORMALIZE PROD,ELSE COMP
|
||||
466 | 1 Unidrive4t.asm 447 | Code | 11 | | 1 | 00/05B6 : 38 | FCOMPL SEC ;SET CARRY FOR SUBTRACT. <--------------- not
|
||||
467 | 1 Unidrive4t.asm 448 | Code | 11 | | 2 | 00/05B7 : A2 03 | LDX #$3 ;INDEX FOR 3 BYTE SUBTRACT.
|
||||
468 | 1 Unidrive4t.asm 449 | Code | 11 | | 2 | 00/05B9 : A9 00 | COMPL1 LDA #$0 ;CLEAR A.
|
||||
469 | 1 Unidrive4t.asm 450 | Code | 11 | | 2 | 00/05BB : F5 C5 | SBC {$C5},X ;SUBTRACT BYTE OF EXP1.
|
||||
470 | 1 Unidrive4t.asm 451 | Code | 11 | | 2 | 00/05BD : 95 C5 | STA {$C5},X ;RESTORE IT.
|
||||
471 | 1 Unidrive4t.asm 452 | Code | 11 | | 1 | 00/05BF : CA | DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
472 | 1 Unidrive4t.asm 453 | Code | 11 | | 2 | 00/05C0 : D0 F7 | BNE COMPL1 ;LOOP UNTIL DONE.
|
||||
473 | 1 Unidrive4t.asm 454 | Code | 11 | | 2 | 00/05C2 : F0 C5 | BEQ ADDEND ;NORMALIZE (OR SHIFT RT IF OVFL).
|
||||
474 | 1 Unidrive4t.asm 455 | Code | 11 | | 3 | 00/05C4 : 20 44 05 | FDIV JSR MD1 ;TAKE ABS VAL OF MANT1, MANT2. <--------- div
|
||||
475 | 1 Unidrive4t.asm 456 | Code | 11 | | 2 | 00/05C7 : E5 C5 | SBC {$C5} ;SUBTRACT EXP1 FROM EXP2.
|
||||
476 | 1 Unidrive4t.asm 457 | Code | 11 | | 3 | 00/05C9 : 20 F4 05 | JSR MD2 ;SAVE AS QUOTIENT EXP.
|
||||
477 | 1 Unidrive4t.asm 458 | Code | 11 | | 1 | 00/05CC : 38 | DIV1 SEC ;SET CARRY FOR SUBTRACT.
|
||||
478 | 1 Unidrive4t.asm 459 | Code | 11 | | 2 | 00/05CD : A2 02 | LDX #$2 ;INDEX FOR 3-BYTE SUBTRACTION.
|
||||
479 | 1 Unidrive4t.asm 460 | Code | 11 | | 2 | 00/05CF : B5 C2 | DIV2 LDA {$C2},X
|
||||
480 | 1 Unidrive4t.asm 461 | Code | 11 | | 2 | 00/05D1 : F5 C9 | SBC {$C9},X ;SUBTRACT A BYTE OF E FROM MANT2.
|
||||
481 | 1 Unidrive4t.asm 462 | Code | 11 | | 1 | 00/05D3 : 48 | PHA ;SAVE ON STACK.
|
||||
482 | 1 Unidrive4t.asm 463 | Code | 11 | | 1 | 00/05D4 : CA | DEX ;NEXT MORE SIGNIFICANT BYTE.
|
||||
483 | 1 Unidrive4t.asm 464 | Code | 11 | | 2 | 00/05D5 : 10 F8 | BPL DIV2 ;LOOP UNTIL DONE.
|
||||
484 | 1 Unidrive4t.asm 465 | Code | 11 | | 2 | 00/05D7 : A2 FD | LDX #$FD ;INDEX FOR 3-BYTE CONDITIONAL MOVE
|
||||
485 | 1 Unidrive4t.asm 466 | Code | 11 | | 1 | 00/05D9 : 68 | DIV3 PLA ;PULL BYTE OF DIFFERENCE OFF STACK
|
||||
486 | 1 Unidrive4t.asm 467 | Code | 11 | | 2 | 00/05DA : 90 02 | BCC DIV4 ;IF M2<E THEN DON'T RESTORE M2.
|
||||
487 | 1 Unidrive4t.asm 468 | Code | 11 | | 2 | 00/05DC : 95 C5 | STA {$C2}+3,X
|
||||
488 | 1 Unidrive4t.asm 469 | Code | 11 | | 1 | 00/05DE : E8 | DIV4 INX ;NEXT LESS SIGNIFICANT BYTE.
|
||||
489 | 1 Unidrive4t.asm 470 | Code | 11 | | 2 | 00/05DF : D0 F8 | BNE DIV3 ;LOOP UNTIL DONE.
|
||||
490 | 1 Unidrive4t.asm 471 | Code | 11 | | 2 | 00/05E1 : 26 C8 | ROL {$C6}+2
|
||||
491 | 1 Unidrive4t.asm 472 | Code | 11 | | 2 | 00/05E3 : 26 C7 | ROL {$C6}+1 ;ROLL QUOTIENT LEFT, CARRY INTO LSB
|
||||
492 | 1 Unidrive4t.asm 473 | Code | 11 | | 2 | 00/05E5 : 26 C6 | ROL {$C6}
|
||||
493 | 1 Unidrive4t.asm 474 | Code | 11 | | 2 | 00/05E7 : 06 C4 | ASL {$C2}+2
|
||||
494 | 1 Unidrive4t.asm 475 | Code | 11 | | 2 | 00/05E9 : 26 C3 | ROL {$C2}+1 ;SHIFT DIVIDEND LEFT
|
||||
495 | 1 Unidrive4t.asm 476 | Code | 11 | | 2 | 00/05EB : 26 C2 | ROL {$C2}
|
||||
496 | 1 Unidrive4t.asm 477 | Code | 11 | | 2 | 00/05ED : B0 1C | BCS OVFL ;OVFL IS DUE TO UNNORMED DIVISOR
|
||||
497 | 1 Unidrive4t.asm 478 | Code | 11 | | 1 | 00/05EF : 88 | DEY ;NEXT DIVIDE ITERATION.
|
||||
498 | 1 Unidrive4t.asm 479 | Code | 11 | | 2 | 00/05F0 : D0 DA | BNE DIV1 ;LOOP UNTIL DONE 23 ITERATIONS.
|
||||
499 | 1 Unidrive4t.asm 480 | Code | 11 | | 2 | 00/05F2 : F0 BE | BEQ MDEND ;NORM. QUOTIENT AND CORRECT SIGN.
|
||||
500 | 1 Unidrive4t.asm 481 | Code | 11 | | 2 | 00/05F4 : 86 C8 | MD2 STX {$C6}+2
|
||||
501 | 1 Unidrive4t.asm 482 | Code | 11 | | 2 | 00/05F6 : 86 C7 | STX {$C6}+1 ;CLEAR MANT1 (3 BYTES) FOR MUL/DIV.
|
||||
502 | 1 Unidrive4t.asm 483 | Code | 11 | | 2 | 00/05F8 : 86 C6 | STX {$C6}
|
||||
503 | 1 Unidrive4t.asm 484 | Code | 11 | | 2 | 00/05FA : B0 0D | BCS OVCHK ;IF CALC. SET CARRY,CHECK FOR OVFL
|
||||
504 | 1 Unidrive4t.asm 485 | Code | 11 | | 2 | 00/05FC : 30 04 | BMI MD3 ;IF NEG THEN NO UNDERFLOW.
|
||||
505 | 1 Unidrive4t.asm 486 | Code | 11 | | 1 | 00/05FE : 68 | PLA ;POP ONE RETURN LEVEL.
|
||||
506 | 1 Unidrive4t.asm 487 | Code | 11 | | 1 | 00/05FF : 68 | PLA
|
||||
507 | 1 Unidrive4t.asm 488 | Code | 11 | | 2 | 00/0600 : 90 B2 | BCC NORMX ;CLEAR X1 AND RETURN.
|
||||
508 | 1 Unidrive4t.asm 489 | Code | 11 | | 2 | 00/0602 : 49 80 | MD3 EOR #$80 ;COMPLEMENT SIGN BIT OF EXPONENT.
|
||||
509 | 1 Unidrive4t.asm 490 | Code | 11 | | 2 | 00/0604 : 85 C5 | STA {$C5} ;STORE IT.
|
||||
510 | 1 Unidrive4t.asm 491 | Code | 11 | | 2 | 00/0606 : A0 17 | LDY #$17 ;COUNT 24 MUL/23 DIV ITERATIONS.
|
||||
511 | 1 Unidrive4t.asm 492 | Code | 11 | | 1 | 00/0608 : 60 | RTS ;RETURN.
|
||||
512 | 1 Unidrive4t.asm 493 | Code | 11 | | 2 | 00/0609 : 10 F7 | OVCHK BPL MD3 ;IF POSITIVE EXP THEN NO OVFL.
|
||||
513 | 1 Unidrive4t.asm 494 | Code | 11 | | 3 | 00/060B : 4C 10 0C | OVFL JMP {$C10}
|
||||
514 | 1 Unidrive4t.asm 495 | Comment | 11 | | 0 | 00/060E | * ORG $F63D
|
||||
515 | 1 Unidrive4t.asm 496 | Code | 11 | | 3 | 00/060E : 20 8F 05 | FIX1 JSR RTAR
|
||||
516 | 1 Unidrive4t.asm 497 | Code | 11 | | 2 | 00/0611 : A5 C5 | FIX LDA {$C5} ; <------------------------------ fp to int
|
||||
517 | 1 Unidrive4t.asm 498 | Code | 11 | | 2 | 00/0613 : 10 13 | BPL UNDFL
|
||||
518 | 1 Unidrive4t.asm 499 | Code | 11 | | 2 | 00/0615 : C9 8E | CMP #$8E
|
||||
519 | 1 Unidrive4t.asm 500 | Code | 11 | | 2 | 00/0617 : D0 F5 | BNE FIX1
|
||||
520 | 1 Unidrive4t.asm 501 | Code | 11 | | 2 | 00/0619 : 24 C6 | BIT {$C6}
|
||||
521 | 1 Unidrive4t.asm 502 | Code | 11 | | 2 | 00/061B : 10 0A | BPL FIXRTS
|
||||
522 | 1 Unidrive4t.asm 503 | Code | 11 | | 2 | 00/061D : A5 C8 | LDA {$C6}+2
|
||||
523 | 1 Unidrive4t.asm 504 | Code | 11 | | 2 | 00/061F : F0 06 | BEQ FIXRTS
|
||||
524 | 1 Unidrive4t.asm 505 | Code | 11 | | 2 | 00/0621 : E6 C7 | INC {$C6}+1
|
||||
525 | 1 Unidrive4t.asm 506 | Code | 11 | | 2 | 00/0623 : D0 02 | BNE FIXRTS
|
||||
526 | 1 Unidrive4t.asm 507 | Code | 11 | | 2 | 00/0625 : E6 C6 | INC {$C6}
|
||||
527 | 1 Unidrive4t.asm 508 | Code | 11 | | 1 | 00/0627 : 60 | FIXRTS RTS
|
||||
528 | 1 Unidrive4t.asm 509 | Code | 11 | | 2 | 00/0628 : A9 00 | UNDFL LDA #$0
|
||||
529 | 1 Unidrive4t.asm 510 | Code | 11 | | 2 | 00/062A : 85 C6 | STA {$C6}
|
||||
530 | 1 Unidrive4t.asm 511 | Code | 11 | | 2 | 00/062C : 85 C7 | STA {$C6}+1
|
||||
531 | 1 Unidrive4t.asm 512 | Code | 11 | | 1 | 00/062E : 60 | RTS
|
||||
532 | 1 Unidrive4t.asm 513 | Comment | 11 | | 0 | 00/062F | ** Input Dynamic Data append in the end of Unidisk routine **
|
||||
533 | 1 Unidrive4t.asm 514 | Data | 11 | | 1 | 00/062F : 00 | FP1 dfb $00
|
||||
534 | 1 Unidrive4t.asm 515 | Data | 11 | | 1 | 00/0630 : 00 | dfb $00
|
||||
535 | 1 Unidrive4t.asm 516 | Data | 11 | | 1 | 00/0631 : 00 | dfb $00
|
||||
536 | 1 Unidrive4t.asm 517 | Data | 11 | | 1 | 00/0632 : 00 | dfb $00
|
||||
537 | 1 Unidrive4t.asm 518 | Comment | 11 | | 0 | 00/0633 | *
|
||||
538 | 1 Unidrive4t.asm 519 | Data | 11 | | 1 | 00/0633 : 00 | FP2 dfb $00
|
||||
539 | 1 Unidrive4t.asm 520 | Data | 11 | | 1 | 00/0634 : 00 | dfb $00
|
||||
540 | 1 Unidrive4t.asm 521 | Data | 11 | | 1 | 00/0635 : 00 | dfb $00
|
||||
541 | 1 Unidrive4t.asm 522 | Data | 11 | | 1 | 00/0636 : 00 | dfb $00
|
||||
------+--------------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
2
AppleII/FP operations/_FileInformation.txt
Normal file
2
AppleII/FP operations/_FileInformation.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Unidrive4t=Type(00),AuxType(0000),VersionCreate(70),MinVersion(BE),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)
|
||||
Unidrive4=Type(00),AuxType(0000),VersionCreate(70),MinVersion(BE),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)
|
BIN
AppleII/Integer adc 1 Byte/Unicalc
Normal file
BIN
AppleII/Integer adc 1 Byte/Unicalc
Normal file
Binary file not shown.
392
AppleII/Integer adc 1 Byte/Unicalc.asm
Normal file
392
AppleII/Integer adc 1 Byte/Unicalc.asm
Normal file
@ -0,0 +1,392 @@
|
||||
*
|
||||
* Unidisk 3.5 Calc <beta>
|
||||
*
|
||||
* The target of this project is to use the Unidisk 3.5 drive to perform
|
||||
* specific numerical routines: 1 Byte Add integer numbers calculation;
|
||||
* in order to use it as a Apple II co-processor unit.
|
||||
*
|
||||
* Copyright (C) 2015 Riccardo Greco <rigreco.grc@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* @com.wudsn.ide.asm.hardware=APPLE2
|
||||
* Protocol Converter Call
|
||||
XC
|
||||
ZPTempL equ $0006 ;Temporary zero page storage
|
||||
ZPTempH equ $0007
|
||||
*** Pointers ***
|
||||
LowMain equ $000A
|
||||
HiMain equ $000B
|
||||
*** Monitor routines ***
|
||||
COut equ $FDED ;Console output ASCII
|
||||
COUT1 equ $FDF0 ;Output to screen
|
||||
CROut equ $FD8E ;Carriage return
|
||||
PRbyte equ $FDDA ;Print byte in hex
|
||||
PRBL2 equ $F94A ;Print many spaces
|
||||
KEYIN equ $FD1B ;Waits for keypress
|
||||
** Command Code **
|
||||
StatusCmd equ 0
|
||||
** Status Code **
|
||||
StatusDIB equ 3
|
||||
StatusUNI equ 5
|
||||
*
|
||||
ControlCmd equ 4
|
||||
** Control Codes **
|
||||
Eject equ 4
|
||||
Run equ 5
|
||||
SetDWLoad equ 6
|
||||
DWLoad equ 7
|
||||
*
|
||||
org $8000
|
||||
*****************************************************
|
||||
* Presentation message **************
|
||||
*
|
||||
ldx #0
|
||||
LOOP equ *
|
||||
lda DATA,x
|
||||
beq ME2
|
||||
jsr COut
|
||||
inx
|
||||
bne LOOP
|
||||
*
|
||||
DATA asc 'UNIDISK 3.5 UTILITY BY R. GRECO'
|
||||
dfb $8D,0 ; Inverse mode on
|
||||
|
||||
ME2 jsr CROut
|
||||
jsr CROut
|
||||
|
||||
ldx #0
|
||||
LOOP2 equ *
|
||||
lda DATA2,x
|
||||
beq START
|
||||
ora #$80
|
||||
jsr COut
|
||||
inx
|
||||
bne LOOP2
|
||||
*
|
||||
DATA2 asc 'A X Y P'
|
||||
dfb $8D,0 ; Inverse mode on
|
||||
*****************************************************
|
||||
*
|
||||
* Find a Protocol Converter in one of the slots.
|
||||
START jsr FindPC
|
||||
bcs Error
|
||||
*
|
||||
* Now make the DIB call to the first guy
|
||||
*
|
||||
* jsr Dispatch
|
||||
* dfb StatusCmd
|
||||
* dw DParmsDIB
|
||||
* bcs Error
|
||||
*
|
||||
* Got the DIB; now print the name string
|
||||
*
|
||||
* ldx #0
|
||||
* morechars equ *
|
||||
* lda DIBName,x
|
||||
* ora #$80 ;COut wants high Bit set
|
||||
* jsr COut ; ASCII
|
||||
* inx
|
||||
* cpx DIBNameLen
|
||||
* bne morechars
|
||||
*************************************
|
||||
* ldx #02 ; Set 2 space
|
||||
* jsr PRBL2
|
||||
** Print Type ***********************
|
||||
* lda DIBType
|
||||
* jsr PRbyte ; HEX form
|
||||
*************************************
|
||||
* ldx #02 ; Set 2 space
|
||||
* jsr PRBL2
|
||||
** Print Firmware version ***********
|
||||
* ldx #0
|
||||
* morechars2 equ *
|
||||
* lda DIBVersion,x
|
||||
* jsr PRbyte ; HEX form
|
||||
* inx
|
||||
* cpx #$02 ; 2 Byte
|
||||
* bne morechars2
|
||||
* jsr COut
|
||||
**************************************
|
||||
jsr CROut
|
||||
** Wait keypress to continue **
|
||||
*
|
||||
jsr KEYIN
|
||||
*
|
||||
*** Eject ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw E_JECT
|
||||
*** Set start HiMain Memory Pointers ***
|
||||
* lda #$20 ; Hi Byte start (//c ram)
|
||||
* sta HiMain ; HiMain=$20 set
|
||||
*** Set Address ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw SET_ADD
|
||||
*** Download ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw DOWNLOAD
|
||||
*
|
||||
jsr EXEC ; Jump the Error routine
|
||||
rts
|
||||
*********************************************
|
||||
Error equ *
|
||||
*
|
||||
* There's either no PC around, or there was no give message
|
||||
*
|
||||
ldx #0
|
||||
err1 equ *
|
||||
lda Message,x
|
||||
beq errout
|
||||
jsr COut
|
||||
inx
|
||||
bne err1
|
||||
*
|
||||
errout equ *
|
||||
rts
|
||||
*
|
||||
Message asc 'NO PC OR NO DEVICE'
|
||||
dfb $8D,0
|
||||
*********************************************
|
||||
|
||||
*** Set and Reset LoMain Memory Counter ***
|
||||
* RESET ldx #$FF ;Lo Byte start One more before $00 (//c ram)
|
||||
* clc
|
||||
* ldy Y_reg ; 1 time $DF --> Y
|
||||
* iny ; Y+ --> $FF
|
||||
* sty Y_reg ; Y --> Y_reg Uni=$FF
|
||||
*** Execute ***
|
||||
* EXEC inx
|
||||
* stx LowMain ; 1 time set LowMain=$00
|
||||
* stx X_reg
|
||||
EXEC jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw EXE
|
||||
READ jsr Dispatch
|
||||
dfb StatusCmd
|
||||
dw DParms
|
||||
bcs Error
|
||||
*
|
||||
**** Screen Output ****
|
||||
*
|
||||
*** Accumulator ***
|
||||
lda UNIAcc_reg
|
||||
jsr PRbyte
|
||||
ldx #03 ; Set 3 space
|
||||
jsr PRBL2
|
||||
*** X Register ***
|
||||
lda UNIX_reg
|
||||
jsr PRbyte
|
||||
ldx #01 ; Set one space
|
||||
jsr PRBL2
|
||||
*** Y Register ***
|
||||
lda UNIY_reg
|
||||
jsr PRbyte
|
||||
ldx #03 ; Set one space
|
||||
jsr PRBL2
|
||||
*** Process Status ***
|
||||
lda UNIP_val
|
||||
jsr PRbyte
|
||||
ldx #05 ; Set five space
|
||||
jsr PRBL2
|
||||
** //c Memory store adress **
|
||||
* lda HiMain
|
||||
* jsr PRbyte
|
||||
* lda LowMain
|
||||
* jsr PRbyte
|
||||
* jsr CROut
|
||||
**** Store in //c Main Memory ****
|
||||
* ldx X_reg
|
||||
* lda UNIAcc_reg ;#$FB Test
|
||||
* ldy #0
|
||||
* sta (LowMain),y
|
||||
* cpx UNIL_End
|
||||
* bne EXEC
|
||||
* UNIL_End dfb $FF ; Lo Byte stop (Unidisk) - $C0 for zero page
|
||||
*** Increment HiMain ***
|
||||
* inc HiMain
|
||||
* ldy Y_reg
|
||||
* cpy UNIH_End
|
||||
* bne RESET
|
||||
* UNIH_End dfb $FF ; Hi Byte stop (Unidisk) - $00 for zero page
|
||||
*
|
||||
rts
|
||||
|
||||
******************************************************
|
||||
FindPC equ *
|
||||
*
|
||||
* Search slot 7 to slot 1 looking for signature bytes
|
||||
*
|
||||
ldx #7 ;Do for seven slots
|
||||
lda #$C7
|
||||
sta ZPTempH
|
||||
lda #$00
|
||||
sta ZPTempL
|
||||
*
|
||||
newslot equ *
|
||||
ldy #7
|
||||
*
|
||||
again equ *
|
||||
lda (ZPTempL),y
|
||||
cmp sigtab,y ;One for byte signature
|
||||
beq maybe ;Found one signature byte
|
||||
dec ZPTempH
|
||||
dex
|
||||
bne newslot
|
||||
*
|
||||
* if we get here, no PC find
|
||||
sec
|
||||
rts
|
||||
*
|
||||
* if we get here, no byte find on PC
|
||||
maybe equ *
|
||||
dey
|
||||
dey ;if N=1 then all sig bytes OK
|
||||
bpl again
|
||||
* Found PC interface. Set up call address.
|
||||
* we already have high byte ($CN), we need low byte
|
||||
*
|
||||
foundPC equ *
|
||||
lda #$FF
|
||||
sta ZPTempL
|
||||
ldy #0 ;For indirect load
|
||||
lda (ZPTempL),y ;Get the byte
|
||||
*
|
||||
* Now the Acc has the low oreder ProDOS entry point.
|
||||
* The PC entry is three locations past this ...
|
||||
*
|
||||
clc
|
||||
adc #3
|
||||
sta ZPTempL
|
||||
*
|
||||
* Now ZPTempL has PC entry point.
|
||||
* Return with carry clear.
|
||||
*
|
||||
clc
|
||||
rts
|
||||
***********************************************************
|
||||
*
|
||||
* There are the PC signature bytes in their relative order.
|
||||
* The $FF bytes are filler bytes and are not compared.
|
||||
*
|
||||
sigtab dfb $FF,$20,$FF,$00
|
||||
dfb $FF,$03,$FF,$00
|
||||
*
|
||||
Dispatch equ *
|
||||
jmp (ZPTempL) ;Simulate an indirect JSR to PC
|
||||
*
|
||||
*** Status Parameter Set for UNI ***
|
||||
DParms equ *
|
||||
DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
DPUnit dfb 1
|
||||
DPBuffer dw UNI
|
||||
DPStatCode dfb StatusUNI
|
||||
*
|
||||
*
|
||||
*** Status Parameter Set for DIB ***
|
||||
DParmsDIB equ *
|
||||
DPParmsCt2 dfb 3 ;Status calls have three parameters
|
||||
DPUnit2 dfb 1
|
||||
DPBuffer2 dw DIB
|
||||
DPStatCode2 dfb StatusDIB
|
||||
*
|
||||
*
|
||||
*** Status List DIB ***
|
||||
DIB equ *
|
||||
DIBStatByte1 dfb 0
|
||||
DIBDevSize dfb 0,0,0
|
||||
DIBNameLen dfb 0
|
||||
DIBName ds 16,0
|
||||
DIBType dfb 0
|
||||
DIBSubType dfb 0
|
||||
DIBVersion dw 0
|
||||
*
|
||||
*** Status List UNI ***
|
||||
UNI equ *
|
||||
dfb 0
|
||||
UNIError dfb 0
|
||||
UNIRetries dfb 0
|
||||
UNIAcc_reg dfb 0
|
||||
UNIX_reg dfb 0
|
||||
UNIY_reg dfb 0
|
||||
UNIP_val dfb 0
|
||||
HHH dfb 0
|
||||
*
|
||||
*** Set Address ***
|
||||
SET_ADD equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST3
|
||||
dfb SetDWLoad
|
||||
*
|
||||
*** Download ***
|
||||
DOWNLOAD equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST4
|
||||
dfb DWLoad
|
||||
*
|
||||
*** Execute ***
|
||||
EXE equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST2
|
||||
dfb Run
|
||||
*** Eject ***
|
||||
E_JECT equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST1
|
||||
dfb Eject
|
||||
*
|
||||
******** CONTROL LISTS ********
|
||||
*
|
||||
*
|
||||
*** Eject ***
|
||||
CNTL_LIST1 equ *
|
||||
dw $0000
|
||||
*
|
||||
*** Execute ***
|
||||
CNTL_LIST2 equ *
|
||||
Clow_byte dfb $06
|
||||
Chigh_byte dfb $00
|
||||
AccValue dfb $00 ; Input Value
|
||||
X_reg dfb $0A ; Input Value (N1)
|
||||
Y_reg dfb $01 ; Input Value (N2)
|
||||
ProStatus dfb $00
|
||||
LowPC_reg dfb $05
|
||||
HighPC_reg dfb $05
|
||||
*
|
||||
*** Set Address ***
|
||||
CNTL_LIST3 equ *
|
||||
CountL_byte dfb $02
|
||||
CountH_byte dfb $00
|
||||
LByte_Addr dfb $05
|
||||
HByte_Addr dfb $05
|
||||
*
|
||||
*** Download ***
|
||||
CNTL_LIST4 equ *
|
||||
LenghtL_byte dfb $09 ;<----- Lenght of Unidisk program Lo Byte
|
||||
LenghtH_byte dfb $00 ;<----- Lenght of Unidisk program Hi Byte
|
||||
*
|
||||
*** Start UNIDISK Program ***
|
||||
|
||||
stx $C0
|
||||
sty $C1
|
||||
|
||||
lda $C0
|
||||
adc $C1
|
||||
|
||||
rts
|
BIN
AppleII/Integer adc 1 Byte/Unicalc.do
Normal file
BIN
AppleII/Integer adc 1 Byte/Unicalc.do
Normal file
Binary file not shown.
415
AppleII/Integer adc 1 Byte/Unicalc_Output.txt
Normal file
415
AppleII/Integer adc 1 Byte/Unicalc_Output.txt
Normal file
@ -0,0 +1,415 @@
|
||||
------+-----------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
Line | # File Line | Line Type | MX | Reloc | Size | Address Object Code | Source Code
|
||||
------+-----------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
1 | 1 Unicalc.asm 1 | Comment | 11 | | 0 | 00/8000 | * @com.wudsn.ide.asm.hardware=APPLE2
|
||||
2 | 1 Unicalc.asm 2 | Comment | 11 | | 0 | 00/8000 | * Protocol Converter Call
|
||||
3 | 1 Unicalc.asm 3 | Directive | 11 | | 0 | 00/8000 | XC
|
||||
4 | 1 Unicalc.asm 4 | Equivalence | 11 | | 0 | 00/8000 | ZPTempL equ $0006 ;Temporary zero page storage
|
||||
5 | 1 Unicalc.asm 5 | Equivalence | 11 | | 0 | 00/8000 | ZPTempH equ $0007
|
||||
6 | 1 Unicalc.asm 6 | Comment | 11 | | 0 | 00/8000 | *** Pointers ***
|
||||
7 | 1 Unicalc.asm 7 | Equivalence | 11 | | 0 | 00/8000 | LowMain equ $000A
|
||||
8 | 1 Unicalc.asm 8 | Equivalence | 11 | | 0 | 00/8000 | HiMain equ $000B
|
||||
9 | 1 Unicalc.asm 9 | Comment | 11 | | 0 | 00/8000 | *** Monitor routines ***
|
||||
10 | 1 Unicalc.asm 10 | Equivalence | 11 | | 0 | 00/8000 | COut equ $FDED ;Console output ASCII
|
||||
11 | 1 Unicalc.asm 11 | Equivalence | 11 | | 0 | 00/8000 | COUT1 equ $FDF0 ;Output to screen
|
||||
12 | 1 Unicalc.asm 12 | Equivalence | 11 | | 0 | 00/8000 | CROut equ $FD8E ;Carriage return
|
||||
13 | 1 Unicalc.asm 13 | Equivalence | 11 | | 0 | 00/8000 | PRbyte equ $FDDA ;Print byte in hex
|
||||
14 | 1 Unicalc.asm 14 | Equivalence | 11 | | 0 | 00/8000 | PRBL2 equ $F94A ;Print many spaces
|
||||
15 | 1 Unicalc.asm 15 | Equivalence | 11 | | 0 | 00/8000 | KEYIN equ $FD1B ;Waits for keypress
|
||||
16 | 1 Unicalc.asm 16 | Comment | 11 | | 0 | 00/8000 | ** Command Code **
|
||||
17 | 1 Unicalc.asm 17 | Equivalence | 11 | | 0 | 00/8000 | StatusCmd equ 0
|
||||
18 | 1 Unicalc.asm 18 | Comment | 11 | | 0 | 00/8000 | ** Status Code **
|
||||
19 | 1 Unicalc.asm 19 | Equivalence | 11 | | 0 | 00/8000 | StatusDIB equ 3
|
||||
20 | 1 Unicalc.asm 20 | Equivalence | 11 | | 0 | 00/8000 | StatusUNI equ 5
|
||||
21 | 1 Unicalc.asm 21 | Comment | 11 | | 0 | 00/8000 | *
|
||||
22 | 1 Unicalc.asm 22 | Equivalence | 11 | | 0 | 00/8000 | ControlCmd equ 4
|
||||
23 | 1 Unicalc.asm 23 | Comment | 11 | | 0 | 00/8000 | ** Control Codes **
|
||||
24 | 1 Unicalc.asm 24 | Equivalence | 11 | | 0 | 00/8000 | Eject equ 4
|
||||
25 | 1 Unicalc.asm 25 | Equivalence | 11 | | 0 | 00/8000 | Run equ 5
|
||||
26 | 1 Unicalc.asm 26 | Equivalence | 11 | | 0 | 00/8000 | SetDWLoad equ 6
|
||||
27 | 1 Unicalc.asm 27 | Equivalence | 11 | | 0 | 00/8000 | DWLoad equ 7
|
||||
28 | 1 Unicalc.asm 28 | Comment | 11 | | 0 | 00/8000 | *
|
||||
29 | 1 Unicalc.asm 29 | Directive | 11 | | 0 | 00/8000 | org $8000
|
||||
30 | 1 Unicalc.asm 30 | Comment | 11 | | 0 | 00/8000 | *****************************************************
|
||||
31 | 1 Unicalc.asm 31 | Comment | 11 | | 0 | 00/8000 | * Presentation message **************
|
||||
32 | 1 Unicalc.asm 32 | Comment | 11 | | 0 | 00/8000 | *
|
||||
33 | 1 Unicalc.asm 33 | Code | 11 | | 2 | 00/8000 : A2 00 | ldx #0
|
||||
34 | 1 Unicalc.asm 34 | Empty | 11 | | 0 | 00/8002 | ozunid_1
|
||||
35 | 1 Unicalc.asm 34 | Equivalence | 11 | | 0 | 00/8002 | LOOP equ ozunid_1
|
||||
36 | 1 Unicalc.asm 35 | Code | 11 | | 3 | 00/8002 : BD 0D 80 | lda DATA,x
|
||||
37 | 1 Unicalc.asm 36 | Code | 11 | | 2 | 00/8005 : F0 27 | beq ME2
|
||||
38 | 1 Unicalc.asm 37 | Code | 11 | | 3 | 00/8007 : 20 ED FD | jsr {$FDED}
|
||||
39 | 1 Unicalc.asm 38 | Code | 11 | | 1 | 00/800A : E8 | inx
|
||||
40 | 1 Unicalc.asm 39 | Code | 11 | | 2 | 00/800B : D0 F5 | bne {ozunid_1}
|
||||
41 | 1 Unicalc.asm 40 | Comment | 11 | | 0 | 00/800D | *
|
||||
42 | 1 Unicalc.asm 41 | Data | 11 | | 31 | 00/800D : 55 4E 49 44 | DATA asc 'UNIDISK 3.5 UTILITY BY R. GRECO'
|
||||
| | | | | | 49 53 4B 20 |
|
||||
| | | | | | 33 2E 35 20 |
|
||||
| | | | | | 55 54 49 4C |
|
||||
| | | | | | 49 54 59 20 |
|
||||
| | | | | | 42 59 20 52 |
|
||||
| | | | | | 2E 20 47 52 |
|
||||
| | | | | | 45 43 4F |
|
||||
43 | 1 Unicalc.asm 42 | Data | 11 | | 2 | 00/802C : 8D 00 | dfb $8D,0 ; Inverse mode on
|
||||
44 | 1 Unicalc.asm 43 | Empty | 11 | | 0 | 00/802E |
|
||||
45 | 1 Unicalc.asm 44 | Code | 11 | | 3 | 00/802E : 20 8E FD | ME2 jsr {$FD8E}
|
||||
46 | 1 Unicalc.asm 45 | Code | 11 | | 3 | 00/8031 : 20 8E FD | jsr {$FD8E}
|
||||
47 | 1 Unicalc.asm 46 | Empty | 11 | | 0 | 00/8034 |
|
||||
48 | 1 Unicalc.asm 47 | Code | 11 | | 2 | 00/8034 : A2 00 | ldx #0
|
||||
49 | 1 Unicalc.asm 48 | Empty | 11 | | 0 | 00/8036 | ozunid_2
|
||||
50 | 1 Unicalc.asm 48 | Equivalence | 11 | | 0 | 00/8036 | LOOP2 equ ozunid_2
|
||||
51 | 1 Unicalc.asm 49 | Code | 11 | | 3 | 00/8036 : BD 43 80 | lda DATA2,x
|
||||
52 | 1 Unicalc.asm 50 | Code | 11 | | 2 | 00/8039 : F0 18 | beq START
|
||||
53 | 1 Unicalc.asm 51 | Code | 11 | | 2 | 00/803B : 09 80 | ora #$80
|
||||
54 | 1 Unicalc.asm 52 | Code | 11 | | 3 | 00/803D : 20 ED FD | jsr {$FDED}
|
||||
55 | 1 Unicalc.asm 53 | Code | 11 | | 1 | 00/8040 : E8 | inx
|
||||
56 | 1 Unicalc.asm 54 | Code | 11 | | 2 | 00/8041 : D0 F3 | bne {ozunid_2}
|
||||
57 | 1 Unicalc.asm 55 | Comment | 11 | | 0 | 00/8043 | *
|
||||
58 | 1 Unicalc.asm 56 | Data | 11 | | 14 | 00/8043 : 41 20 20 20 | DATA2 asc 'A X Y P'
|
||||
| | | | | | 20 58 20 20 |
|
||||
| | | | | | 59 20 20 20 |
|
||||
| | | | | | 20 50 |
|
||||
59 | 1 Unicalc.asm 57 | Data | 11 | | 2 | 00/8051 : 8D 00 | dfb $8D,0 ; Inverse mode on
|
||||
60 | 1 Unicalc.asm 58 | Comment | 11 | | 0 | 00/8053 | *****************************************************
|
||||
61 | 1 Unicalc.asm 59 | Comment | 11 | | 0 | 00/8053 | *
|
||||
62 | 1 Unicalc.asm 60 | Comment | 11 | | 0 | 00/8053 | * Find a Protocol Converter in one of the slots.
|
||||
63 | 1 Unicalc.asm 61 | Code | 11 | | 3 | 00/8053 : 20 D1 80 | START jsr {ozunid_6}
|
||||
64 | 1 Unicalc.asm 62 | Code | 11 | | 2 | 00/8056 : B0 1C | bcs {ozunid_3}
|
||||
65 | 1 Unicalc.asm 63 | Comment | 11 | | 0 | 00/8058 | *
|
||||
66 | 1 Unicalc.asm 64 | Comment | 11 | | 0 | 00/8058 | * Now make the DIB call to the first guy
|
||||
67 | 1 Unicalc.asm 65 | Comment | 11 | | 0 | 00/8058 | *
|
||||
68 | 1 Unicalc.asm 66 | Comment | 11 | | 0 | 00/8058 | * jsr Dispatch
|
||||
69 | 1 Unicalc.asm 67 | Comment | 11 | | 0 | 00/8058 | * dfb StatusCmd
|
||||
70 | 1 Unicalc.asm 68 | Comment | 11 | | 0 | 00/8058 | * dw DParmsDIB
|
||||
71 | 1 Unicalc.asm 69 | Comment | 11 | | 0 | 00/8058 | * bcs Error
|
||||
72 | 1 Unicalc.asm 70 | Comment | 11 | | 0 | 00/8058 | *
|
||||
73 | 1 Unicalc.asm 71 | Comment | 11 | | 0 | 00/8058 | * Got the DIB; now print the name string
|
||||
74 | 1 Unicalc.asm 72 | Comment | 11 | | 0 | 00/8058 | *
|
||||
75 | 1 Unicalc.asm 73 | Comment | 11 | | 0 | 00/8058 | * ldx #0
|
||||
76 | 1 Unicalc.asm 74 | Comment | 11 | | 0 | 00/8058 | * morechars equ *
|
||||
77 | 1 Unicalc.asm 75 | Comment | 11 | | 0 | 00/8058 | * lda DIBName,x
|
||||
78 | 1 Unicalc.asm 76 | Comment | 11 | | 0 | 00/8058 | * ora #$80 ;COut wants high Bit set
|
||||
79 | 1 Unicalc.asm 77 | Comment | 11 | | 0 | 00/8058 | * jsr COut ; ASCII
|
||||
80 | 1 Unicalc.asm 78 | Comment | 11 | | 0 | 00/8058 | * inx
|
||||
81 | 1 Unicalc.asm 79 | Comment | 11 | | 0 | 00/8058 | * cpx DIBNameLen
|
||||
82 | 1 Unicalc.asm 80 | Comment | 11 | | 0 | 00/8058 | * bne morechars
|
||||
83 | 1 Unicalc.asm 81 | Comment | 11 | | 0 | 00/8058 | *************************************
|
||||
84 | 1 Unicalc.asm 82 | Comment | 11 | | 0 | 00/8058 | * ldx #02 ; Set 2 space
|
||||
85 | 1 Unicalc.asm 83 | Comment | 11 | | 0 | 00/8058 | * jsr PRBL2
|
||||
86 | 1 Unicalc.asm 84 | Comment | 11 | | 0 | 00/8058 | ** Print Type ***********************
|
||||
87 | 1 Unicalc.asm 85 | Comment | 11 | | 0 | 00/8058 | * lda DIBType
|
||||
88 | 1 Unicalc.asm 86 | Comment | 11 | | 0 | 00/8058 | * jsr PRbyte ; HEX form
|
||||
89 | 1 Unicalc.asm 87 | Comment | 11 | | 0 | 00/8058 | *************************************
|
||||
90 | 1 Unicalc.asm 88 | Comment | 11 | | 0 | 00/8058 | * ldx #02 ; Set 2 space
|
||||
91 | 1 Unicalc.asm 89 | Comment | 11 | | 0 | 00/8058 | * jsr PRBL2
|
||||
92 | 1 Unicalc.asm 90 | Comment | 11 | | 0 | 00/8058 | ** Print Firmware version ***********
|
||||
93 | 1 Unicalc.asm 91 | Comment | 11 | | 0 | 00/8058 | * ldx #0
|
||||
94 | 1 Unicalc.asm 92 | Comment | 11 | | 0 | 00/8058 | * morechars2 equ *
|
||||
95 | 1 Unicalc.asm 93 | Comment | 11 | | 0 | 00/8058 | * lda DIBVersion,x
|
||||
96 | 1 Unicalc.asm 94 | Comment | 11 | | 0 | 00/8058 | * jsr PRbyte ; HEX form
|
||||
97 | 1 Unicalc.asm 95 | Comment | 11 | | 0 | 00/8058 | * inx
|
||||
98 | 1 Unicalc.asm 96 | Comment | 11 | | 0 | 00/8058 | * cpx #$02 ; 2 Byte
|
||||
99 | 1 Unicalc.asm 97 | Comment | 11 | | 0 | 00/8058 | * bne morechars2
|
||||
100 | 1 Unicalc.asm 98 | Comment | 11 | | 0 | 00/8058 | * jsr COut
|
||||
101 | 1 Unicalc.asm 99 | Comment | 11 | | 0 | 00/8058 | **************************************
|
||||
102 | 1 Unicalc.asm 100 | Code | 11 | | 3 | 00/8058 : 20 8E FD | jsr {$FD8E}
|
||||
103 | 1 Unicalc.asm 101 | Comment | 11 | | 0 | 00/805B | ** Wait keypress to continue **
|
||||
104 | 1 Unicalc.asm 102 | Comment | 11 | | 0 | 00/805B | *
|
||||
105 | 1 Unicalc.asm 103 | Code | 11 | | 3 | 00/805B : 20 1B FD | jsr {$FD1B}
|
||||
106 | 1 Unicalc.asm 104 | Comment | 11 | | 0 | 00/805E | *
|
||||
107 | 1 Unicalc.asm 105 | Comment | 11 | | 0 | 00/805E | *** Eject ***
|
||||
108 | 1 Unicalc.asm 106 | Code | 11 | | 3 | 00/805E : 20 06 81 | jsr {ozunid_11}
|
||||
109 | 1 Unicalc.asm 107 | Data | 11 | | 1 | 00/8061 : 04 | dfb {4}
|
||||
110 | 1 Unicalc.asm 108 | Data | 11 | | 2 | 00/8062 : 43 81 | dw {ozunid_19}
|
||||
111 | 1 Unicalc.asm 109 | Comment | 11 | | 0 | 00/8064 | *** Set start HiMain Memory Pointers ***
|
||||
112 | 1 Unicalc.asm 110 | Comment | 11 | | 0 | 00/8064 | * lda #$20 ; Hi Byte start (//c ram)
|
||||
113 | 1 Unicalc.asm 111 | Comment | 11 | | 0 | 00/8064 | * sta HiMain ; HiMain=$20 set
|
||||
114 | 1 Unicalc.asm 112 | Comment | 11 | | 0 | 00/8064 | *** Set Address ***
|
||||
115 | 1 Unicalc.asm 113 | Code | 11 | | 3 | 00/8064 : 20 06 81 | jsr {ozunid_11}
|
||||
116 | 1 Unicalc.asm 114 | Data | 11 | | 1 | 00/8067 : 04 | dfb {4}
|
||||
117 | 1 Unicalc.asm 115 | Data | 11 | | 2 | 00/8068 : 34 81 | dw {ozunid_16}
|
||||
118 | 1 Unicalc.asm 116 | Comment | 11 | | 0 | 00/806A | *** Download ***
|
||||
119 | 1 Unicalc.asm 117 | Code | 11 | | 3 | 00/806A : 20 06 81 | jsr {ozunid_11}
|
||||
120 | 1 Unicalc.asm 118 | Data | 11 | | 1 | 00/806D : 04 | dfb {4}
|
||||
121 | 1 Unicalc.asm 119 | Data | 11 | | 2 | 00/806E : 39 81 | dw {ozunid_17}
|
||||
122 | 1 Unicalc.asm 120 | Comment | 11 | | 0 | 00/8070 | *
|
||||
123 | 1 Unicalc.asm 121 | Code | 11 | | 3 | 00/8070 : 20 96 80 | jsr EXEC ; Jump the Error routine
|
||||
124 | 1 Unicalc.asm 122 | Code | 11 | | 1 | 00/8073 : 60 | rts
|
||||
125 | 1 Unicalc.asm 123 | Comment | 11 | | 0 | 00/8074 | *********************************************
|
||||
126 | 1 Unicalc.asm 124 | Empty | 11 | | 0 | 00/8074 | ozunid_3
|
||||
127 | 1 Unicalc.asm 124 | Equivalence | 11 | | 0 | 00/8074 | Error equ ozunid_3
|
||||
128 | 1 Unicalc.asm 125 | Comment | 11 | | 0 | 00/8074 | *
|
||||
129 | 1 Unicalc.asm 126 | Comment | 11 | | 0 | 00/8074 | * There's either no PC around, or there was no give message
|
||||
130 | 1 Unicalc.asm 127 | Comment | 11 | | 0 | 00/8074 | *
|
||||
131 | 1 Unicalc.asm 128 | Code | 11 | | 2 | 00/8074 : A2 00 | ldx #0
|
||||
132 | 1 Unicalc.asm 129 | Empty | 11 | | 0 | 00/8076 | ozunid_4
|
||||
133 | 1 Unicalc.asm 129 | Equivalence | 11 | | 0 | 00/8076 | err1 equ ozunid_4
|
||||
134 | 1 Unicalc.asm 130 | Code | 11 | | 3 | 00/8076 : BD 82 80 | lda Message,x
|
||||
135 | 1 Unicalc.asm 131 | Code | 11 | | 2 | 00/8079 : F0 06 | beq {ozunid_5}
|
||||
136 | 1 Unicalc.asm 132 | Code | 11 | | 3 | 00/807B : 20 ED FD | jsr {$FDED}
|
||||
137 | 1 Unicalc.asm 133 | Code | 11 | | 1 | 00/807E : E8 | inx
|
||||
138 | 1 Unicalc.asm 134 | Code | 11 | | 2 | 00/807F : D0 F5 | bne {ozunid_4}
|
||||
139 | 1 Unicalc.asm 135 | Comment | 11 | | 0 | 00/8081 | *
|
||||
140 | 1 Unicalc.asm 136 | Empty | 11 | | 0 | 00/8081 | ozunid_5
|
||||
141 | 1 Unicalc.asm 136 | Equivalence | 11 | | 0 | 00/8081 | errout equ ozunid_5
|
||||
142 | 1 Unicalc.asm 137 | Code | 11 | | 1 | 00/8081 : 60 | rts
|
||||
143 | 1 Unicalc.asm 138 | Comment | 11 | | 0 | 00/8082 | *
|
||||
144 | 1 Unicalc.asm 139 | Data | 11 | | 18 | 00/8082 : 4E 4F 20 50 | Message asc 'NO PC OR NO DEVICE'
|
||||
| | | | | | 43 20 4F 52 |
|
||||
| | | | | | 20 4E 4F 20 |
|
||||
| | | | | | 44 45 56 49 |
|
||||
| | | | | | 43 45 |
|
||||
145 | 1 Unicalc.asm 140 | Data | 11 | | 2 | 00/8094 : 8D 00 | dfb $8D,0
|
||||
146 | 1 Unicalc.asm 141 | Comment | 11 | | 0 | 00/8096 | *********************************************
|
||||
147 | 1 Unicalc.asm 142 | Empty | 11 | | 0 | 00/8096 |
|
||||
148 | 1 Unicalc.asm 143 | Comment | 11 | | 0 | 00/8096 | *** Set and Reset LoMain Memory Counter ***
|
||||
149 | 1 Unicalc.asm 144 | Comment | 11 | | 0 | 00/8096 | * RESET ldx #$FF ;Lo Byte start One more before $00 (//c ram)
|
||||
150 | 1 Unicalc.asm 145 | Comment | 11 | | 0 | 00/8096 | * clc
|
||||
151 | 1 Unicalc.asm 146 | Comment | 11 | | 0 | 00/8096 | * ldy Y_reg ; 1 time $DF --> Y
|
||||
152 | 1 Unicalc.asm 147 | Comment | 11 | | 0 | 00/8096 | * iny ; Y+ --> $FF
|
||||
153 | 1 Unicalc.asm 148 | Comment | 11 | | 0 | 00/8096 | * sty Y_reg ; Y --> Y_reg Uni=$FF
|
||||
154 | 1 Unicalc.asm 149 | Comment | 11 | | 0 | 00/8096 | *** Execute ***
|
||||
155 | 1 Unicalc.asm 150 | Comment | 11 | | 0 | 00/8096 | * EXEC inx
|
||||
156 | 1 Unicalc.asm 151 | Comment | 11 | | 0 | 00/8096 | * stx LowMain ; 1 time set LowMain=$00
|
||||
157 | 1 Unicalc.asm 152 | Comment | 11 | | 0 | 00/8096 | * stx X_reg
|
||||
158 | 1 Unicalc.asm 153 | Code | 11 | | 3 | 00/8096 : 20 06 81 | EXEC jsr {ozunid_11}
|
||||
159 | 1 Unicalc.asm 154 | Data | 11 | | 1 | 00/8099 : 04 | dfb {4}
|
||||
160 | 1 Unicalc.asm 155 | Data | 11 | | 2 | 00/809A : 3E 81 | dw {ozunid_18}
|
||||
161 | 1 Unicalc.asm 156 | Code | 11 | | 3 | 00/809C : 20 06 81 | READ jsr {ozunid_11}
|
||||
162 | 1 Unicalc.asm 157 | Data | 11 | | 1 | 00/809F : 00 | dfb {0}
|
||||
163 | 1 Unicalc.asm 158 | Data | 11 | | 2 | 00/80A0 : 09 81 | dw {ozunid_12}
|
||||
164 | 1 Unicalc.asm 159 | Code | 11 | | 2 | 00/80A2 : B0 D0 | bcs {ozunid_3}
|
||||
165 | 1 Unicalc.asm 160 | Comment | 11 | | 0 | 00/80A4 | *
|
||||
166 | 1 Unicalc.asm 161 | Comment | 11 | | 0 | 00/80A4 | **** Screen Output ****
|
||||
167 | 1 Unicalc.asm 162 | Comment | 11 | | 0 | 00/80A4 | *
|
||||
168 | 1 Unicalc.asm 163 | Comment | 11 | | 0 | 00/80A4 | *** Accumulator ***
|
||||
169 | 1 Unicalc.asm 164 | Code | 11 | | 3 | 00/80A4 : AD 2F 81 | lda UNIAcc_reg
|
||||
170 | 1 Unicalc.asm 165 | Code | 11 | | 3 | 00/80A7 : 20 DA FD | jsr {$FDDA}
|
||||
171 | 1 Unicalc.asm 166 | Code | 11 | | 2 | 00/80AA : A2 03 | ldx #03 ; Set 3 space
|
||||
172 | 1 Unicalc.asm 167 | Code | 11 | | 3 | 00/80AC : 20 4A F9 | jsr {$F94A}
|
||||
173 | 1 Unicalc.asm 168 | Comment | 11 | | 0 | 00/80AF | *** X Register ***
|
||||
174 | 1 Unicalc.asm 169 | Code | 11 | | 3 | 00/80AF : AD 30 81 | lda UNIX_reg
|
||||
175 | 1 Unicalc.asm 170 | Code | 11 | | 3 | 00/80B2 : 20 DA FD | jsr {$FDDA}
|
||||
176 | 1 Unicalc.asm 171 | Code | 11 | | 2 | 00/80B5 : A2 01 | ldx #01 ; Set one space
|
||||
177 | 1 Unicalc.asm 172 | Code | 11 | | 3 | 00/80B7 : 20 4A F9 | jsr {$F94A}
|
||||
178 | 1 Unicalc.asm 173 | Comment | 11 | | 0 | 00/80BA | *** Y Register ***
|
||||
179 | 1 Unicalc.asm 174 | Code | 11 | | 3 | 00/80BA : AD 31 81 | lda UNIY_reg
|
||||
180 | 1 Unicalc.asm 175 | Code | 11 | | 3 | 00/80BD : 20 DA FD | jsr {$FDDA}
|
||||
181 | 1 Unicalc.asm 176 | Code | 11 | | 2 | 00/80C0 : A2 03 | ldx #03 ; Set one space
|
||||
182 | 1 Unicalc.asm 177 | Code | 11 | | 3 | 00/80C2 : 20 4A F9 | jsr {$F94A}
|
||||
183 | 1 Unicalc.asm 178 | Comment | 11 | | 0 | 00/80C5 | *** Process Status ***
|
||||
184 | 1 Unicalc.asm 179 | Code | 11 | | 3 | 00/80C5 : AD 32 81 | lda UNIP_val
|
||||
185 | 1 Unicalc.asm 180 | Code | 11 | | 3 | 00/80C8 : 20 DA FD | jsr {$FDDA}
|
||||
186 | 1 Unicalc.asm 181 | Code | 11 | | 2 | 00/80CB : A2 05 | ldx #05 ; Set five space
|
||||
187 | 1 Unicalc.asm 182 | Code | 11 | | 3 | 00/80CD : 20 4A F9 | jsr {$F94A}
|
||||
188 | 1 Unicalc.asm 183 | Comment | 11 | | 0 | 00/80D0 | ** //c Memory store adress **
|
||||
189 | 1 Unicalc.asm 184 | Comment | 11 | | 0 | 00/80D0 | * lda HiMain
|
||||
190 | 1 Unicalc.asm 185 | Comment | 11 | | 0 | 00/80D0 | * jsr PRbyte
|
||||
191 | 1 Unicalc.asm 186 | Comment | 11 | | 0 | 00/80D0 | * lda LowMain
|
||||
192 | 1 Unicalc.asm 187 | Comment | 11 | | 0 | 00/80D0 | * jsr PRbyte
|
||||
193 | 1 Unicalc.asm 188 | Comment | 11 | | 0 | 00/80D0 | * jsr CROut
|
||||
194 | 1 Unicalc.asm 189 | Comment | 11 | | 0 | 00/80D0 | **** Store in //c Main Memory ****
|
||||
195 | 1 Unicalc.asm 190 | Comment | 11 | | 0 | 00/80D0 | * ldx X_reg
|
||||
196 | 1 Unicalc.asm 191 | Comment | 11 | | 0 | 00/80D0 | * lda UNIAcc_reg ;#$FB Test
|
||||
197 | 1 Unicalc.asm 192 | Comment | 11 | | 0 | 00/80D0 | * ldy #0
|
||||
198 | 1 Unicalc.asm 193 | Comment | 11 | | 0 | 00/80D0 | * sta (LowMain),y
|
||||
199 | 1 Unicalc.asm 194 | Comment | 11 | | 0 | 00/80D0 | * cpx UNIL_End
|
||||
200 | 1 Unicalc.asm 195 | Comment | 11 | | 0 | 00/80D0 | * bne EXEC
|
||||
201 | 1 Unicalc.asm 196 | Comment | 11 | | 0 | 00/80D0 | * UNIL_End dfb $FF ; Lo Byte stop (Unidisk) - $C0 for zero page
|
||||
202 | 1 Unicalc.asm 197 | Comment | 11 | | 0 | 00/80D0 | *** Increment HiMain ***
|
||||
203 | 1 Unicalc.asm 198 | Comment | 11 | | 0 | 00/80D0 | * inc HiMain
|
||||
204 | 1 Unicalc.asm 199 | Comment | 11 | | 0 | 00/80D0 | * ldy Y_reg
|
||||
205 | 1 Unicalc.asm 200 | Comment | 11 | | 0 | 00/80D0 | * cpy UNIH_End
|
||||
206 | 1 Unicalc.asm 201 | Comment | 11 | | 0 | 00/80D0 | * bne RESET
|
||||
207 | 1 Unicalc.asm 202 | Comment | 11 | | 0 | 00/80D0 | * UNIH_End dfb $FF ; Hi Byte stop (Unidisk) - $00 for zero page
|
||||
208 | 1 Unicalc.asm 203 | Comment | 11 | | 0 | 00/80D0 | *
|
||||
209 | 1 Unicalc.asm 204 | Code | 11 | | 1 | 00/80D0 : 60 | rts
|
||||
210 | 1 Unicalc.asm 205 | Empty | 11 | | 0 | 00/80D1 |
|
||||
211 | 1 Unicalc.asm 206 | Comment | 11 | | 0 | 00/80D1 | ******************************************************
|
||||
212 | 1 Unicalc.asm 207 | Empty | 11 | | 0 | 00/80D1 | ozunid_6
|
||||
213 | 1 Unicalc.asm 207 | Equivalence | 11 | | 0 | 00/80D1 | FindPC equ ozunid_6
|
||||
214 | 1 Unicalc.asm 208 | Comment | 11 | | 0 | 00/80D1 | *
|
||||
215 | 1 Unicalc.asm 209 | Comment | 11 | | 0 | 00/80D1 | * Search slot 7 to slot 1 looking for signature bytes
|
||||
216 | 1 Unicalc.asm 210 | Comment | 11 | | 0 | 00/80D1 | *
|
||||
217 | 1 Unicalc.asm 211 | Code | 11 | | 2 | 00/80D1 : A2 07 | ldx #7 ;Do for seven slots
|
||||
218 | 1 Unicalc.asm 212 | Code | 11 | | 2 | 00/80D3 : A9 C7 | lda #$C7
|
||||
219 | 1 Unicalc.asm 213 | Code | 11 | | 2 | 00/80D5 : 85 07 | sta {$0007}
|
||||
220 | 1 Unicalc.asm 214 | Code | 11 | | 2 | 00/80D7 : A9 00 | lda #$00
|
||||
221 | 1 Unicalc.asm 215 | Code | 11 | | 2 | 00/80D9 : 85 06 | sta {$0006}
|
||||
222 | 1 Unicalc.asm 216 | Comment | 11 | | 0 | 00/80DB | *
|
||||
223 | 1 Unicalc.asm 217 | Empty | 11 | | 0 | 00/80DB | ozunid_7
|
||||
224 | 1 Unicalc.asm 217 | Equivalence | 11 | | 0 | 00/80DB | newslot equ ozunid_7
|
||||
225 | 1 Unicalc.asm 218 | Code | 11 | | 2 | 00/80DB : A0 07 | ldy #7
|
||||
226 | 1 Unicalc.asm 219 | Comment | 11 | | 0 | 00/80DD | *
|
||||
227 | 1 Unicalc.asm 220 | Empty | 11 | | 0 | 00/80DD | ozunid_8
|
||||
228 | 1 Unicalc.asm 220 | Equivalence | 11 | | 0 | 00/80DD | again equ ozunid_8
|
||||
229 | 1 Unicalc.asm 221 | Code | 11 | | 2 | 00/80DD : B1 06 | lda ({$0006}),y
|
||||
230 | 1 Unicalc.asm 222 | Code | 11 | | 3 | 00/80DF : D9 FE 80 | cmp sigtab,y ;One for byte signature
|
||||
231 | 1 Unicalc.asm 223 | Code | 11 | | 2 | 00/80E2 : F0 07 | beq {ozunid_9} ;Found one signature byte
|
||||
232 | 1 Unicalc.asm 224 | Code | 11 | | 2 | 00/80E4 : C6 07 | dec {$0007}
|
||||
233 | 1 Unicalc.asm 225 | Code | 11 | | 1 | 00/80E6 : CA | dex
|
||||
234 | 1 Unicalc.asm 226 | Code | 11 | | 2 | 00/80E7 : D0 F2 | bne {ozunid_7}
|
||||
235 | 1 Unicalc.asm 227 | Comment | 11 | | 0 | 00/80E9 | *
|
||||
236 | 1 Unicalc.asm 228 | Comment | 11 | | 0 | 00/80E9 | * if we get here, no PC find
|
||||
237 | 1 Unicalc.asm 229 | Code | 11 | | 1 | 00/80E9 : 38 | sec
|
||||
238 | 1 Unicalc.asm 230 | Code | 11 | | 1 | 00/80EA : 60 | rts
|
||||
239 | 1 Unicalc.asm 231 | Comment | 11 | | 0 | 00/80EB | *
|
||||
240 | 1 Unicalc.asm 232 | Comment | 11 | | 0 | 00/80EB | * if we get here, no byte find on PC
|
||||
241 | 1 Unicalc.asm 233 | Empty | 11 | | 0 | 00/80EB | ozunid_9
|
||||
242 | 1 Unicalc.asm 233 | Equivalence | 11 | | 0 | 00/80EB | maybe equ ozunid_9
|
||||
243 | 1 Unicalc.asm 234 | Code | 11 | | 1 | 00/80EB : 88 | dey
|
||||
244 | 1 Unicalc.asm 235 | Code | 11 | | 1 | 00/80EC : 88 | dey ;if N=1 then all sig bytes OK
|
||||
245 | 1 Unicalc.asm 236 | Code | 11 | | 2 | 00/80ED : 10 EE | bpl {ozunid_8}
|
||||
246 | 1 Unicalc.asm 237 | Comment | 11 | | 0 | 00/80EF | * Found PC interface. Set up call address.
|
||||
247 | 1 Unicalc.asm 238 | Comment | 11 | | 0 | 00/80EF | * we already have high byte ($CN), we need low byte
|
||||
248 | 1 Unicalc.asm 239 | Comment | 11 | | 0 | 00/80EF | *
|
||||
249 | 1 Unicalc.asm 240 | Empty | 11 | | 0 | 00/80EF | ozunid_10
|
||||
250 | 1 Unicalc.asm 240 | Equivalence | 11 | | 0 | 00/80EF | foundPC equ ozunid_10
|
||||
251 | 1 Unicalc.asm 241 | Code | 11 | | 2 | 00/80EF : A9 FF | lda #$FF
|
||||
252 | 1 Unicalc.asm 242 | Code | 11 | | 2 | 00/80F1 : 85 06 | sta {$0006}
|
||||
253 | 1 Unicalc.asm 243 | Code | 11 | | 2 | 00/80F3 : A0 00 | ldy #0 ;For indirect load
|
||||
254 | 1 Unicalc.asm 244 | Code | 11 | | 2 | 00/80F5 : B1 06 | lda ({$0006}),y ;Get the byte
|
||||
255 | 1 Unicalc.asm 245 | Comment | 11 | | 0 | 00/80F7 | *
|
||||
256 | 1 Unicalc.asm 246 | Comment | 11 | | 0 | 00/80F7 | * Now the Acc has the low oreder ProDOS entry point.
|
||||
257 | 1 Unicalc.asm 247 | Comment | 11 | | 0 | 00/80F7 | * The PC entry is three locations past this ...
|
||||
258 | 1 Unicalc.asm 248 | Comment | 11 | | 0 | 00/80F7 | *
|
||||
259 | 1 Unicalc.asm 249 | Code | 11 | | 1 | 00/80F7 : 18 | clc
|
||||
260 | 1 Unicalc.asm 250 | Code | 11 | | 2 | 00/80F8 : 69 03 | adc #3
|
||||
261 | 1 Unicalc.asm 251 | Code | 11 | | 2 | 00/80FA : 85 06 | sta {$0006}
|
||||
262 | 1 Unicalc.asm 252 | Comment | 11 | | 0 | 00/80FC | *
|
||||
263 | 1 Unicalc.asm 253 | Comment | 11 | | 0 | 00/80FC | * Now ZPTempL has PC entry point.
|
||||
264 | 1 Unicalc.asm 254 | Comment | 11 | | 0 | 00/80FC | * Return with carry clear.
|
||||
265 | 1 Unicalc.asm 255 | Comment | 11 | | 0 | 00/80FC | *
|
||||
266 | 1 Unicalc.asm 256 | Code | 11 | | 1 | 00/80FC : 18 | clc
|
||||
267 | 1 Unicalc.asm 257 | Code | 11 | | 1 | 00/80FD : 60 | rts
|
||||
268 | 1 Unicalc.asm 258 | Comment | 11 | | 0 | 00/80FE | ***********************************************************
|
||||
269 | 1 Unicalc.asm 259 | Comment | 11 | | 0 | 00/80FE | *
|
||||
270 | 1 Unicalc.asm 260 | Comment | 11 | | 0 | 00/80FE | * There are the PC signature bytes in their relative order.
|
||||
271 | 1 Unicalc.asm 261 | Comment | 11 | | 0 | 00/80FE | * The $FF bytes are filler bytes and are not compared.
|
||||
272 | 1 Unicalc.asm 262 | Comment | 11 | | 0 | 00/80FE | *
|
||||
273 | 1 Unicalc.asm 263 | Data | 11 | | 4 | 00/80FE : FF 20 FF 00 | sigtab dfb $FF,$20,$FF,$00
|
||||
274 | 1 Unicalc.asm 264 | Data | 11 | | 4 | 00/8102 : FF 03 FF 00 | dfb $FF,$03,$FF,$00
|
||||
275 | 1 Unicalc.asm 265 | Comment | 11 | | 0 | 00/8106 | *
|
||||
276 | 1 Unicalc.asm 266 | Empty | 11 | | 0 | 00/8106 | ozunid_11
|
||||
277 | 1 Unicalc.asm 266 | Equivalence | 11 | | 0 | 00/8106 | Dispatch equ ozunid_11
|
||||
278 | 1 Unicalc.asm 267 | Code | 11 | | 3 | 00/8106 : 6C 06 00 | jmp ({$0006}) ;Simulate an indirect JSR to PC
|
||||
279 | 1 Unicalc.asm 268 | Comment | 11 | | 0 | 00/8109 | *
|
||||
280 | 1 Unicalc.asm 269 | Comment | 11 | | 0 | 00/8109 | *** Status Parameter Set for UNI ***
|
||||
281 | 1 Unicalc.asm 270 | Empty | 11 | | 0 | 00/8109 | ozunid_12
|
||||
282 | 1 Unicalc.asm 270 | Equivalence | 11 | | 0 | 00/8109 | DParms equ ozunid_12
|
||||
283 | 1 Unicalc.asm 271 | Data | 11 | | 1 | 00/8109 : 03 | DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
284 | 1 Unicalc.asm 272 | Data | 11 | | 1 | 00/810A : 01 | DPUnit dfb 1
|
||||
285 | 1 Unicalc.asm 273 | Data | 11 | | 2 | 00/810B : 2C 81 | DPBuffer dw {ozunid_15}
|
||||
286 | 1 Unicalc.asm 274 | Data | 11 | | 1 | 00/810D : 05 | DPStatCode dfb {5}
|
||||
287 | 1 Unicalc.asm 275 | Comment | 11 | | 0 | 00/810E | *
|
||||
288 | 1 Unicalc.asm 276 | Comment | 11 | | 0 | 00/810E | *
|
||||
289 | 1 Unicalc.asm 277 | Comment | 11 | | 0 | 00/810E | *** Status Parameter Set for DIB ***
|
||||
290 | 1 Unicalc.asm 278 | Empty | 11 | | 0 | 00/810E | ozunid_13
|
||||
291 | 1 Unicalc.asm 278 | Equivalence | 11 | | 0 | 00/810E | DParmsDIB equ ozunid_13
|
||||
292 | 1 Unicalc.asm 279 | Data | 11 | | 1 | 00/810E : 03 | DPParmsCt2 dfb 3 ;Status calls have three parameters
|
||||
293 | 1 Unicalc.asm 280 | Data | 11 | | 1 | 00/810F : 01 | DPUnit2 dfb 1
|
||||
294 | 1 Unicalc.asm 281 | Data | 11 | | 2 | 00/8110 : 13 81 | DPBuffer2 dw {ozunid_14}
|
||||
295 | 1 Unicalc.asm 282 | Data | 11 | | 1 | 00/8112 : 03 | DPStatCode2 dfb {3}
|
||||
296 | 1 Unicalc.asm 283 | Comment | 11 | | 0 | 00/8113 | *
|
||||
297 | 1 Unicalc.asm 284 | Comment | 11 | | 0 | 00/8113 | *
|
||||
298 | 1 Unicalc.asm 285 | Comment | 11 | | 0 | 00/8113 | *** Status List DIB ***
|
||||
299 | 1 Unicalc.asm 286 | Empty | 11 | | 0 | 00/8113 | ozunid_14
|
||||
300 | 1 Unicalc.asm 286 | Equivalence | 11 | | 0 | 00/8113 | DIB equ ozunid_14
|
||||
301 | 1 Unicalc.asm 287 | Data | 11 | | 1 | 00/8113 : 00 | DIBStatByte1 dfb 0
|
||||
302 | 1 Unicalc.asm 288 | Data | 11 | | 3 | 00/8114 : 00 00 00 | DIBDevSize dfb 0,0,0
|
||||
303 | 1 Unicalc.asm 289 | Data | 11 | | 1 | 00/8117 : 00 | DIBNameLen dfb 0
|
||||
304 | 1 Unicalc.asm 290 | Data | 11 | | 16 | 00/8118 : 00 00 00 00 | DIBName ds 16,0
|
||||
| | | | | | 00 00 00 00 |
|
||||
| | | | | | 00 00 00 00 |
|
||||
| | | | | | 00 00 00 00 |
|
||||
305 | 1 Unicalc.asm 291 | Data | 11 | | 1 | 00/8128 : 00 | DIBType dfb 0
|
||||
306 | 1 Unicalc.asm 292 | Data | 11 | | 1 | 00/8129 : 00 | DIBSubType dfb 0
|
||||
307 | 1 Unicalc.asm 293 | Data | 11 | | 2 | 00/812A : 00 00 | DIBVersion dw 0
|
||||
308 | 1 Unicalc.asm 294 | Comment | 11 | | 0 | 00/812C | *
|
||||
309 | 1 Unicalc.asm 295 | Comment | 11 | | 0 | 00/812C | *** Status List UNI ***
|
||||
310 | 1 Unicalc.asm 296 | Empty | 11 | | 0 | 00/812C | ozunid_15
|
||||
311 | 1 Unicalc.asm 296 | Equivalence | 11 | | 0 | 00/812C | UNI equ ozunid_15
|
||||
312 | 1 Unicalc.asm 297 | Data | 11 | | 1 | 00/812C : 00 | dfb 0
|
||||
313 | 1 Unicalc.asm 298 | Data | 11 | | 1 | 00/812D : 00 | UNIError dfb 0
|
||||
314 | 1 Unicalc.asm 299 | Data | 11 | | 1 | 00/812E : 00 | UNIRetries dfb 0
|
||||
315 | 1 Unicalc.asm 300 | Data | 11 | | 1 | 00/812F : 00 | UNIAcc_reg dfb 0
|
||||
316 | 1 Unicalc.asm 301 | Data | 11 | | 1 | 00/8130 : 00 | UNIX_reg dfb 0
|
||||
317 | 1 Unicalc.asm 302 | Data | 11 | | 1 | 00/8131 : 00 | UNIY_reg dfb 0
|
||||
318 | 1 Unicalc.asm 303 | Data | 11 | | 1 | 00/8132 : 00 | UNIP_val dfb 0
|
||||
319 | 1 Unicalc.asm 304 | Data | 11 | | 1 | 00/8133 : 00 | HHH dfb 0
|
||||
320 | 1 Unicalc.asm 305 | Comment | 11 | | 0 | 00/8134 | *
|
||||
321 | 1 Unicalc.asm 306 | Comment | 11 | | 0 | 00/8134 | *** Set Address ***
|
||||
322 | 1 Unicalc.asm 307 | Empty | 11 | | 0 | 00/8134 | ozunid_16
|
||||
323 | 1 Unicalc.asm 307 | Equivalence | 11 | | 0 | 00/8134 | SET_ADD equ ozunid_16
|
||||
324 | 1 Unicalc.asm 308 | Data | 11 | | 1 | 00/8134 : 03 | dfb 3
|
||||
325 | 1 Unicalc.asm 309 | Data | 11 | | 1 | 00/8135 : 01 | dfb 1
|
||||
326 | 1 Unicalc.asm 310 | Data | 11 | | 2 | 00/8136 : 52 81 | dw {ozunid_22}
|
||||
327 | 1 Unicalc.asm 311 | Data | 11 | | 1 | 00/8138 : 06 | dfb {6}
|
||||
328 | 1 Unicalc.asm 312 | Comment | 11 | | 0 | 00/8139 | *
|
||||
329 | 1 Unicalc.asm 313 | Comment | 11 | | 0 | 00/8139 | *** Download ***
|
||||
330 | 1 Unicalc.asm 314 | Empty | 11 | | 0 | 00/8139 | ozunid_17
|
||||
331 | 1 Unicalc.asm 314 | Equivalence | 11 | | 0 | 00/8139 | DOWNLOAD equ ozunid_17
|
||||
332 | 1 Unicalc.asm 315 | Data | 11 | | 1 | 00/8139 : 03 | dfb 3
|
||||
333 | 1 Unicalc.asm 316 | Data | 11 | | 1 | 00/813A : 01 | dfb 1
|
||||
334 | 1 Unicalc.asm 317 | Data | 11 | | 2 | 00/813B : 56 81 | dw {ozunid_23}
|
||||
335 | 1 Unicalc.asm 318 | Data | 11 | | 1 | 00/813D : 07 | dfb {7}
|
||||
336 | 1 Unicalc.asm 319 | Comment | 11 | | 0 | 00/813E | *
|
||||
337 | 1 Unicalc.asm 320 | Comment | 11 | | 0 | 00/813E | *** Execute ***
|
||||
338 | 1 Unicalc.asm 321 | Empty | 11 | | 0 | 00/813E | ozunid_18
|
||||
339 | 1 Unicalc.asm 321 | Equivalence | 11 | | 0 | 00/813E | EXE equ ozunid_18
|
||||
340 | 1 Unicalc.asm 322 | Data | 11 | | 1 | 00/813E : 03 | dfb 3
|
||||
341 | 1 Unicalc.asm 323 | Data | 11 | | 1 | 00/813F : 01 | dfb 1
|
||||
342 | 1 Unicalc.asm 324 | Data | 11 | | 2 | 00/8140 : 4A 81 | dw {ozunid_21}
|
||||
343 | 1 Unicalc.asm 325 | Data | 11 | | 1 | 00/8142 : 05 | dfb {5}
|
||||
344 | 1 Unicalc.asm 326 | Comment | 11 | | 0 | 00/8143 | *** Eject ***
|
||||
345 | 1 Unicalc.asm 327 | Empty | 11 | | 0 | 00/8143 | ozunid_19
|
||||
346 | 1 Unicalc.asm 327 | Equivalence | 11 | | 0 | 00/8143 | E_JECT equ ozunid_19
|
||||
347 | 1 Unicalc.asm 328 | Data | 11 | | 1 | 00/8143 : 03 | dfb 3
|
||||
348 | 1 Unicalc.asm 329 | Data | 11 | | 1 | 00/8144 : 01 | dfb 1
|
||||
349 | 1 Unicalc.asm 330 | Data | 11 | | 2 | 00/8145 : 48 81 | dw {ozunid_20}
|
||||
350 | 1 Unicalc.asm 331 | Data | 11 | | 1 | 00/8147 : 04 | dfb {4}
|
||||
351 | 1 Unicalc.asm 332 | Comment | 11 | | 0 | 00/8148 | *
|
||||
352 | 1 Unicalc.asm 333 | Comment | 11 | | 0 | 00/8148 | ******** CONTROL LISTS ********
|
||||
353 | 1 Unicalc.asm 334 | Comment | 11 | | 0 | 00/8148 | *
|
||||
354 | 1 Unicalc.asm 335 | Comment | 11 | | 0 | 00/8148 | *
|
||||
355 | 1 Unicalc.asm 336 | Comment | 11 | | 0 | 00/8148 | *** Eject ***
|
||||
356 | 1 Unicalc.asm 337 | Empty | 11 | | 0 | 00/8148 | ozunid_20
|
||||
357 | 1 Unicalc.asm 337 | Equivalence | 11 | | 0 | 00/8148 | CNTL_LIST1 equ ozunid_20
|
||||
358 | 1 Unicalc.asm 338 | Data | 11 | | 2 | 00/8148 : 00 00 | dw $0000
|
||||
359 | 1 Unicalc.asm 339 | Comment | 11 | | 0 | 00/814A | *
|
||||
360 | 1 Unicalc.asm 340 | Comment | 11 | | 0 | 00/814A | *** Execute ***
|
||||
361 | 1 Unicalc.asm 341 | Empty | 11 | | 0 | 00/814A | ozunid_21
|
||||
362 | 1 Unicalc.asm 341 | Equivalence | 11 | | 0 | 00/814A | CNTL_LIST2 equ ozunid_21
|
||||
363 | 1 Unicalc.asm 342 | Data | 11 | | 1 | 00/814A : 06 | Clow_byte dfb $06
|
||||
364 | 1 Unicalc.asm 343 | Data | 11 | | 1 | 00/814B : 00 | Chigh_byte dfb $00
|
||||
365 | 1 Unicalc.asm 344 | Data | 11 | | 1 | 00/814C : 00 | AccValue dfb $00 ; Input Value
|
||||
366 | 1 Unicalc.asm 345 | Data | 11 | | 1 | 00/814D : 0A | X_reg dfb $0A ; Input Value (N1)
|
||||
367 | 1 Unicalc.asm 346 | Data | 11 | | 1 | 00/814E : 01 | Y_reg dfb $01 ; Input Value (N2)
|
||||
368 | 1 Unicalc.asm 347 | Data | 11 | | 1 | 00/814F : 00 | ProStatus dfb $00
|
||||
369 | 1 Unicalc.asm 348 | Data | 11 | | 1 | 00/8150 : 05 | LowPC_reg dfb $05
|
||||
370 | 1 Unicalc.asm 349 | Data | 11 | | 1 | 00/8151 : 05 | HighPC_reg dfb $05
|
||||
371 | 1 Unicalc.asm 350 | Comment | 11 | | 0 | 00/8152 | *
|
||||
372 | 1 Unicalc.asm 351 | Comment | 11 | | 0 | 00/8152 | *** Set Address ***
|
||||
373 | 1 Unicalc.asm 352 | Empty | 11 | | 0 | 00/8152 | ozunid_22
|
||||
374 | 1 Unicalc.asm 352 | Equivalence | 11 | | 0 | 00/8152 | CNTL_LIST3 equ ozunid_22
|
||||
375 | 1 Unicalc.asm 353 | Data | 11 | | 1 | 00/8152 : 02 | CountL_byte dfb $02
|
||||
376 | 1 Unicalc.asm 354 | Data | 11 | | 1 | 00/8153 : 00 | CountH_byte dfb $00
|
||||
377 | 1 Unicalc.asm 355 | Data | 11 | | 1 | 00/8154 : 05 | LByte_Addr dfb $05
|
||||
378 | 1 Unicalc.asm 356 | Data | 11 | | 1 | 00/8155 : 05 | HByte_Addr dfb $05
|
||||
379 | 1 Unicalc.asm 357 | Comment | 11 | | 0 | 00/8156 | *
|
||||
380 | 1 Unicalc.asm 358 | Comment | 11 | | 0 | 00/8156 | *** Download ***
|
||||
381 | 1 Unicalc.asm 359 | Empty | 11 | | 0 | 00/8156 | ozunid_23
|
||||
382 | 1 Unicalc.asm 359 | Equivalence | 11 | | 0 | 00/8156 | CNTL_LIST4 equ ozunid_23
|
||||
383 | 1 Unicalc.asm 360 | Data | 11 | | 1 | 00/8156 : 09 | LenghtL_byte dfb $09 ;<----- Lenght of Unidisk program Lo Byte
|
||||
384 | 1 Unicalc.asm 361 | Data | 11 | | 1 | 00/8157 : 00 | LenghtH_byte dfb $00 ;<----- Lenght of Unidisk program Hi Byte
|
||||
385 | 1 Unicalc.asm 362 | Comment | 11 | | 0 | 00/8158 | *
|
||||
386 | 1 Unicalc.asm 363 | Comment | 11 | | 0 | 00/8158 | *** Start UNIDISK Program ***
|
||||
387 | 1 Unicalc.asm 364 | Empty | 11 | | 0 | 00/8158 |
|
||||
388 | 1 Unicalc.asm 365 | Code | 11 | | 2 | 00/8158 : 86 C0 | stx $C0
|
||||
389 | 1 Unicalc.asm 366 | Code | 11 | | 2 | 00/815A : 84 C1 | sty $C1
|
||||
390 | 1 Unicalc.asm 367 | Empty | 11 | | 0 | 00/815C |
|
||||
391 | 1 Unicalc.asm 368 | Code | 11 | | 2 | 00/815C : A5 C0 | lda $C0
|
||||
392 | 1 Unicalc.asm 369 | Code | 11 | | 2 | 00/815E : 65 C1 | adc $C1
|
||||
393 | 1 Unicalc.asm 370 | Empty | 11 | | 0 | 00/8160 |
|
||||
394 | 1 Unicalc.asm 371 | Code | 11 | | 1 | 00/8160 : 60 | rts
|
||||
------+-----------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
BIN
AppleII/Integer adc 1 Byte/Unidrive
Normal file
BIN
AppleII/Integer adc 1 Byte/Unidrive
Normal file
Binary file not shown.
311
AppleII/Integer adc 1 Byte/Unidrive.asm
Normal file
311
AppleII/Integer adc 1 Byte/Unidrive.asm
Normal file
@ -0,0 +1,311 @@
|
||||
* @com.wudsn.ide.asm.hardware=APPLE2
|
||||
* Protocol Converter Call
|
||||
XC
|
||||
ZPTempL equ $0006 ;Temporary zero page storage
|
||||
ZPTempH equ $0007
|
||||
N1 equ $0A
|
||||
N2 equ $0B
|
||||
RSLT equ $0C
|
||||
*** Monitor routines ***
|
||||
COut equ $FDED ;Console output ASCII
|
||||
COUT1 equ $FDF0 ;Output to screen
|
||||
CROut equ $FD8E ;Carriage return
|
||||
PRbyte equ $FDDA ;Print byte in hex
|
||||
PRBL2 equ $F94A ;Print many spaces
|
||||
KEYIN equ $FD1B ;Waits for keypress
|
||||
** Command Code **
|
||||
StatusCmd equ 0
|
||||
** Status Code **
|
||||
StatusDIB equ 3
|
||||
StatusUNI equ 5
|
||||
*
|
||||
ControlCmd equ 4
|
||||
** Control Codes **
|
||||
Eject equ 4
|
||||
Run equ 5
|
||||
SetDWLoad equ 6
|
||||
DWLoad equ 7
|
||||
*
|
||||
org $8000
|
||||
*****************************************************
|
||||
* Presentation message **************
|
||||
*
|
||||
* ldx #0
|
||||
* LOOP equ *
|
||||
* lda DATA,x
|
||||
* beq ME2
|
||||
* jsr COut
|
||||
* inx
|
||||
* bne LOOP
|
||||
*
|
||||
* DATA asc 'UNIDISK 3.5 UTILITY BY R. GRECO'
|
||||
* dfb $8D,0 ; Inverse mode on
|
||||
*
|
||||
* ME2 jsr CROut
|
||||
* jsr CROut
|
||||
*
|
||||
* ldx #0
|
||||
* LOOP2 equ *
|
||||
* lda DATA2,x
|
||||
* beq START
|
||||
* ora #$80
|
||||
* jsr COut
|
||||
* inx
|
||||
* bne LOOP2
|
||||
*
|
||||
* DATA2 asc 'A X Y P'
|
||||
* dfb $8D,0 ; Inverse mode on
|
||||
*****************************************************
|
||||
*
|
||||
* Find a Protocol Converter in one of the slots.
|
||||
START jsr FindPC
|
||||
bcs Error
|
||||
|
||||
jsr CROut
|
||||
** Wait keypress to continue **
|
||||
*
|
||||
* jsr KEYIN
|
||||
*
|
||||
*** Eject ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw E_JECT
|
||||
*** Set Address ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw SET_ADD
|
||||
*** Download ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw DOWNLOAD
|
||||
*
|
||||
jsr EXEC ; Jump the Error routine
|
||||
rts
|
||||
*********************************************
|
||||
Error equ *
|
||||
*
|
||||
* There's either no PC around, or there was no give message
|
||||
*
|
||||
ldx #0
|
||||
err1 equ *
|
||||
lda Message,x
|
||||
beq errout
|
||||
jsr COut
|
||||
inx
|
||||
bne err1
|
||||
*
|
||||
errout equ *
|
||||
rts
|
||||
*
|
||||
Message asc 'NO PC OR NO DEVICE'
|
||||
dfb $8D,0
|
||||
*********************************************
|
||||
*
|
||||
** Set the Input Value first **
|
||||
EXEC lda #$00
|
||||
sta AccValue
|
||||
lda N1
|
||||
sta X_reg
|
||||
lda N2
|
||||
sta Y_reg
|
||||
** Execute **
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw EXE
|
||||
READ jsr Dispatch
|
||||
dfb StatusCmd
|
||||
dw DParms
|
||||
bcs Error
|
||||
*
|
||||
**** Screen Output ****
|
||||
*
|
||||
*** Accumulator ***
|
||||
lda UNIAcc_reg
|
||||
sta RSLT ; Store the result
|
||||
* jsr PRbyte
|
||||
* ldx #03 ; Set 3 space
|
||||
* jsr PRBL2
|
||||
*** X Register ***
|
||||
* lda UNIX_reg
|
||||
* jsr PRbyte
|
||||
* ldx #01 ; Set one space
|
||||
* jsr PRBL2
|
||||
*** Y Register ***
|
||||
* lda UNIY_reg
|
||||
* jsr PRbyte
|
||||
* ldx #03 ; Set one space
|
||||
* jsr PRBL2
|
||||
*** Process Status ***
|
||||
* lda UNIP_val
|
||||
* jsr PRbyte
|
||||
* ldx #05 ; Set five space
|
||||
* jsr PRBL2
|
||||
*
|
||||
rts
|
||||
|
||||
******************************************************
|
||||
FindPC equ *
|
||||
*
|
||||
* Search slot 7 to slot 1 looking for signature bytes
|
||||
*
|
||||
ldx #7 ;Do for seven slots
|
||||
lda #$C7
|
||||
sta ZPTempH
|
||||
lda #$00
|
||||
sta ZPTempL
|
||||
*
|
||||
newslot equ *
|
||||
ldy #7
|
||||
*
|
||||
again equ *
|
||||
lda (ZPTempL),y
|
||||
cmp sigtab,y ;One for byte signature
|
||||
beq maybe ;Found one signature byte
|
||||
dec ZPTempH
|
||||
dex
|
||||
bne newslot
|
||||
*
|
||||
* if we get here, no PC find
|
||||
sec
|
||||
rts
|
||||
*
|
||||
* if we get here, no byte find on PC
|
||||
maybe equ *
|
||||
dey
|
||||
dey ;if N=1 then all sig bytes OK
|
||||
bpl again
|
||||
* Found PC interface. Set up call address.
|
||||
* we already have high byte ($CN), we need low byte
|
||||
*
|
||||
foundPC equ *
|
||||
lda #$FF
|
||||
sta ZPTempL
|
||||
ldy #0 ;For indirect load
|
||||
lda (ZPTempL),y ;Get the byte
|
||||
*
|
||||
* Now the Acc has the low oreder ProDOS entry point.
|
||||
* The PC entry is three locations past this ...
|
||||
*
|
||||
clc
|
||||
adc #3
|
||||
sta ZPTempL
|
||||
*
|
||||
* Now ZPTempL has PC entry point.
|
||||
* Return with carry clear.
|
||||
*
|
||||
clc
|
||||
rts
|
||||
***********************************************************
|
||||
*
|
||||
* There are the PC signature bytes in their relative order.
|
||||
* The $FF bytes are filler bytes and are not compared.
|
||||
*
|
||||
sigtab dfb $FF,$20,$FF,$00
|
||||
dfb $FF,$03,$FF,$00
|
||||
*
|
||||
Dispatch equ *
|
||||
jmp (ZPTempL) ;Simulate an indirect JSR to PC
|
||||
*
|
||||
*** Status Parameter Set for UNI ***
|
||||
DParms equ *
|
||||
DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
DPUnit dfb 1
|
||||
DPBuffer dw UNI
|
||||
DPStatCode dfb StatusUNI
|
||||
*
|
||||
*
|
||||
*** Status Parameter Set for DIB ***
|
||||
DParmsDIB equ *
|
||||
DPParmsCt2 dfb 3 ;Status calls have three parameters
|
||||
DPUnit2 dfb 1
|
||||
DPBuffer2 dw DIB
|
||||
DPStatCode2 dfb StatusDIB
|
||||
*
|
||||
*
|
||||
*** Status List DIB ***
|
||||
DIB equ *
|
||||
DIBStatByte1 dfb 0
|
||||
DIBDevSize dfb 0,0,0
|
||||
DIBNameLen dfb 0
|
||||
DIBName ds 16,0
|
||||
DIBType dfb 0
|
||||
DIBSubType dfb 0
|
||||
DIBVersion dw 0
|
||||
*
|
||||
*** Status List UNI ***
|
||||
UNI equ *
|
||||
dfb 0
|
||||
UNIError dfb 0
|
||||
UNIRetries dfb 0
|
||||
UNIAcc_reg dfb 0
|
||||
UNIX_reg dfb 0
|
||||
UNIY_reg dfb 0
|
||||
UNIP_val dfb 0
|
||||
HHH dfb 0
|
||||
*
|
||||
*** Set Address ***
|
||||
SET_ADD equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST3
|
||||
dfb SetDWLoad
|
||||
*
|
||||
*** Download ***
|
||||
DOWNLOAD equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST4
|
||||
dfb DWLoad
|
||||
*
|
||||
*** Execute ***
|
||||
EXE equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST2
|
||||
dfb Run
|
||||
*** Eject ***
|
||||
E_JECT equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST1
|
||||
dfb Eject
|
||||
*
|
||||
******** CONTROL LISTS ********
|
||||
*
|
||||
*
|
||||
*** Eject ***
|
||||
CNTL_LIST1 equ *
|
||||
dw $0000
|
||||
*
|
||||
*** Execute ***
|
||||
CNTL_LIST2 equ *
|
||||
Clow_byte dfb $06
|
||||
Chigh_byte dfb $00
|
||||
AccValue dfb $00 ; Input Value
|
||||
X_reg dfb $00 ; Input Value (N1)
|
||||
Y_reg dfb $00 ; Input Value (N2)
|
||||
ProStatus dfb $00
|
||||
LowPC_reg dfb $05 ; Like ORG
|
||||
HighPC_reg dfb $05
|
||||
*
|
||||
*** Set Address ***
|
||||
CNTL_LIST3 equ *
|
||||
CountL_byte dfb $02
|
||||
CountH_byte dfb $00
|
||||
LByte_Addr dfb $05 ; Like ORG
|
||||
HByte_Addr dfb $05
|
||||
*
|
||||
*** Download ***
|
||||
CNTL_LIST4 equ *
|
||||
LenghtL_byte dfb $09 ;<----- Lenght of Unidisk program Lo Byte
|
||||
LenghtH_byte dfb $00 ;<----- Lenght of Unidisk program Hi Byte
|
||||
*
|
||||
*** Start UNIDISK Program ***
|
||||
|
||||
stx $C0
|
||||
sty $C1
|
||||
|
||||
lda $C0
|
||||
adc $C1
|
||||
|
||||
rts
|
343
AppleII/Integer adc 1 Byte/Unidrive_Output.txt
Normal file
343
AppleII/Integer adc 1 Byte/Unidrive_Output.txt
Normal file
@ -0,0 +1,343 @@
|
||||
------+------------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
Line | # File Line | Line Type | MX | Reloc | Size | Address Object Code | Source Code
|
||||
------+------------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
1 | 1 Unidrive.asm 1 | Comment | 11 | | 0 | 00/8000 | * @com.wudsn.ide.asm.hardware=APPLE2
|
||||
2 | 1 Unidrive.asm 2 | Comment | 11 | | 0 | 00/8000 | * Protocol Converter Call
|
||||
3 | 1 Unidrive.asm 3 | Directive | 11 | | 0 | 00/8000 | XC
|
||||
4 | 1 Unidrive.asm 4 | Equivalence | 11 | | 0 | 00/8000 | ZPTempL equ $0006 ;Temporary zero page storage
|
||||
5 | 1 Unidrive.asm 5 | Equivalence | 11 | | 0 | 00/8000 | ZPTempH equ $0007
|
||||
6 | 1 Unidrive.asm 6 | Equivalence | 11 | | 0 | 00/8000 | N1 equ $0A
|
||||
7 | 1 Unidrive.asm 7 | Equivalence | 11 | | 0 | 00/8000 | N2 equ $0B
|
||||
8 | 1 Unidrive.asm 8 | Equivalence | 11 | | 0 | 00/8000 | RSLT equ $0C
|
||||
9 | 1 Unidrive.asm 9 | Comment | 11 | | 0 | 00/8000 | *** Monitor routines ***
|
||||
10 | 1 Unidrive.asm 10 | Equivalence | 11 | | 0 | 00/8000 | COut equ $FDED ;Console output ASCII
|
||||
11 | 1 Unidrive.asm 11 | Equivalence | 11 | | 0 | 00/8000 | COUT1 equ $FDF0 ;Output to screen
|
||||
12 | 1 Unidrive.asm 12 | Equivalence | 11 | | 0 | 00/8000 | CROut equ $FD8E ;Carriage return
|
||||
13 | 1 Unidrive.asm 13 | Equivalence | 11 | | 0 | 00/8000 | PRbyte equ $FDDA ;Print byte in hex
|
||||
14 | 1 Unidrive.asm 14 | Equivalence | 11 | | 0 | 00/8000 | PRBL2 equ $F94A ;Print many spaces
|
||||
15 | 1 Unidrive.asm 15 | Equivalence | 11 | | 0 | 00/8000 | KEYIN equ $FD1B ;Waits for keypress
|
||||
16 | 1 Unidrive.asm 16 | Comment | 11 | | 0 | 00/8000 | ** Command Code **
|
||||
17 | 1 Unidrive.asm 17 | Equivalence | 11 | | 0 | 00/8000 | StatusCmd equ 0
|
||||
18 | 1 Unidrive.asm 18 | Comment | 11 | | 0 | 00/8000 | ** Status Code **
|
||||
19 | 1 Unidrive.asm 19 | Equivalence | 11 | | 0 | 00/8000 | StatusDIB equ 3
|
||||
20 | 1 Unidrive.asm 20 | Equivalence | 11 | | 0 | 00/8000 | StatusUNI equ 5
|
||||
21 | 1 Unidrive.asm 21 | Comment | 11 | | 0 | 00/8000 | *
|
||||
22 | 1 Unidrive.asm 22 | Equivalence | 11 | | 0 | 00/8000 | ControlCmd equ 4
|
||||
23 | 1 Unidrive.asm 23 | Comment | 11 | | 0 | 00/8000 | ** Control Codes **
|
||||
24 | 1 Unidrive.asm 24 | Equivalence | 11 | | 0 | 00/8000 | Eject equ 4
|
||||
25 | 1 Unidrive.asm 25 | Equivalence | 11 | | 0 | 00/8000 | Run equ 5
|
||||
26 | 1 Unidrive.asm 26 | Equivalence | 11 | | 0 | 00/8000 | SetDWLoad equ 6
|
||||
27 | 1 Unidrive.asm 27 | Equivalence | 11 | | 0 | 00/8000 | DWLoad equ 7
|
||||
28 | 1 Unidrive.asm 28 | Comment | 11 | | 0 | 00/8000 | *
|
||||
29 | 1 Unidrive.asm 29 | Directive | 11 | | 0 | 00/8000 | org $8000
|
||||
30 | 1 Unidrive.asm 30 | Comment | 11 | | 0 | 00/8000 | *****************************************************
|
||||
31 | 1 Unidrive.asm 31 | Comment | 11 | | 0 | 00/8000 | * Presentation message **************
|
||||
32 | 1 Unidrive.asm 32 | Comment | 11 | | 0 | 00/8000 | *
|
||||
33 | 1 Unidrive.asm 33 | Comment | 11 | | 0 | 00/8000 | * ldx #0
|
||||
34 | 1 Unidrive.asm 34 | Comment | 11 | | 0 | 00/8000 | * LOOP equ *
|
||||
35 | 1 Unidrive.asm 35 | Comment | 11 | | 0 | 00/8000 | * lda DATA,x
|
||||
36 | 1 Unidrive.asm 36 | Comment | 11 | | 0 | 00/8000 | * beq ME2
|
||||
37 | 1 Unidrive.asm 37 | Comment | 11 | | 0 | 00/8000 | * jsr COut
|
||||
38 | 1 Unidrive.asm 38 | Comment | 11 | | 0 | 00/8000 | * inx
|
||||
39 | 1 Unidrive.asm 39 | Comment | 11 | | 0 | 00/8000 | * bne LOOP
|
||||
40 | 1 Unidrive.asm 40 | Comment | 11 | | 0 | 00/8000 | *
|
||||
41 | 1 Unidrive.asm 41 | Comment | 11 | | 0 | 00/8000 | * DATA asc 'UNIDISK 3.5 UTILITY BY R. GRECO'
|
||||
42 | 1 Unidrive.asm 42 | Comment | 11 | | 0 | 00/8000 | * dfb $8D,0 ; Inverse mode on
|
||||
43 | 1 Unidrive.asm 43 | Comment | 11 | | 0 | 00/8000 | *
|
||||
44 | 1 Unidrive.asm 44 | Comment | 11 | | 0 | 00/8000 | * ME2 jsr CROut
|
||||
45 | 1 Unidrive.asm 45 | Comment | 11 | | 0 | 00/8000 | * jsr CROut
|
||||
46 | 1 Unidrive.asm 46 | Comment | 11 | | 0 | 00/8000 | *
|
||||
47 | 1 Unidrive.asm 47 | Comment | 11 | | 0 | 00/8000 | * ldx #0
|
||||
48 | 1 Unidrive.asm 48 | Comment | 11 | | 0 | 00/8000 | * LOOP2 equ *
|
||||
49 | 1 Unidrive.asm 49 | Comment | 11 | | 0 | 00/8000 | * lda DATA2,x
|
||||
50 | 1 Unidrive.asm 50 | Comment | 11 | | 0 | 00/8000 | * beq START
|
||||
51 | 1 Unidrive.asm 51 | Comment | 11 | | 0 | 00/8000 | * ora #$80
|
||||
52 | 1 Unidrive.asm 52 | Comment | 11 | | 0 | 00/8000 | * jsr COut
|
||||
53 | 1 Unidrive.asm 53 | Comment | 11 | | 0 | 00/8000 | * inx
|
||||
54 | 1 Unidrive.asm 54 | Comment | 11 | | 0 | 00/8000 | * bne LOOP2
|
||||
55 | 1 Unidrive.asm 55 | Comment | 11 | | 0 | 00/8000 | *
|
||||
56 | 1 Unidrive.asm 56 | Comment | 11 | | 0 | 00/8000 | * DATA2 asc 'A X Y P'
|
||||
57 | 1 Unidrive.asm 57 | Comment | 11 | | 0 | 00/8000 | * dfb $8D,0 ; Inverse mode on
|
||||
58 | 1 Unidrive.asm 58 | Comment | 11 | | 0 | 00/8000 | *****************************************************
|
||||
59 | 1 Unidrive.asm 59 | Comment | 11 | | 0 | 00/8000 | *
|
||||
60 | 1 Unidrive.asm 60 | Comment | 11 | | 0 | 00/8000 | * Find a Protocol Converter in one of the slots.
|
||||
61 | 1 Unidrive.asm 61 | Code | 11 | | 3 | 00/8000 : 20 63 80 | START jsr {ozunid_4}
|
||||
62 | 1 Unidrive.asm 62 | Code | 11 | | 2 | 00/8003 : B0 19 | bcs {ozunid_1}
|
||||
63 | 1 Unidrive.asm 63 | Empty | 11 | | 0 | 00/8005 |
|
||||
64 | 1 Unidrive.asm 64 | Code | 11 | | 3 | 00/8005 : 20 8E FD | jsr {$FD8E}
|
||||
65 | 1 Unidrive.asm 65 | Comment | 11 | | 0 | 00/8008 | ** Wait keypress to continue **
|
||||
66 | 1 Unidrive.asm 66 | Comment | 11 | | 0 | 00/8008 | *
|
||||
67 | 1 Unidrive.asm 67 | Comment | 11 | | 0 | 00/8008 | * jsr KEYIN
|
||||
68 | 1 Unidrive.asm 68 | Comment | 11 | | 0 | 00/8008 | *
|
||||
69 | 1 Unidrive.asm 69 | Comment | 11 | | 0 | 00/8008 | *** Eject ***
|
||||
70 | 1 Unidrive.asm 70 | Code | 11 | | 3 | 00/8008 : 20 98 80 | jsr {ozunid_9}
|
||||
71 | 1 Unidrive.asm 71 | Data | 11 | | 1 | 00/800B : 04 | dfb {4}
|
||||
72 | 1 Unidrive.asm 72 | Data | 11 | | 2 | 00/800C : D5 80 | dw {ozunid_17}
|
||||
73 | 1 Unidrive.asm 73 | Comment | 11 | | 0 | 00/800E | *** Set Address ***
|
||||
74 | 1 Unidrive.asm 74 | Code | 11 | | 3 | 00/800E : 20 98 80 | jsr {ozunid_9}
|
||||
75 | 1 Unidrive.asm 75 | Data | 11 | | 1 | 00/8011 : 04 | dfb {4}
|
||||
76 | 1 Unidrive.asm 76 | Data | 11 | | 2 | 00/8012 : C6 80 | dw {ozunid_14}
|
||||
77 | 1 Unidrive.asm 77 | Comment | 11 | | 0 | 00/8014 | *** Download ***
|
||||
78 | 1 Unidrive.asm 78 | Code | 11 | | 3 | 00/8014 : 20 98 80 | jsr {ozunid_9}
|
||||
79 | 1 Unidrive.asm 79 | Data | 11 | | 1 | 00/8017 : 04 | dfb {4}
|
||||
80 | 1 Unidrive.asm 80 | Data | 11 | | 2 | 00/8018 : CB 80 | dw {ozunid_15}
|
||||
81 | 1 Unidrive.asm 81 | Comment | 11 | | 0 | 00/801A | *
|
||||
82 | 1 Unidrive.asm 82 | Code | 11 | | 3 | 00/801A : 20 40 80 | jsr EXEC ; Jump the Error routine
|
||||
83 | 1 Unidrive.asm 83 | Code | 11 | | 1 | 00/801D : 60 | rts
|
||||
84 | 1 Unidrive.asm 84 | Comment | 11 | | 0 | 00/801E | *********************************************
|
||||
85 | 1 Unidrive.asm 85 | Empty | 11 | | 0 | 00/801E | ozunid_1
|
||||
86 | 1 Unidrive.asm 85 | Equivalence | 11 | | 0 | 00/801E | Error equ ozunid_1
|
||||
87 | 1 Unidrive.asm 86 | Comment | 11 | | 0 | 00/801E | *
|
||||
88 | 1 Unidrive.asm 87 | Comment | 11 | | 0 | 00/801E | * There's either no PC around, or there was no give message
|
||||
89 | 1 Unidrive.asm 88 | Comment | 11 | | 0 | 00/801E | *
|
||||
90 | 1 Unidrive.asm 89 | Code | 11 | | 2 | 00/801E : A2 00 | ldx #0
|
||||
91 | 1 Unidrive.asm 90 | Empty | 11 | | 0 | 00/8020 | ozunid_2
|
||||
92 | 1 Unidrive.asm 90 | Equivalence | 11 | | 0 | 00/8020 | err1 equ ozunid_2
|
||||
93 | 1 Unidrive.asm 91 | Code | 11 | | 3 | 00/8020 : BD 2C 80 | lda Message,x
|
||||
94 | 1 Unidrive.asm 92 | Code | 11 | | 2 | 00/8023 : F0 06 | beq {ozunid_3}
|
||||
95 | 1 Unidrive.asm 93 | Code | 11 | | 3 | 00/8025 : 20 ED FD | jsr {$FDED}
|
||||
96 | 1 Unidrive.asm 94 | Code | 11 | | 1 | 00/8028 : E8 | inx
|
||||
97 | 1 Unidrive.asm 95 | Code | 11 | | 2 | 00/8029 : D0 F5 | bne {ozunid_2}
|
||||
98 | 1 Unidrive.asm 96 | Comment | 11 | | 0 | 00/802B | *
|
||||
99 | 1 Unidrive.asm 97 | Empty | 11 | | 0 | 00/802B | ozunid_3
|
||||
100 | 1 Unidrive.asm 97 | Equivalence | 11 | | 0 | 00/802B | errout equ ozunid_3
|
||||
101 | 1 Unidrive.asm 98 | Code | 11 | | 1 | 00/802B : 60 | rts
|
||||
102 | 1 Unidrive.asm 99 | Comment | 11 | | 0 | 00/802C | *
|
||||
103 | 1 Unidrive.asm 100 | Data | 11 | | 18 | 00/802C : 4E 4F 20 50 | Message asc 'NO PC OR NO DEVICE'
|
||||
| | | | | | 43 20 4F 52 |
|
||||
| | | | | | 20 4E 4F 20 |
|
||||
| | | | | | 44 45 56 49 |
|
||||
| | | | | | 43 45 |
|
||||
104 | 1 Unidrive.asm 101 | Data | 11 | | 2 | 00/803E : 8D 00 | dfb $8D,0
|
||||
105 | 1 Unidrive.asm 102 | Comment | 11 | | 0 | 00/8040 | *********************************************
|
||||
106 | 1 Unidrive.asm 103 | Comment | 11 | | 0 | 00/8040 | *
|
||||
107 | 1 Unidrive.asm 104 | Comment | 11 | | 0 | 00/8040 | ** Set the Input Value first **
|
||||
108 | 1 Unidrive.asm 105 | Code | 11 | | 2 | 00/8040 : A9 00 | EXEC lda #$00
|
||||
109 | 1 Unidrive.asm 106 | Code | 11 | | 3 | 00/8042 : 8D DE 80 | sta AccValue
|
||||
110 | 1 Unidrive.asm 107 | Code | 11 | | 2 | 00/8045 : A5 0A | lda {$0A}
|
||||
111 | 1 Unidrive.asm 108 | Code | 11 | | 3 | 00/8047 : 8D DF 80 | sta X_reg
|
||||
112 | 1 Unidrive.asm 109 | Code | 11 | | 2 | 00/804A : A5 0B | lda {$0B}
|
||||
113 | 1 Unidrive.asm 110 | Code | 11 | | 3 | 00/804C : 8D E0 80 | sta Y_reg
|
||||
114 | 1 Unidrive.asm 111 | Comment | 11 | | 0 | 00/804F | ** Execute **
|
||||
115 | 1 Unidrive.asm 112 | Code | 11 | | 3 | 00/804F : 20 98 80 | jsr {ozunid_9}
|
||||
116 | 1 Unidrive.asm 113 | Data | 11 | | 1 | 00/8052 : 04 | dfb {4}
|
||||
117 | 1 Unidrive.asm 114 | Data | 11 | | 2 | 00/8053 : D0 80 | dw {ozunid_16}
|
||||
118 | 1 Unidrive.asm 115 | Code | 11 | | 3 | 00/8055 : 20 98 80 | READ jsr {ozunid_9}
|
||||
119 | 1 Unidrive.asm 116 | Data | 11 | | 1 | 00/8058 : 00 | dfb {0}
|
||||
120 | 1 Unidrive.asm 117 | Data | 11 | | 2 | 00/8059 : 9B 80 | dw {ozunid_10}
|
||||
121 | 1 Unidrive.asm 118 | Code | 11 | | 2 | 00/805B : B0 C1 | bcs {ozunid_1}
|
||||
122 | 1 Unidrive.asm 119 | Comment | 11 | | 0 | 00/805D | *
|
||||
123 | 1 Unidrive.asm 120 | Comment | 11 | | 0 | 00/805D | **** Screen Output ****
|
||||
124 | 1 Unidrive.asm 121 | Comment | 11 | | 0 | 00/805D | *
|
||||
125 | 1 Unidrive.asm 122 | Comment | 11 | | 0 | 00/805D | *** Accumulator ***
|
||||
126 | 1 Unidrive.asm 123 | Code | 11 | | 3 | 00/805D : AD C1 80 | lda UNIAcc_reg
|
||||
127 | 1 Unidrive.asm 124 | Code | 11 | | 2 | 00/8060 : 85 0C | sta {$0C} ; Store the result
|
||||
128 | 1 Unidrive.asm 125 | Comment | 11 | | 0 | 00/8062 | * jsr PRbyte
|
||||
129 | 1 Unidrive.asm 126 | Comment | 11 | | 0 | 00/8062 | * ldx #03 ; Set 3 space
|
||||
130 | 1 Unidrive.asm 127 | Comment | 11 | | 0 | 00/8062 | * jsr PRBL2
|
||||
131 | 1 Unidrive.asm 128 | Comment | 11 | | 0 | 00/8062 | *** X Register ***
|
||||
132 | 1 Unidrive.asm 129 | Comment | 11 | | 0 | 00/8062 | * lda UNIX_reg
|
||||
133 | 1 Unidrive.asm 130 | Comment | 11 | | 0 | 00/8062 | * jsr PRbyte
|
||||
134 | 1 Unidrive.asm 131 | Comment | 11 | | 0 | 00/8062 | * ldx #01 ; Set one space
|
||||
135 | 1 Unidrive.asm 132 | Comment | 11 | | 0 | 00/8062 | * jsr PRBL2
|
||||
136 | 1 Unidrive.asm 133 | Comment | 11 | | 0 | 00/8062 | *** Y Register ***
|
||||
137 | 1 Unidrive.asm 134 | Comment | 11 | | 0 | 00/8062 | * lda UNIY_reg
|
||||
138 | 1 Unidrive.asm 135 | Comment | 11 | | 0 | 00/8062 | * jsr PRbyte
|
||||
139 | 1 Unidrive.asm 136 | Comment | 11 | | 0 | 00/8062 | * ldx #03 ; Set one space
|
||||
140 | 1 Unidrive.asm 137 | Comment | 11 | | 0 | 00/8062 | * jsr PRBL2
|
||||
141 | 1 Unidrive.asm 138 | Comment | 11 | | 0 | 00/8062 | *** Process Status ***
|
||||
142 | 1 Unidrive.asm 139 | Comment | 11 | | 0 | 00/8062 | * lda UNIP_val
|
||||
143 | 1 Unidrive.asm 140 | Comment | 11 | | 0 | 00/8062 | * jsr PRbyte
|
||||
144 | 1 Unidrive.asm 141 | Comment | 11 | | 0 | 00/8062 | * ldx #05 ; Set five space
|
||||
145 | 1 Unidrive.asm 142 | Comment | 11 | | 0 | 00/8062 | * jsr PRBL2
|
||||
146 | 1 Unidrive.asm 143 | Comment | 11 | | 0 | 00/8062 | *
|
||||
147 | 1 Unidrive.asm 144 | Code | 11 | | 1 | 00/8062 : 60 | rts
|
||||
148 | 1 Unidrive.asm 145 | Empty | 11 | | 0 | 00/8063 |
|
||||
149 | 1 Unidrive.asm 146 | Comment | 11 | | 0 | 00/8063 | ******************************************************
|
||||
150 | 1 Unidrive.asm 147 | Empty | 11 | | 0 | 00/8063 | ozunid_4
|
||||
151 | 1 Unidrive.asm 147 | Equivalence | 11 | | 0 | 00/8063 | FindPC equ ozunid_4
|
||||
152 | 1 Unidrive.asm 148 | Comment | 11 | | 0 | 00/8063 | *
|
||||
153 | 1 Unidrive.asm 149 | Comment | 11 | | 0 | 00/8063 | * Search slot 7 to slot 1 looking for signature bytes
|
||||
154 | 1 Unidrive.asm 150 | Comment | 11 | | 0 | 00/8063 | *
|
||||
155 | 1 Unidrive.asm 151 | Code | 11 | | 2 | 00/8063 : A2 07 | ldx #7 ;Do for seven slots
|
||||
156 | 1 Unidrive.asm 152 | Code | 11 | | 2 | 00/8065 : A9 C7 | lda #$C7
|
||||
157 | 1 Unidrive.asm 153 | Code | 11 | | 2 | 00/8067 : 85 07 | sta {$0007}
|
||||
158 | 1 Unidrive.asm 154 | Code | 11 | | 2 | 00/8069 : A9 00 | lda #$00
|
||||
159 | 1 Unidrive.asm 155 | Code | 11 | | 2 | 00/806B : 85 06 | sta {$0006}
|
||||
160 | 1 Unidrive.asm 156 | Comment | 11 | | 0 | 00/806D | *
|
||||
161 | 1 Unidrive.asm 157 | Empty | 11 | | 0 | 00/806D | ozunid_5
|
||||
162 | 1 Unidrive.asm 157 | Equivalence | 11 | | 0 | 00/806D | newslot equ ozunid_5
|
||||
163 | 1 Unidrive.asm 158 | Code | 11 | | 2 | 00/806D : A0 07 | ldy #7
|
||||
164 | 1 Unidrive.asm 159 | Comment | 11 | | 0 | 00/806F | *
|
||||
165 | 1 Unidrive.asm 160 | Empty | 11 | | 0 | 00/806F | ozunid_6
|
||||
166 | 1 Unidrive.asm 160 | Equivalence | 11 | | 0 | 00/806F | again equ ozunid_6
|
||||
167 | 1 Unidrive.asm 161 | Code | 11 | | 2 | 00/806F : B1 06 | lda ({$0006}),y
|
||||
168 | 1 Unidrive.asm 162 | Code | 11 | | 3 | 00/8071 : D9 90 80 | cmp sigtab,y ;One for byte signature
|
||||
169 | 1 Unidrive.asm 163 | Code | 11 | | 2 | 00/8074 : F0 07 | beq {ozunid_7} ;Found one signature byte
|
||||
170 | 1 Unidrive.asm 164 | Code | 11 | | 2 | 00/8076 : C6 07 | dec {$0007}
|
||||
171 | 1 Unidrive.asm 165 | Code | 11 | | 1 | 00/8078 : CA | dex
|
||||
172 | 1 Unidrive.asm 166 | Code | 11 | | 2 | 00/8079 : D0 F2 | bne {ozunid_5}
|
||||
173 | 1 Unidrive.asm 167 | Comment | 11 | | 0 | 00/807B | *
|
||||
174 | 1 Unidrive.asm 168 | Comment | 11 | | 0 | 00/807B | * if we get here, no PC find
|
||||
175 | 1 Unidrive.asm 169 | Code | 11 | | 1 | 00/807B : 38 | sec
|
||||
176 | 1 Unidrive.asm 170 | Code | 11 | | 1 | 00/807C : 60 | rts
|
||||
177 | 1 Unidrive.asm 171 | Comment | 11 | | 0 | 00/807D | *
|
||||
178 | 1 Unidrive.asm 172 | Comment | 11 | | 0 | 00/807D | * if we get here, no byte find on PC
|
||||
179 | 1 Unidrive.asm 173 | Empty | 11 | | 0 | 00/807D | ozunid_7
|
||||
180 | 1 Unidrive.asm 173 | Equivalence | 11 | | 0 | 00/807D | maybe equ ozunid_7
|
||||
181 | 1 Unidrive.asm 174 | Code | 11 | | 1 | 00/807D : 88 | dey
|
||||
182 | 1 Unidrive.asm 175 | Code | 11 | | 1 | 00/807E : 88 | dey ;if N=1 then all sig bytes OK
|
||||
183 | 1 Unidrive.asm 176 | Code | 11 | | 2 | 00/807F : 10 EE | bpl {ozunid_6}
|
||||
184 | 1 Unidrive.asm 177 | Comment | 11 | | 0 | 00/8081 | * Found PC interface. Set up call address.
|
||||
185 | 1 Unidrive.asm 178 | Comment | 11 | | 0 | 00/8081 | * we already have high byte ($CN), we need low byte
|
||||
186 | 1 Unidrive.asm 179 | Comment | 11 | | 0 | 00/8081 | *
|
||||
187 | 1 Unidrive.asm 180 | Empty | 11 | | 0 | 00/8081 | ozunid_8
|
||||
188 | 1 Unidrive.asm 180 | Equivalence | 11 | | 0 | 00/8081 | foundPC equ ozunid_8
|
||||
189 | 1 Unidrive.asm 181 | Code | 11 | | 2 | 00/8081 : A9 FF | lda #$FF
|
||||
190 | 1 Unidrive.asm 182 | Code | 11 | | 2 | 00/8083 : 85 06 | sta {$0006}
|
||||
191 | 1 Unidrive.asm 183 | Code | 11 | | 2 | 00/8085 : A0 00 | ldy #0 ;For indirect load
|
||||
192 | 1 Unidrive.asm 184 | Code | 11 | | 2 | 00/8087 : B1 06 | lda ({$0006}),y ;Get the byte
|
||||
193 | 1 Unidrive.asm 185 | Comment | 11 | | 0 | 00/8089 | *
|
||||
194 | 1 Unidrive.asm 186 | Comment | 11 | | 0 | 00/8089 | * Now the Acc has the low oreder ProDOS entry point.
|
||||
195 | 1 Unidrive.asm 187 | Comment | 11 | | 0 | 00/8089 | * The PC entry is three locations past this ...
|
||||
196 | 1 Unidrive.asm 188 | Comment | 11 | | 0 | 00/8089 | *
|
||||
197 | 1 Unidrive.asm 189 | Code | 11 | | 1 | 00/8089 : 18 | clc
|
||||
198 | 1 Unidrive.asm 190 | Code | 11 | | 2 | 00/808A : 69 03 | adc #3
|
||||
199 | 1 Unidrive.asm 191 | Code | 11 | | 2 | 00/808C : 85 06 | sta {$0006}
|
||||
200 | 1 Unidrive.asm 192 | Comment | 11 | | 0 | 00/808E | *
|
||||
201 | 1 Unidrive.asm 193 | Comment | 11 | | 0 | 00/808E | * Now ZPTempL has PC entry point.
|
||||
202 | 1 Unidrive.asm 194 | Comment | 11 | | 0 | 00/808E | * Return with carry clear.
|
||||
203 | 1 Unidrive.asm 195 | Comment | 11 | | 0 | 00/808E | *
|
||||
204 | 1 Unidrive.asm 196 | Code | 11 | | 1 | 00/808E : 18 | clc
|
||||
205 | 1 Unidrive.asm 197 | Code | 11 | | 1 | 00/808F : 60 | rts
|
||||
206 | 1 Unidrive.asm 198 | Comment | 11 | | 0 | 00/8090 | ***********************************************************
|
||||
207 | 1 Unidrive.asm 199 | Comment | 11 | | 0 | 00/8090 | *
|
||||
208 | 1 Unidrive.asm 200 | Comment | 11 | | 0 | 00/8090 | * There are the PC signature bytes in their relative order.
|
||||
209 | 1 Unidrive.asm 201 | Comment | 11 | | 0 | 00/8090 | * The $FF bytes are filler bytes and are not compared.
|
||||
210 | 1 Unidrive.asm 202 | Comment | 11 | | 0 | 00/8090 | *
|
||||
211 | 1 Unidrive.asm 203 | Data | 11 | | 4 | 00/8090 : FF 20 FF 00 | sigtab dfb $FF,$20,$FF,$00
|
||||
212 | 1 Unidrive.asm 204 | Data | 11 | | 4 | 00/8094 : FF 03 FF 00 | dfb $FF,$03,$FF,$00
|
||||
213 | 1 Unidrive.asm 205 | Comment | 11 | | 0 | 00/8098 | *
|
||||
214 | 1 Unidrive.asm 206 | Empty | 11 | | 0 | 00/8098 | ozunid_9
|
||||
215 | 1 Unidrive.asm 206 | Equivalence | 11 | | 0 | 00/8098 | Dispatch equ ozunid_9
|
||||
216 | 1 Unidrive.asm 207 | Code | 11 | | 3 | 00/8098 : 6C 06 00 | jmp ({$0006}) ;Simulate an indirect JSR to PC
|
||||
217 | 1 Unidrive.asm 208 | Comment | 11 | | 0 | 00/809B | *
|
||||
218 | 1 Unidrive.asm 209 | Comment | 11 | | 0 | 00/809B | *** Status Parameter Set for UNI ***
|
||||
219 | 1 Unidrive.asm 210 | Empty | 11 | | 0 | 00/809B | ozunid_10
|
||||
220 | 1 Unidrive.asm 210 | Equivalence | 11 | | 0 | 00/809B | DParms equ ozunid_10
|
||||
221 | 1 Unidrive.asm 211 | Data | 11 | | 1 | 00/809B : 03 | DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
222 | 1 Unidrive.asm 212 | Data | 11 | | 1 | 00/809C : 01 | DPUnit dfb 1
|
||||
223 | 1 Unidrive.asm 213 | Data | 11 | | 2 | 00/809D : BE 80 | DPBuffer dw {ozunid_13}
|
||||
224 | 1 Unidrive.asm 214 | Data | 11 | | 1 | 00/809F : 05 | DPStatCode dfb {5}
|
||||
225 | 1 Unidrive.asm 215 | Comment | 11 | | 0 | 00/80A0 | *
|
||||
226 | 1 Unidrive.asm 216 | Comment | 11 | | 0 | 00/80A0 | *
|
||||
227 | 1 Unidrive.asm 217 | Comment | 11 | | 0 | 00/80A0 | *** Status Parameter Set for DIB ***
|
||||
228 | 1 Unidrive.asm 218 | Empty | 11 | | 0 | 00/80A0 | ozunid_11
|
||||
229 | 1 Unidrive.asm 218 | Equivalence | 11 | | 0 | 00/80A0 | DParmsDIB equ ozunid_11
|
||||
230 | 1 Unidrive.asm 219 | Data | 11 | | 1 | 00/80A0 : 03 | DPParmsCt2 dfb 3 ;Status calls have three parameters
|
||||
231 | 1 Unidrive.asm 220 | Data | 11 | | 1 | 00/80A1 : 01 | DPUnit2 dfb 1
|
||||
232 | 1 Unidrive.asm 221 | Data | 11 | | 2 | 00/80A2 : A5 80 | DPBuffer2 dw {ozunid_12}
|
||||
233 | 1 Unidrive.asm 222 | Data | 11 | | 1 | 00/80A4 : 03 | DPStatCode2 dfb {3}
|
||||
234 | 1 Unidrive.asm 223 | Comment | 11 | | 0 | 00/80A5 | *
|
||||
235 | 1 Unidrive.asm 224 | Comment | 11 | | 0 | 00/80A5 | *
|
||||
236 | 1 Unidrive.asm 225 | Comment | 11 | | 0 | 00/80A5 | *** Status List DIB ***
|
||||
237 | 1 Unidrive.asm 226 | Empty | 11 | | 0 | 00/80A5 | ozunid_12
|
||||
238 | 1 Unidrive.asm 226 | Equivalence | 11 | | 0 | 00/80A5 | DIB equ ozunid_12
|
||||
239 | 1 Unidrive.asm 227 | Data | 11 | | 1 | 00/80A5 : 00 | DIBStatByte1 dfb 0
|
||||
240 | 1 Unidrive.asm 228 | Data | 11 | | 3 | 00/80A6 : 00 00 00 | DIBDevSize dfb 0,0,0
|
||||
241 | 1 Unidrive.asm 229 | Data | 11 | | 1 | 00/80A9 : 00 | DIBNameLen dfb 0
|
||||
242 | 1 Unidrive.asm 230 | Data | 11 | | 16 | 00/80AA : 00 00 00 00 | DIBName ds 16,0
|
||||
| | | | | | 00 00 00 00 |
|
||||
| | | | | | 00 00 00 00 |
|
||||
| | | | | | 00 00 00 00 |
|
||||
243 | 1 Unidrive.asm 231 | Data | 11 | | 1 | 00/80BA : 00 | DIBType dfb 0
|
||||
244 | 1 Unidrive.asm 232 | Data | 11 | | 1 | 00/80BB : 00 | DIBSubType dfb 0
|
||||
245 | 1 Unidrive.asm 233 | Data | 11 | | 2 | 00/80BC : 00 00 | DIBVersion dw 0
|
||||
246 | 1 Unidrive.asm 234 | Comment | 11 | | 0 | 00/80BE | *
|
||||
247 | 1 Unidrive.asm 235 | Comment | 11 | | 0 | 00/80BE | *** Status List UNI ***
|
||||
248 | 1 Unidrive.asm 236 | Empty | 11 | | 0 | 00/80BE | ozunid_13
|
||||
249 | 1 Unidrive.asm 236 | Equivalence | 11 | | 0 | 00/80BE | UNI equ ozunid_13
|
||||
250 | 1 Unidrive.asm 237 | Data | 11 | | 1 | 00/80BE : 00 | dfb 0
|
||||
251 | 1 Unidrive.asm 238 | Data | 11 | | 1 | 00/80BF : 00 | UNIError dfb 0
|
||||
252 | 1 Unidrive.asm 239 | Data | 11 | | 1 | 00/80C0 : 00 | UNIRetries dfb 0
|
||||
253 | 1 Unidrive.asm 240 | Data | 11 | | 1 | 00/80C1 : 00 | UNIAcc_reg dfb 0
|
||||
254 | 1 Unidrive.asm 241 | Data | 11 | | 1 | 00/80C2 : 00 | UNIX_reg dfb 0
|
||||
255 | 1 Unidrive.asm 242 | Data | 11 | | 1 | 00/80C3 : 00 | UNIY_reg dfb 0
|
||||
256 | 1 Unidrive.asm 243 | Data | 11 | | 1 | 00/80C4 : 00 | UNIP_val dfb 0
|
||||
257 | 1 Unidrive.asm 244 | Data | 11 | | 1 | 00/80C5 : 00 | HHH dfb 0
|
||||
258 | 1 Unidrive.asm 245 | Comment | 11 | | 0 | 00/80C6 | *
|
||||
259 | 1 Unidrive.asm 246 | Comment | 11 | | 0 | 00/80C6 | *** Set Address ***
|
||||
260 | 1 Unidrive.asm 247 | Empty | 11 | | 0 | 00/80C6 | ozunid_14
|
||||
261 | 1 Unidrive.asm 247 | Equivalence | 11 | | 0 | 00/80C6 | SET_ADD equ ozunid_14
|
||||
262 | 1 Unidrive.asm 248 | Data | 11 | | 1 | 00/80C6 : 03 | dfb 3
|
||||
263 | 1 Unidrive.asm 249 | Data | 11 | | 1 | 00/80C7 : 01 | dfb 1
|
||||
264 | 1 Unidrive.asm 250 | Data | 11 | | 2 | 00/80C8 : E4 80 | dw {ozunid_20}
|
||||
265 | 1 Unidrive.asm 251 | Data | 11 | | 1 | 00/80CA : 06 | dfb {6}
|
||||
266 | 1 Unidrive.asm 252 | Comment | 11 | | 0 | 00/80CB | *
|
||||
267 | 1 Unidrive.asm 253 | Comment | 11 | | 0 | 00/80CB | *** Download ***
|
||||
268 | 1 Unidrive.asm 254 | Empty | 11 | | 0 | 00/80CB | ozunid_15
|
||||
269 | 1 Unidrive.asm 254 | Equivalence | 11 | | 0 | 00/80CB | DOWNLOAD equ ozunid_15
|
||||
270 | 1 Unidrive.asm 255 | Data | 11 | | 1 | 00/80CB : 03 | dfb 3
|
||||
271 | 1 Unidrive.asm 256 | Data | 11 | | 1 | 00/80CC : 01 | dfb 1
|
||||
272 | 1 Unidrive.asm 257 | Data | 11 | | 2 | 00/80CD : E8 80 | dw {ozunid_21}
|
||||
273 | 1 Unidrive.asm 258 | Data | 11 | | 1 | 00/80CF : 07 | dfb {7}
|
||||
274 | 1 Unidrive.asm 259 | Comment | 11 | | 0 | 00/80D0 | *
|
||||
275 | 1 Unidrive.asm 260 | Comment | 11 | | 0 | 00/80D0 | *** Execute ***
|
||||
276 | 1 Unidrive.asm 261 | Empty | 11 | | 0 | 00/80D0 | ozunid_16
|
||||
277 | 1 Unidrive.asm 261 | Equivalence | 11 | | 0 | 00/80D0 | EXE equ ozunid_16
|
||||
278 | 1 Unidrive.asm 262 | Data | 11 | | 1 | 00/80D0 : 03 | dfb 3
|
||||
279 | 1 Unidrive.asm 263 | Data | 11 | | 1 | 00/80D1 : 01 | dfb 1
|
||||
280 | 1 Unidrive.asm 264 | Data | 11 | | 2 | 00/80D2 : DC 80 | dw {ozunid_19}
|
||||
281 | 1 Unidrive.asm 265 | Data | 11 | | 1 | 00/80D4 : 05 | dfb {5}
|
||||
282 | 1 Unidrive.asm 266 | Comment | 11 | | 0 | 00/80D5 | *** Eject ***
|
||||
283 | 1 Unidrive.asm 267 | Empty | 11 | | 0 | 00/80D5 | ozunid_17
|
||||
284 | 1 Unidrive.asm 267 | Equivalence | 11 | | 0 | 00/80D5 | E_JECT equ ozunid_17
|
||||
285 | 1 Unidrive.asm 268 | Data | 11 | | 1 | 00/80D5 : 03 | dfb 3
|
||||
286 | 1 Unidrive.asm 269 | Data | 11 | | 1 | 00/80D6 : 01 | dfb 1
|
||||
287 | 1 Unidrive.asm 270 | Data | 11 | | 2 | 00/80D7 : DA 80 | dw {ozunid_18}
|
||||
288 | 1 Unidrive.asm 271 | Data | 11 | | 1 | 00/80D9 : 04 | dfb {4}
|
||||
289 | 1 Unidrive.asm 272 | Comment | 11 | | 0 | 00/80DA | *
|
||||
290 | 1 Unidrive.asm 273 | Comment | 11 | | 0 | 00/80DA | ******** CONTROL LISTS ********
|
||||
291 | 1 Unidrive.asm 274 | Comment | 11 | | 0 | 00/80DA | *
|
||||
292 | 1 Unidrive.asm 275 | Comment | 11 | | 0 | 00/80DA | *
|
||||
293 | 1 Unidrive.asm 276 | Comment | 11 | | 0 | 00/80DA | *** Eject ***
|
||||
294 | 1 Unidrive.asm 277 | Empty | 11 | | 0 | 00/80DA | ozunid_18
|
||||
295 | 1 Unidrive.asm 277 | Equivalence | 11 | | 0 | 00/80DA | CNTL_LIST1 equ ozunid_18
|
||||
296 | 1 Unidrive.asm 278 | Data | 11 | | 2 | 00/80DA : 00 00 | dw $0000
|
||||
297 | 1 Unidrive.asm 279 | Comment | 11 | | 0 | 00/80DC | *
|
||||
298 | 1 Unidrive.asm 280 | Comment | 11 | | 0 | 00/80DC | *** Execute ***
|
||||
299 | 1 Unidrive.asm 281 | Empty | 11 | | 0 | 00/80DC | ozunid_19
|
||||
300 | 1 Unidrive.asm 281 | Equivalence | 11 | | 0 | 00/80DC | CNTL_LIST2 equ ozunid_19
|
||||
301 | 1 Unidrive.asm 282 | Data | 11 | | 1 | 00/80DC : 06 | Clow_byte dfb $06
|
||||
302 | 1 Unidrive.asm 283 | Data | 11 | | 1 | 00/80DD : 00 | Chigh_byte dfb $00
|
||||
303 | 1 Unidrive.asm 284 | Data | 11 | | 1 | 00/80DE : 00 | AccValue dfb $00 ; Input Value
|
||||
304 | 1 Unidrive.asm 285 | Data | 11 | | 1 | 00/80DF : 00 | X_reg dfb $00 ; Input Value (N1)
|
||||
305 | 1 Unidrive.asm 286 | Data | 11 | | 1 | 00/80E0 : 00 | Y_reg dfb $00 ; Input Value (N2)
|
||||
306 | 1 Unidrive.asm 287 | Data | 11 | | 1 | 00/80E1 : 00 | ProStatus dfb $00
|
||||
307 | 1 Unidrive.asm 288 | Data | 11 | | 1 | 00/80E2 : 05 | LowPC_reg dfb $05 ; Like ORG
|
||||
308 | 1 Unidrive.asm 289 | Data | 11 | | 1 | 00/80E3 : 05 | HighPC_reg dfb $05
|
||||
309 | 1 Unidrive.asm 290 | Comment | 11 | | 0 | 00/80E4 | *
|
||||
310 | 1 Unidrive.asm 291 | Comment | 11 | | 0 | 00/80E4 | *** Set Address ***
|
||||
311 | 1 Unidrive.asm 292 | Empty | 11 | | 0 | 00/80E4 | ozunid_20
|
||||
312 | 1 Unidrive.asm 292 | Equivalence | 11 | | 0 | 00/80E4 | CNTL_LIST3 equ ozunid_20
|
||||
313 | 1 Unidrive.asm 293 | Data | 11 | | 1 | 00/80E4 : 02 | CountL_byte dfb $02
|
||||
314 | 1 Unidrive.asm 294 | Data | 11 | | 1 | 00/80E5 : 00 | CountH_byte dfb $00
|
||||
315 | 1 Unidrive.asm 295 | Data | 11 | | 1 | 00/80E6 : 05 | LByte_Addr dfb $05 ; Like ORG
|
||||
316 | 1 Unidrive.asm 296 | Data | 11 | | 1 | 00/80E7 : 05 | HByte_Addr dfb $05
|
||||
317 | 1 Unidrive.asm 297 | Comment | 11 | | 0 | 00/80E8 | *
|
||||
318 | 1 Unidrive.asm 298 | Comment | 11 | | 0 | 00/80E8 | *** Download ***
|
||||
319 | 1 Unidrive.asm 299 | Empty | 11 | | 0 | 00/80E8 | ozunid_21
|
||||
320 | 1 Unidrive.asm 299 | Equivalence | 11 | | 0 | 00/80E8 | CNTL_LIST4 equ ozunid_21
|
||||
321 | 1 Unidrive.asm 300 | Data | 11 | | 1 | 00/80E8 : 09 | LenghtL_byte dfb $09 ;<----- Lenght of Unidisk program Lo Byte
|
||||
322 | 1 Unidrive.asm 301 | Data | 11 | | 1 | 00/80E9 : 00 | LenghtH_byte dfb $00 ;<----- Lenght of Unidisk program Hi Byte
|
||||
323 | 1 Unidrive.asm 302 | Comment | 11 | | 0 | 00/80EA | *
|
||||
324 | 1 Unidrive.asm 303 | Comment | 11 | | 0 | 00/80EA | *** Start UNIDISK Program ***
|
||||
325 | 1 Unidrive.asm 304 | Empty | 11 | | 0 | 00/80EA |
|
||||
326 | 1 Unidrive.asm 305 | Code | 11 | | 2 | 00/80EA : 86 C0 | stx $C0
|
||||
327 | 1 Unidrive.asm 306 | Code | 11 | | 2 | 00/80EC : 84 C1 | sty $C1
|
||||
328 | 1 Unidrive.asm 307 | Empty | 11 | | 0 | 00/80EE |
|
||||
329 | 1 Unidrive.asm 308 | Code | 11 | | 2 | 00/80EE : A5 C0 | lda $C0
|
||||
330 | 1 Unidrive.asm 309 | Code | 11 | | 2 | 00/80F0 : 65 C1 | adc $C1
|
||||
331 | 1 Unidrive.asm 310 | Empty | 11 | | 0 | 00/80F2 |
|
||||
332 | 1 Unidrive.asm 311 | Code | 11 | | 1 | 00/80F2 : 60 | rts
|
||||
------+------------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
BIN
AppleII/Integer adc 2 Byte/Unidrive2
Normal file
BIN
AppleII/Integer adc 2 Byte/Unidrive2
Normal file
Binary file not shown.
280
AppleII/Integer adc 2 Byte/Unidrive2.asm
Normal file
280
AppleII/Integer adc 2 Byte/Unidrive2.asm
Normal file
@ -0,0 +1,280 @@
|
||||
*
|
||||
* Unidisk 3.5 Calc2 <beta>
|
||||
*
|
||||
* The target of this project is to use the Unidisk 3.5 drive to perform
|
||||
* specific numerical routines: 2 Byte Add integer numbers calculation;
|
||||
* in order to use it as a Apple II co-processor unit.
|
||||
*
|
||||
* Copyright (C) 2015 Riccardo Greco <rigreco.grc@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* @com.wudsn.ide.asm.hardware=APPLE2
|
||||
* Protocol Converter Call
|
||||
XC
|
||||
ZPTempL equ $0006 ;Temporary zero page storage
|
||||
ZPTempH equ $0007
|
||||
** Zero page storage **
|
||||
N1 equ $19 ;25
|
||||
N2 equ $1B ;27
|
||||
RSLT equ $1D ;29
|
||||
*** Monitor routines ***
|
||||
COut equ $FDED ;Console output ASCII
|
||||
CROut equ $FD8E ;Carriage return
|
||||
** Command Code **
|
||||
StatusCmd equ 0
|
||||
** Status Code **
|
||||
* StatusDIB equ 3
|
||||
StatusUNI equ 5
|
||||
*
|
||||
ControlCmd equ 4
|
||||
** Control Codes **
|
||||
Eject equ 4
|
||||
Run equ 5
|
||||
SetDWLoad equ 6
|
||||
DWLoad equ 7
|
||||
*
|
||||
org $8000
|
||||
*****************************************************
|
||||
|
||||
*
|
||||
* Find a Protocol Converter in one of the slots.
|
||||
START jsr FindPC
|
||||
bcs Error
|
||||
*** Eject ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw E_JECT
|
||||
*** Set Address ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw SET_ADD
|
||||
*
|
||||
jsr EXEC ; Jump the Error routine
|
||||
rts
|
||||
*********************************************
|
||||
Error equ *
|
||||
*
|
||||
* There's either no PC around, or there was no give message
|
||||
*
|
||||
ldx #0
|
||||
err1 equ *
|
||||
lda Message,x
|
||||
beq errout
|
||||
jsr COut
|
||||
inx
|
||||
bne err1
|
||||
*
|
||||
errout equ *
|
||||
rts
|
||||
*
|
||||
Message asc 'NO PC OR NO DEVICE'
|
||||
dfb $8D,0
|
||||
*********************************************
|
||||
*
|
||||
** Set the Input Value first **
|
||||
EXEC lda N1
|
||||
sta $80E9 ; Absolute addressing
|
||||
lda N1+1
|
||||
sta $80EA
|
||||
|
||||
lda N2
|
||||
sta $80EB
|
||||
lda N2+1
|
||||
sta $80EC
|
||||
*** Download ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw DOWNLOAD
|
||||
** Execute **
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw EXE
|
||||
READ jsr Dispatch
|
||||
dfb StatusCmd
|
||||
dw DParms
|
||||
bcs Error
|
||||
*
|
||||
**** Store Output results in //c ****
|
||||
*
|
||||
lda UNIX_reg
|
||||
sta RSLT ; Store the result
|
||||
lda UNIY_reg
|
||||
sta RSLT+1
|
||||
*
|
||||
rts
|
||||
|
||||
******************************************************
|
||||
FindPC equ *
|
||||
*
|
||||
* Search slot 7 to slot 1 looking for signature bytes
|
||||
*
|
||||
ldx #7 ;Do for seven slots
|
||||
lda #$C7
|
||||
sta ZPTempH
|
||||
lda #$00
|
||||
sta ZPTempL
|
||||
*
|
||||
newslot equ *
|
||||
ldy #7
|
||||
*
|
||||
again equ *
|
||||
lda (ZPTempL),y
|
||||
cmp sigtab,y ;One for byte signature
|
||||
beq maybe ;Found one signature byte
|
||||
dec ZPTempH
|
||||
dex
|
||||
bne newslot
|
||||
*
|
||||
* if we get here, no PC find
|
||||
sec
|
||||
rts
|
||||
*
|
||||
* if we get here, no byte find on PC
|
||||
maybe equ *
|
||||
dey
|
||||
dey ;if N=1 then all sig bytes OK
|
||||
bpl again
|
||||
* Found PC interface. Set up call address.
|
||||
* we already have high byte ($CN), we need low byte
|
||||
*
|
||||
foundPC equ *
|
||||
lda #$FF
|
||||
sta ZPTempL
|
||||
ldy #0 ;For indirect load
|
||||
lda (ZPTempL),y ;Get the byte
|
||||
*
|
||||
* Now the Acc has the low oreder ProDOS entry point.
|
||||
* The PC entry is three locations past this ...
|
||||
*
|
||||
clc
|
||||
adc #3
|
||||
sta ZPTempL
|
||||
*
|
||||
* Now ZPTempL has PC entry point.
|
||||
* Return with carry clear.
|
||||
*
|
||||
clc
|
||||
rts
|
||||
***********************************************************
|
||||
*
|
||||
* There are the PC signature bytes in their relative order.
|
||||
* The $FF bytes are filler bytes and are not compared.
|
||||
*
|
||||
sigtab dfb $FF,$20,$FF,$00
|
||||
dfb $FF,$03,$FF,$00
|
||||
*
|
||||
Dispatch equ *
|
||||
jmp (ZPTempL) ;Simulate an indirect JSR to PC
|
||||
*
|
||||
*** Status Parameter Set for UNI ***
|
||||
DParms equ *
|
||||
DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
DPUnit dfb 1
|
||||
DPBuffer dw UNI
|
||||
DPStatCode dfb StatusUNI
|
||||
*
|
||||
*
|
||||
*
|
||||
*** Status List UNI ***
|
||||
UNI equ *
|
||||
dfb 0
|
||||
UNIError dfb 0
|
||||
UNIRetries dfb 0
|
||||
UNIAcc_reg dfb 0
|
||||
UNIX_reg dfb 0
|
||||
UNIY_reg dfb 0
|
||||
UNIP_val dfb 0
|
||||
HHH dfb 0
|
||||
*
|
||||
*** Set Address ***
|
||||
SET_ADD equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST3
|
||||
dfb SetDWLoad
|
||||
*
|
||||
*** Download ***
|
||||
DOWNLOAD equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST4
|
||||
dfb DWLoad
|
||||
*
|
||||
*** Execute ***
|
||||
EXE equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST2
|
||||
dfb Run
|
||||
*** Eject ***
|
||||
E_JECT equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST1
|
||||
dfb Eject
|
||||
*
|
||||
******** CONTROL LISTS ********
|
||||
*
|
||||
*
|
||||
*** Eject ***
|
||||
CNTL_LIST1 equ *
|
||||
dw $0000
|
||||
*
|
||||
*** Execute ***
|
||||
CNTL_LIST2 equ *
|
||||
Clow_byte dfb $06
|
||||
Chigh_byte dfb $00
|
||||
AccValue dfb $00 ; Input Value
|
||||
X_reg dfb $00 ; Input Value (N1)
|
||||
Y_reg dfb $00 ; Input Value (N2)
|
||||
ProStatus dfb $00 ; Input Value
|
||||
LowPC_reg dfb $05 ; Like ORG
|
||||
HighPC_reg dfb $05
|
||||
*
|
||||
*** Set Address ***
|
||||
CNTL_LIST3 equ *
|
||||
CountL_byte dfb $02
|
||||
CountH_byte dfb $00
|
||||
LByte_Addr dfb $05 ; Like ORG
|
||||
HByte_Addr dfb $05
|
||||
*
|
||||
*** Download ***
|
||||
CNTL_LIST4 equ *
|
||||
LenghtL_byte dfb $1A ;<----- Lenght of Unidisk program Lo Byte
|
||||
LenghtH_byte dfb $00 ;<----- Lenght of Unidisk program Hi Byte
|
||||
*
|
||||
*** Start UNIDISK Program ***
|
||||
** Two byte adc **
|
||||
org $0505
|
||||
RSLTU equ $C0
|
||||
|
||||
clc
|
||||
|
||||
lda N1U ; Lo Byte
|
||||
adc N2U
|
||||
sta RSLTU
|
||||
|
||||
lda N1U+1 ; Hi Byte
|
||||
adc N2U+1
|
||||
sta RSLTU+1
|
||||
** Output Data **
|
||||
ldx RSLTU
|
||||
ldy RSLTU+1
|
||||
|
||||
rts
|
||||
** Input Dynamic Data append in the end of Unidisk routine **
|
||||
N1U dfb $00
|
||||
dfb $00
|
||||
N2U dfb $00
|
||||
dfb $00
|
286
AppleII/Integer adc 2 Byte/Unidrive2_Output.txt
Normal file
286
AppleII/Integer adc 2 Byte/Unidrive2_Output.txt
Normal file
@ -0,0 +1,286 @@
|
||||
------+-------------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
Line | # File Line | Line Type | MX | Reloc | Size | Address Object Code | Source Code
|
||||
------+-------------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
1 | 1 Unidrive2.asm 1 | Comment | 11 | | 0 | 00/8000 | * @com.wudsn.ide.asm.hardware=APPLE2
|
||||
2 | 1 Unidrive2.asm 2 | Comment | 11 | | 0 | 00/8000 | * Protocol Converter Call
|
||||
3 | 1 Unidrive2.asm 3 | Directive | 11 | | 0 | 00/8000 | XC
|
||||
4 | 1 Unidrive2.asm 4 | Equivalence | 11 | | 0 | 00/8000 | ZPTempL equ $0006 ;Temporary zero page storage
|
||||
5 | 1 Unidrive2.asm 5 | Equivalence | 11 | | 0 | 00/8000 | ZPTempH equ $0007
|
||||
6 | 1 Unidrive2.asm 6 | Comment | 11 | | 0 | 00/8000 | ** Zero page storage **
|
||||
7 | 1 Unidrive2.asm 7 | Equivalence | 11 | | 0 | 00/8000 | N1 equ $19 ;25
|
||||
8 | 1 Unidrive2.asm 8 | Equivalence | 11 | | 0 | 00/8000 | N2 equ $1B ;27
|
||||
9 | 1 Unidrive2.asm 9 | Equivalence | 11 | | 0 | 00/8000 | RSLT equ $1D ;29
|
||||
10 | 1 Unidrive2.asm 10 | Comment | 11 | | 0 | 00/8000 | *** Monitor routines ***
|
||||
11 | 1 Unidrive2.asm 11 | Equivalence | 11 | | 0 | 00/8000 | COut equ $FDED ;Console output ASCII
|
||||
12 | 1 Unidrive2.asm 12 | Equivalence | 11 | | 0 | 00/8000 | CROut equ $FD8E ;Carriage return
|
||||
13 | 1 Unidrive2.asm 13 | Comment | 11 | | 0 | 00/8000 | ** Command Code **
|
||||
14 | 1 Unidrive2.asm 14 | Equivalence | 11 | | 0 | 00/8000 | StatusCmd equ 0
|
||||
15 | 1 Unidrive2.asm 15 | Comment | 11 | | 0 | 00/8000 | ** Status Code **
|
||||
16 | 1 Unidrive2.asm 16 | Comment | 11 | | 0 | 00/8000 | * StatusDIB equ 3
|
||||
17 | 1 Unidrive2.asm 17 | Equivalence | 11 | | 0 | 00/8000 | StatusUNI equ 5
|
||||
18 | 1 Unidrive2.asm 18 | Comment | 11 | | 0 | 00/8000 | *
|
||||
19 | 1 Unidrive2.asm 19 | Equivalence | 11 | | 0 | 00/8000 | ControlCmd equ 4
|
||||
20 | 1 Unidrive2.asm 20 | Comment | 11 | | 0 | 00/8000 | ** Control Codes **
|
||||
21 | 1 Unidrive2.asm 21 | Equivalence | 11 | | 0 | 00/8000 | Eject equ 4
|
||||
22 | 1 Unidrive2.asm 22 | Equivalence | 11 | | 0 | 00/8000 | Run equ 5
|
||||
23 | 1 Unidrive2.asm 23 | Equivalence | 11 | | 0 | 00/8000 | SetDWLoad equ 6
|
||||
24 | 1 Unidrive2.asm 24 | Equivalence | 11 | | 0 | 00/8000 | DWLoad equ 7
|
||||
25 | 1 Unidrive2.asm 25 | Comment | 11 | | 0 | 00/8000 | *
|
||||
26 | 1 Unidrive2.asm 26 | Directive | 11 | | 0 | 00/8000 | org $8000
|
||||
27 | 1 Unidrive2.asm 27 | Comment | 11 | | 0 | 00/8000 | *****************************************************
|
||||
28 | 1 Unidrive2.asm 28 | Empty | 11 | | 0 | 00/8000 |
|
||||
29 | 1 Unidrive2.asm 29 | Comment | 11 | | 0 | 00/8000 | *
|
||||
30 | 1 Unidrive2.asm 30 | Comment | 11 | | 0 | 00/8000 | * Find a Protocol Converter in one of the slots.
|
||||
31 | 1 Unidrive2.asm 31 | Code | 11 | | 3 | 00/8000 : 20 6A 80 | START jsr {ozunid_4}
|
||||
32 | 1 Unidrive2.asm 32 | Code | 11 | | 2 | 00/8003 : B0 10 | bcs {ozunid_1}
|
||||
33 | 1 Unidrive2.asm 33 | Comment | 11 | | 0 | 00/8005 | *** Eject ***
|
||||
34 | 1 Unidrive2.asm 34 | Code | 11 | | 3 | 00/8005 : 20 9F 80 | jsr {ozunid_9}
|
||||
35 | 1 Unidrive2.asm 35 | Data | 11 | | 1 | 00/8008 : 04 | dfb {4}
|
||||
36 | 1 Unidrive2.asm 36 | Data | 11 | | 2 | 00/8009 : BE 80 | dw {ozunid_15}
|
||||
37 | 1 Unidrive2.asm 37 | Comment | 11 | | 0 | 00/800B | *** Set Address ***
|
||||
38 | 1 Unidrive2.asm 38 | Code | 11 | | 3 | 00/800B : 20 9F 80 | jsr {ozunid_9}
|
||||
39 | 1 Unidrive2.asm 39 | Data | 11 | | 1 | 00/800E : 04 | dfb {4}
|
||||
40 | 1 Unidrive2.asm 40 | Data | 11 | | 2 | 00/800F : AF 80 | dw {ozunid_12}
|
||||
41 | 1 Unidrive2.asm 41 | Comment | 11 | | 0 | 00/8011 | *
|
||||
42 | 1 Unidrive2.asm 42 | Code | 11 | | 3 | 00/8011 : 20 37 80 | jsr EXEC ; Jump the Error routine
|
||||
43 | 1 Unidrive2.asm 43 | Code | 11 | | 1 | 00/8014 : 60 | rts
|
||||
44 | 1 Unidrive2.asm 44 | Comment | 11 | | 0 | 00/8015 | *********************************************
|
||||
45 | 1 Unidrive2.asm 45 | Empty | 11 | | 0 | 00/8015 | ozunid_1
|
||||
46 | 1 Unidrive2.asm 45 | Equivalence | 11 | | 0 | 00/8015 | Error equ ozunid_1
|
||||
47 | 1 Unidrive2.asm 46 | Comment | 11 | | 0 | 00/8015 | *
|
||||
48 | 1 Unidrive2.asm 47 | Comment | 11 | | 0 | 00/8015 | * There's either no PC around, or there was no give message
|
||||
49 | 1 Unidrive2.asm 48 | Comment | 11 | | 0 | 00/8015 | *
|
||||
50 | 1 Unidrive2.asm 49 | Code | 11 | | 2 | 00/8015 : A2 00 | ldx #0
|
||||
51 | 1 Unidrive2.asm 50 | Empty | 11 | | 0 | 00/8017 | ozunid_2
|
||||
52 | 1 Unidrive2.asm 50 | Equivalence | 11 | | 0 | 00/8017 | err1 equ ozunid_2
|
||||
53 | 1 Unidrive2.asm 51 | Code | 11 | | 3 | 00/8017 : BD 23 80 | lda Message,x
|
||||
54 | 1 Unidrive2.asm 52 | Code | 11 | | 2 | 00/801A : F0 06 | beq {ozunid_3}
|
||||
55 | 1 Unidrive2.asm 53 | Code | 11 | | 3 | 00/801C : 20 ED FD | jsr {$FDED}
|
||||
56 | 1 Unidrive2.asm 54 | Code | 11 | | 1 | 00/801F : E8 | inx
|
||||
57 | 1 Unidrive2.asm 55 | Code | 11 | | 2 | 00/8020 : D0 F5 | bne {ozunid_2}
|
||||
58 | 1 Unidrive2.asm 56 | Comment | 11 | | 0 | 00/8022 | *
|
||||
59 | 1 Unidrive2.asm 57 | Empty | 11 | | 0 | 00/8022 | ozunid_3
|
||||
60 | 1 Unidrive2.asm 57 | Equivalence | 11 | | 0 | 00/8022 | errout equ ozunid_3
|
||||
61 | 1 Unidrive2.asm 58 | Code | 11 | | 1 | 00/8022 : 60 | rts
|
||||
62 | 1 Unidrive2.asm 59 | Comment | 11 | | 0 | 00/8023 | *
|
||||
63 | 1 Unidrive2.asm 60 | Data | 11 | | 18 | 00/8023 : 4E 4F 20 50 | Message asc 'NO PC OR NO DEVICE'
|
||||
| | | | | | 43 20 4F 52 |
|
||||
| | | | | | 20 4E 4F 20 |
|
||||
| | | | | | 44 45 56 49 |
|
||||
| | | | | | 43 45 |
|
||||
64 | 1 Unidrive2.asm 61 | Data | 11 | | 2 | 00/8035 : 8D 00 | dfb $8D,0
|
||||
65 | 1 Unidrive2.asm 62 | Comment | 11 | | 0 | 00/8037 | *********************************************
|
||||
66 | 1 Unidrive2.asm 63 | Comment | 11 | | 0 | 00/8037 | *
|
||||
67 | 1 Unidrive2.asm 64 | Comment | 11 | | 0 | 00/8037 | ** Set the Input Value first **
|
||||
68 | 1 Unidrive2.asm 65 | Code | 11 | | 2 | 00/8037 : A5 19 | EXEC lda {$19}
|
||||
69 | 1 Unidrive2.asm 66 | Code | 11 | | 3 | 00/8039 : 8D E9 80 | sta $80E9 ; Absolute addressing
|
||||
70 | 1 Unidrive2.asm 67 | Code | 11 | | 2 | 00/803C : A5 1A | lda {$19}+1
|
||||
71 | 1 Unidrive2.asm 68 | Code | 11 | | 3 | 00/803E : 8D EA 80 | sta $80EA
|
||||
72 | 1 Unidrive2.asm 69 | Empty | 11 | | 0 | 00/8041 |
|
||||
73 | 1 Unidrive2.asm 70 | Code | 11 | | 2 | 00/8041 : A5 1B | lda {$1B}
|
||||
74 | 1 Unidrive2.asm 71 | Code | 11 | | 3 | 00/8043 : 8D EB 80 | sta $80EB
|
||||
75 | 1 Unidrive2.asm 72 | Code | 11 | | 2 | 00/8046 : A5 1C | lda {$1B}+1
|
||||
76 | 1 Unidrive2.asm 73 | Code | 11 | | 3 | 00/8048 : 8D EC 80 | sta $80EC
|
||||
77 | 1 Unidrive2.asm 74 | Comment | 11 | | 0 | 00/804B | *** Download ***
|
||||
78 | 1 Unidrive2.asm 75 | Code | 11 | | 3 | 00/804B : 20 9F 80 | jsr {ozunid_9}
|
||||
79 | 1 Unidrive2.asm 76 | Data | 11 | | 1 | 00/804E : 04 | dfb {4}
|
||||
80 | 1 Unidrive2.asm 77 | Data | 11 | | 2 | 00/804F : B4 80 | dw {ozunid_13}
|
||||
81 | 1 Unidrive2.asm 78 | Comment | 11 | | 0 | 00/8051 | ** Execute **
|
||||
82 | 1 Unidrive2.asm 79 | Code | 11 | | 3 | 00/8051 : 20 9F 80 | jsr {ozunid_9}
|
||||
83 | 1 Unidrive2.asm 80 | Data | 11 | | 1 | 00/8054 : 04 | dfb {4}
|
||||
84 | 1 Unidrive2.asm 81 | Data | 11 | | 2 | 00/8055 : B9 80 | dw {ozunid_14}
|
||||
85 | 1 Unidrive2.asm 82 | Code | 11 | | 3 | 00/8057 : 20 9F 80 | READ jsr {ozunid_9}
|
||||
86 | 1 Unidrive2.asm 83 | Data | 11 | | 1 | 00/805A : 00 | dfb {0}
|
||||
87 | 1 Unidrive2.asm 84 | Data | 11 | | 2 | 00/805B : A2 80 | dw {ozunid_10}
|
||||
88 | 1 Unidrive2.asm 85 | Code | 11 | | 2 | 00/805D : B0 B6 | bcs {ozunid_1}
|
||||
89 | 1 Unidrive2.asm 86 | Comment | 11 | | 0 | 00/805F | *
|
||||
90 | 1 Unidrive2.asm 87 | Comment | 11 | | 0 | 00/805F | **** Store Output results in //c ****
|
||||
91 | 1 Unidrive2.asm 88 | Comment | 11 | | 0 | 00/805F | *
|
||||
92 | 1 Unidrive2.asm 89 | Code | 11 | | 3 | 00/805F : AD AB 80 | lda UNIX_reg
|
||||
93 | 1 Unidrive2.asm 90 | Code | 11 | | 2 | 00/8062 : 85 1D | sta {$1D} ; Store the result
|
||||
94 | 1 Unidrive2.asm 91 | Code | 11 | | 3 | 00/8064 : AD AC 80 | lda UNIY_reg
|
||||
95 | 1 Unidrive2.asm 92 | Code | 11 | | 2 | 00/8067 : 85 1E | sta {$1D}+1
|
||||
96 | 1 Unidrive2.asm 93 | Comment | 11 | | 0 | 00/8069 | *
|
||||
97 | 1 Unidrive2.asm 94 | Code | 11 | | 1 | 00/8069 : 60 | rts
|
||||
98 | 1 Unidrive2.asm 95 | Empty | 11 | | 0 | 00/806A |
|
||||
99 | 1 Unidrive2.asm 96 | Comment | 11 | | 0 | 00/806A | ******************************************************
|
||||
100 | 1 Unidrive2.asm 97 | Empty | 11 | | 0 | 00/806A | ozunid_4
|
||||
101 | 1 Unidrive2.asm 97 | Equivalence | 11 | | 0 | 00/806A | FindPC equ ozunid_4
|
||||
102 | 1 Unidrive2.asm 98 | Comment | 11 | | 0 | 00/806A | *
|
||||
103 | 1 Unidrive2.asm 99 | Comment | 11 | | 0 | 00/806A | * Search slot 7 to slot 1 looking for signature bytes
|
||||
104 | 1 Unidrive2.asm 100 | Comment | 11 | | 0 | 00/806A | *
|
||||
105 | 1 Unidrive2.asm 101 | Code | 11 | | 2 | 00/806A : A2 07 | ldx #7 ;Do for seven slots
|
||||
106 | 1 Unidrive2.asm 102 | Code | 11 | | 2 | 00/806C : A9 C7 | lda #$C7
|
||||
107 | 1 Unidrive2.asm 103 | Code | 11 | | 2 | 00/806E : 85 07 | sta {$0007}
|
||||
108 | 1 Unidrive2.asm 104 | Code | 11 | | 2 | 00/8070 : A9 00 | lda #$00
|
||||
109 | 1 Unidrive2.asm 105 | Code | 11 | | 2 | 00/8072 : 85 06 | sta {$0006}
|
||||
110 | 1 Unidrive2.asm 106 | Comment | 11 | | 0 | 00/8074 | *
|
||||
111 | 1 Unidrive2.asm 107 | Empty | 11 | | 0 | 00/8074 | ozunid_5
|
||||
112 | 1 Unidrive2.asm 107 | Equivalence | 11 | | 0 | 00/8074 | newslot equ ozunid_5
|
||||
113 | 1 Unidrive2.asm 108 | Code | 11 | | 2 | 00/8074 : A0 07 | ldy #7
|
||||
114 | 1 Unidrive2.asm 109 | Comment | 11 | | 0 | 00/8076 | *
|
||||
115 | 1 Unidrive2.asm 110 | Empty | 11 | | 0 | 00/8076 | ozunid_6
|
||||
116 | 1 Unidrive2.asm 110 | Equivalence | 11 | | 0 | 00/8076 | again equ ozunid_6
|
||||
117 | 1 Unidrive2.asm 111 | Code | 11 | | 2 | 00/8076 : B1 06 | lda ({$0006}),y
|
||||
118 | 1 Unidrive2.asm 112 | Code | 11 | | 3 | 00/8078 : D9 97 80 | cmp sigtab,y ;One for byte signature
|
||||
119 | 1 Unidrive2.asm 113 | Code | 11 | | 2 | 00/807B : F0 07 | beq {ozunid_7} ;Found one signature byte
|
||||
120 | 1 Unidrive2.asm 114 | Code | 11 | | 2 | 00/807D : C6 07 | dec {$0007}
|
||||
121 | 1 Unidrive2.asm 115 | Code | 11 | | 1 | 00/807F : CA | dex
|
||||
122 | 1 Unidrive2.asm 116 | Code | 11 | | 2 | 00/8080 : D0 F2 | bne {ozunid_5}
|
||||
123 | 1 Unidrive2.asm 117 | Comment | 11 | | 0 | 00/8082 | *
|
||||
124 | 1 Unidrive2.asm 118 | Comment | 11 | | 0 | 00/8082 | * if we get here, no PC find
|
||||
125 | 1 Unidrive2.asm 119 | Code | 11 | | 1 | 00/8082 : 38 | sec
|
||||
126 | 1 Unidrive2.asm 120 | Code | 11 | | 1 | 00/8083 : 60 | rts
|
||||
127 | 1 Unidrive2.asm 121 | Comment | 11 | | 0 | 00/8084 | *
|
||||
128 | 1 Unidrive2.asm 122 | Comment | 11 | | 0 | 00/8084 | * if we get here, no byte find on PC
|
||||
129 | 1 Unidrive2.asm 123 | Empty | 11 | | 0 | 00/8084 | ozunid_7
|
||||
130 | 1 Unidrive2.asm 123 | Equivalence | 11 | | 0 | 00/8084 | maybe equ ozunid_7
|
||||
131 | 1 Unidrive2.asm 124 | Code | 11 | | 1 | 00/8084 : 88 | dey
|
||||
132 | 1 Unidrive2.asm 125 | Code | 11 | | 1 | 00/8085 : 88 | dey ;if N=1 then all sig bytes OK
|
||||
133 | 1 Unidrive2.asm 126 | Code | 11 | | 2 | 00/8086 : 10 EE | bpl {ozunid_6}
|
||||
134 | 1 Unidrive2.asm 127 | Comment | 11 | | 0 | 00/8088 | * Found PC interface. Set up call address.
|
||||
135 | 1 Unidrive2.asm 128 | Comment | 11 | | 0 | 00/8088 | * we already have high byte ($CN), we need low byte
|
||||
136 | 1 Unidrive2.asm 129 | Comment | 11 | | 0 | 00/8088 | *
|
||||
137 | 1 Unidrive2.asm 130 | Empty | 11 | | 0 | 00/8088 | ozunid_8
|
||||
138 | 1 Unidrive2.asm 130 | Equivalence | 11 | | 0 | 00/8088 | foundPC equ ozunid_8
|
||||
139 | 1 Unidrive2.asm 131 | Code | 11 | | 2 | 00/8088 : A9 FF | lda #$FF
|
||||
140 | 1 Unidrive2.asm 132 | Code | 11 | | 2 | 00/808A : 85 06 | sta {$0006}
|
||||
141 | 1 Unidrive2.asm 133 | Code | 11 | | 2 | 00/808C : A0 00 | ldy #0 ;For indirect load
|
||||
142 | 1 Unidrive2.asm 134 | Code | 11 | | 2 | 00/808E : B1 06 | lda ({$0006}),y ;Get the byte
|
||||
143 | 1 Unidrive2.asm 135 | Comment | 11 | | 0 | 00/8090 | *
|
||||
144 | 1 Unidrive2.asm 136 | Comment | 11 | | 0 | 00/8090 | * Now the Acc has the low oreder ProDOS entry point.
|
||||
145 | 1 Unidrive2.asm 137 | Comment | 11 | | 0 | 00/8090 | * The PC entry is three locations past this ...
|
||||
146 | 1 Unidrive2.asm 138 | Comment | 11 | | 0 | 00/8090 | *
|
||||
147 | 1 Unidrive2.asm 139 | Code | 11 | | 1 | 00/8090 : 18 | clc
|
||||
148 | 1 Unidrive2.asm 140 | Code | 11 | | 2 | 00/8091 : 69 03 | adc #3
|
||||
149 | 1 Unidrive2.asm 141 | Code | 11 | | 2 | 00/8093 : 85 06 | sta {$0006}
|
||||
150 | 1 Unidrive2.asm 142 | Comment | 11 | | 0 | 00/8095 | *
|
||||
151 | 1 Unidrive2.asm 143 | Comment | 11 | | 0 | 00/8095 | * Now ZPTempL has PC entry point.
|
||||
152 | 1 Unidrive2.asm 144 | Comment | 11 | | 0 | 00/8095 | * Return with carry clear.
|
||||
153 | 1 Unidrive2.asm 145 | Comment | 11 | | 0 | 00/8095 | *
|
||||
154 | 1 Unidrive2.asm 146 | Code | 11 | | 1 | 00/8095 : 18 | clc
|
||||
155 | 1 Unidrive2.asm 147 | Code | 11 | | 1 | 00/8096 : 60 | rts
|
||||
156 | 1 Unidrive2.asm 148 | Comment | 11 | | 0 | 00/8097 | ***********************************************************
|
||||
157 | 1 Unidrive2.asm 149 | Comment | 11 | | 0 | 00/8097 | *
|
||||
158 | 1 Unidrive2.asm 150 | Comment | 11 | | 0 | 00/8097 | * There are the PC signature bytes in their relative order.
|
||||
159 | 1 Unidrive2.asm 151 | Comment | 11 | | 0 | 00/8097 | * The $FF bytes are filler bytes and are not compared.
|
||||
160 | 1 Unidrive2.asm 152 | Comment | 11 | | 0 | 00/8097 | *
|
||||
161 | 1 Unidrive2.asm 153 | Data | 11 | | 4 | 00/8097 : FF 20 FF 00 | sigtab dfb $FF,$20,$FF,$00
|
||||
162 | 1 Unidrive2.asm 154 | Data | 11 | | 4 | 00/809B : FF 03 FF 00 | dfb $FF,$03,$FF,$00
|
||||
163 | 1 Unidrive2.asm 155 | Comment | 11 | | 0 | 00/809F | *
|
||||
164 | 1 Unidrive2.asm 156 | Empty | 11 | | 0 | 00/809F | ozunid_9
|
||||
165 | 1 Unidrive2.asm 156 | Equivalence | 11 | | 0 | 00/809F | Dispatch equ ozunid_9
|
||||
166 | 1 Unidrive2.asm 157 | Code | 11 | | 3 | 00/809F : 6C 06 00 | jmp ({$0006}) ;Simulate an indirect JSR to PC
|
||||
167 | 1 Unidrive2.asm 158 | Comment | 11 | | 0 | 00/80A2 | *
|
||||
168 | 1 Unidrive2.asm 159 | Comment | 11 | | 0 | 00/80A2 | *** Status Parameter Set for UNI ***
|
||||
169 | 1 Unidrive2.asm 160 | Empty | 11 | | 0 | 00/80A2 | ozunid_10
|
||||
170 | 1 Unidrive2.asm 160 | Equivalence | 11 | | 0 | 00/80A2 | DParms equ ozunid_10
|
||||
171 | 1 Unidrive2.asm 161 | Data | 11 | | 1 | 00/80A2 : 03 | DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
172 | 1 Unidrive2.asm 162 | Data | 11 | | 1 | 00/80A3 : 01 | DPUnit dfb 1
|
||||
173 | 1 Unidrive2.asm 163 | Data | 11 | | 2 | 00/80A4 : A7 80 | DPBuffer dw {ozunid_11}
|
||||
174 | 1 Unidrive2.asm 164 | Data | 11 | | 1 | 00/80A6 : 05 | DPStatCode dfb {5}
|
||||
175 | 1 Unidrive2.asm 165 | Comment | 11 | | 0 | 00/80A7 | *
|
||||
176 | 1 Unidrive2.asm 166 | Comment | 11 | | 0 | 00/80A7 | *
|
||||
177 | 1 Unidrive2.asm 167 | Comment | 11 | | 0 | 00/80A7 | *
|
||||
178 | 1 Unidrive2.asm 168 | Comment | 11 | | 0 | 00/80A7 | *** Status List UNI ***
|
||||
179 | 1 Unidrive2.asm 169 | Empty | 11 | | 0 | 00/80A7 | ozunid_11
|
||||
180 | 1 Unidrive2.asm 169 | Equivalence | 11 | | 0 | 00/80A7 | UNI equ ozunid_11
|
||||
181 | 1 Unidrive2.asm 170 | Data | 11 | | 1 | 00/80A7 : 00 | dfb 0
|
||||
182 | 1 Unidrive2.asm 171 | Data | 11 | | 1 | 00/80A8 : 00 | UNIError dfb 0
|
||||
183 | 1 Unidrive2.asm 172 | Data | 11 | | 1 | 00/80A9 : 00 | UNIRetries dfb 0
|
||||
184 | 1 Unidrive2.asm 173 | Data | 11 | | 1 | 00/80AA : 00 | UNIAcc_reg dfb 0
|
||||
185 | 1 Unidrive2.asm 174 | Data | 11 | | 1 | 00/80AB : 00 | UNIX_reg dfb 0
|
||||
186 | 1 Unidrive2.asm 175 | Data | 11 | | 1 | 00/80AC : 00 | UNIY_reg dfb 0
|
||||
187 | 1 Unidrive2.asm 176 | Data | 11 | | 1 | 00/80AD : 00 | UNIP_val dfb 0
|
||||
188 | 1 Unidrive2.asm 177 | Data | 11 | | 1 | 00/80AE : 00 | HHH dfb 0
|
||||
189 | 1 Unidrive2.asm 178 | Comment | 11 | | 0 | 00/80AF | *
|
||||
190 | 1 Unidrive2.asm 179 | Comment | 11 | | 0 | 00/80AF | *** Set Address ***
|
||||
191 | 1 Unidrive2.asm 180 | Empty | 11 | | 0 | 00/80AF | ozunid_12
|
||||
192 | 1 Unidrive2.asm 180 | Equivalence | 11 | | 0 | 00/80AF | SET_ADD equ ozunid_12
|
||||
193 | 1 Unidrive2.asm 181 | Data | 11 | | 1 | 00/80AF : 03 | dfb 3
|
||||
194 | 1 Unidrive2.asm 182 | Data | 11 | | 1 | 00/80B0 : 01 | dfb 1
|
||||
195 | 1 Unidrive2.asm 183 | Data | 11 | | 2 | 00/80B1 : CD 80 | dw {ozunid_18}
|
||||
196 | 1 Unidrive2.asm 184 | Data | 11 | | 1 | 00/80B3 : 06 | dfb {6}
|
||||
197 | 1 Unidrive2.asm 185 | Comment | 11 | | 0 | 00/80B4 | *
|
||||
198 | 1 Unidrive2.asm 186 | Comment | 11 | | 0 | 00/80B4 | *** Download ***
|
||||
199 | 1 Unidrive2.asm 187 | Empty | 11 | | 0 | 00/80B4 | ozunid_13
|
||||
200 | 1 Unidrive2.asm 187 | Equivalence | 11 | | 0 | 00/80B4 | DOWNLOAD equ ozunid_13
|
||||
201 | 1 Unidrive2.asm 188 | Data | 11 | | 1 | 00/80B4 : 03 | dfb 3
|
||||
202 | 1 Unidrive2.asm 189 | Data | 11 | | 1 | 00/80B5 : 01 | dfb 1
|
||||
203 | 1 Unidrive2.asm 190 | Data | 11 | | 2 | 00/80B6 : D1 80 | dw {ozunid_19}
|
||||
204 | 1 Unidrive2.asm 191 | Data | 11 | | 1 | 00/80B8 : 07 | dfb {7}
|
||||
205 | 1 Unidrive2.asm 192 | Comment | 11 | | 0 | 00/80B9 | *
|
||||
206 | 1 Unidrive2.asm 193 | Comment | 11 | | 0 | 00/80B9 | *** Execute ***
|
||||
207 | 1 Unidrive2.asm 194 | Empty | 11 | | 0 | 00/80B9 | ozunid_14
|
||||
208 | 1 Unidrive2.asm 194 | Equivalence | 11 | | 0 | 00/80B9 | EXE equ ozunid_14
|
||||
209 | 1 Unidrive2.asm 195 | Data | 11 | | 1 | 00/80B9 : 03 | dfb 3
|
||||
210 | 1 Unidrive2.asm 196 | Data | 11 | | 1 | 00/80BA : 01 | dfb 1
|
||||
211 | 1 Unidrive2.asm 197 | Data | 11 | | 2 | 00/80BB : C5 80 | dw {ozunid_17}
|
||||
212 | 1 Unidrive2.asm 198 | Data | 11 | | 1 | 00/80BD : 05 | dfb {5}
|
||||
213 | 1 Unidrive2.asm 199 | Comment | 11 | | 0 | 00/80BE | *** Eject ***
|
||||
214 | 1 Unidrive2.asm 200 | Empty | 11 | | 0 | 00/80BE | ozunid_15
|
||||
215 | 1 Unidrive2.asm 200 | Equivalence | 11 | | 0 | 00/80BE | E_JECT equ ozunid_15
|
||||
216 | 1 Unidrive2.asm 201 | Data | 11 | | 1 | 00/80BE : 03 | dfb 3
|
||||
217 | 1 Unidrive2.asm 202 | Data | 11 | | 1 | 00/80BF : 01 | dfb 1
|
||||
218 | 1 Unidrive2.asm 203 | Data | 11 | | 2 | 00/80C0 : C3 80 | dw {ozunid_16}
|
||||
219 | 1 Unidrive2.asm 204 | Data | 11 | | 1 | 00/80C2 : 04 | dfb {4}
|
||||
220 | 1 Unidrive2.asm 205 | Comment | 11 | | 0 | 00/80C3 | *
|
||||
221 | 1 Unidrive2.asm 206 | Comment | 11 | | 0 | 00/80C3 | ******** CONTROL LISTS ********
|
||||
222 | 1 Unidrive2.asm 207 | Comment | 11 | | 0 | 00/80C3 | *
|
||||
223 | 1 Unidrive2.asm 208 | Comment | 11 | | 0 | 00/80C3 | *
|
||||
224 | 1 Unidrive2.asm 209 | Comment | 11 | | 0 | 00/80C3 | *** Eject ***
|
||||
225 | 1 Unidrive2.asm 210 | Empty | 11 | | 0 | 00/80C3 | ozunid_16
|
||||
226 | 1 Unidrive2.asm 210 | Equivalence | 11 | | 0 | 00/80C3 | CNTL_LIST1 equ ozunid_16
|
||||
227 | 1 Unidrive2.asm 211 | Data | 11 | | 2 | 00/80C3 : 00 00 | dw $0000
|
||||
228 | 1 Unidrive2.asm 212 | Comment | 11 | | 0 | 00/80C5 | *
|
||||
229 | 1 Unidrive2.asm 213 | Comment | 11 | | 0 | 00/80C5 | *** Execute ***
|
||||
230 | 1 Unidrive2.asm 214 | Empty | 11 | | 0 | 00/80C5 | ozunid_17
|
||||
231 | 1 Unidrive2.asm 214 | Equivalence | 11 | | 0 | 00/80C5 | CNTL_LIST2 equ ozunid_17
|
||||
232 | 1 Unidrive2.asm 215 | Data | 11 | | 1 | 00/80C5 : 06 | Clow_byte dfb $06
|
||||
233 | 1 Unidrive2.asm 216 | Data | 11 | | 1 | 00/80C6 : 00 | Chigh_byte dfb $00
|
||||
234 | 1 Unidrive2.asm 217 | Data | 11 | | 1 | 00/80C7 : 00 | AccValue dfb $00 ; Input Value
|
||||
235 | 1 Unidrive2.asm 218 | Data | 11 | | 1 | 00/80C8 : 00 | X_reg dfb $00 ; Input Value (N1)
|
||||
236 | 1 Unidrive2.asm 219 | Data | 11 | | 1 | 00/80C9 : 00 | Y_reg dfb $00 ; Input Value (N2)
|
||||
237 | 1 Unidrive2.asm 220 | Data | 11 | | 1 | 00/80CA : 00 | ProStatus dfb $00 ; Input Value
|
||||
238 | 1 Unidrive2.asm 221 | Data | 11 | | 1 | 00/80CB : 05 | LowPC_reg dfb $05 ; Like ORG
|
||||
239 | 1 Unidrive2.asm 222 | Data | 11 | | 1 | 00/80CC : 05 | HighPC_reg dfb $05
|
||||
240 | 1 Unidrive2.asm 223 | Comment | 11 | | 0 | 00/80CD | *
|
||||
241 | 1 Unidrive2.asm 224 | Comment | 11 | | 0 | 00/80CD | *** Set Address ***
|
||||
242 | 1 Unidrive2.asm 225 | Empty | 11 | | 0 | 00/80CD | ozunid_18
|
||||
243 | 1 Unidrive2.asm 225 | Equivalence | 11 | | 0 | 00/80CD | CNTL_LIST3 equ ozunid_18
|
||||
244 | 1 Unidrive2.asm 226 | Data | 11 | | 1 | 00/80CD : 02 | CountL_byte dfb $02
|
||||
245 | 1 Unidrive2.asm 227 | Data | 11 | | 1 | 00/80CE : 00 | CountH_byte dfb $00
|
||||
246 | 1 Unidrive2.asm 228 | Data | 11 | | 1 | 00/80CF : 05 | LByte_Addr dfb $05 ; Like ORG
|
||||
247 | 1 Unidrive2.asm 229 | Data | 11 | | 1 | 00/80D0 : 05 | HByte_Addr dfb $05
|
||||
248 | 1 Unidrive2.asm 230 | Comment | 11 | | 0 | 00/80D1 | *
|
||||
249 | 1 Unidrive2.asm 231 | Comment | 11 | | 0 | 00/80D1 | *** Download ***
|
||||
250 | 1 Unidrive2.asm 232 | Empty | 11 | | 0 | 00/80D1 | ozunid_19
|
||||
251 | 1 Unidrive2.asm 232 | Equivalence | 11 | | 0 | 00/80D1 | CNTL_LIST4 equ ozunid_19
|
||||
252 | 1 Unidrive2.asm 233 | Data | 11 | | 1 | 00/80D1 : 1A | LenghtL_byte dfb $1A ;<----- Lenght of Unidisk program Lo Byte
|
||||
253 | 1 Unidrive2.asm 234 | Data | 11 | | 1 | 00/80D2 : 00 | LenghtH_byte dfb $00 ;<----- Lenght of Unidisk program Hi Byte
|
||||
254 | 1 Unidrive2.asm 235 | Comment | 11 | | 0 | 00/80D3 | *
|
||||
255 | 1 Unidrive2.asm 236 | Comment | 11 | | 0 | 00/80D3 | *** Start UNIDISK Program ***
|
||||
256 | 1 Unidrive2.asm 237 | Comment | 11 | | 0 | 00/80D3 | ** Two byte adc **
|
||||
257 | 1 Unidrive2.asm 238 | Directive | 11 | | 0 | 00/80D3 | org $0505
|
||||
258 | 1 Unidrive2.asm 239 | Equivalence | 11 | | 0 | 00/0505 | RSLTU equ $C0
|
||||
259 | 1 Unidrive2.asm 240 | Empty | 11 | | 0 | 00/0505 |
|
||||
260 | 1 Unidrive2.asm 241 | Code | 11 | | 1 | 00/0505 : 18 | clc
|
||||
261 | 1 Unidrive2.asm 242 | Empty | 11 | | 0 | 00/0506 |
|
||||
262 | 1 Unidrive2.asm 243 | Code | 11 | | 3 | 00/0506 : AD 1B 05 | lda N1U ; Lo Byte
|
||||
263 | 1 Unidrive2.asm 244 | Code | 11 | | 3 | 00/0509 : 6D 1D 05 | adc N2U
|
||||
264 | 1 Unidrive2.asm 245 | Code | 11 | | 2 | 00/050C : 85 C0 | sta {$C0}
|
||||
265 | 1 Unidrive2.asm 246 | Empty | 11 | | 0 | 00/050E |
|
||||
266 | 1 Unidrive2.asm 247 | Code | 11 | | 3 | 00/050E : AD 1C 05 | lda N1U+1 ; Hi Byte
|
||||
267 | 1 Unidrive2.asm 248 | Code | 11 | | 3 | 00/0511 : 6D 1E 05 | adc N2U+1
|
||||
268 | 1 Unidrive2.asm 249 | Code | 11 | | 2 | 00/0514 : 85 C1 | sta {$C0}+1
|
||||
269 | 1 Unidrive2.asm 250 | Comment | 11 | | 0 | 00/0516 | ** Output Data **
|
||||
270 | 1 Unidrive2.asm 251 | Code | 11 | | 2 | 00/0516 : A6 C0 | ldx {$C0}
|
||||
271 | 1 Unidrive2.asm 252 | Code | 11 | | 2 | 00/0518 : A4 C1 | ldy {$C0}+1
|
||||
272 | 1 Unidrive2.asm 253 | Empty | 11 | | 0 | 00/051A |
|
||||
273 | 1 Unidrive2.asm 254 | Code | 11 | | 1 | 00/051A : 60 | rts
|
||||
274 | 1 Unidrive2.asm 255 | Comment | 11 | | 0 | 00/051B | ** Input Dynamic Data append in the end of Unidisk routine **
|
||||
275 | 1 Unidrive2.asm 256 | Data | 11 | | 1 | 00/051B : 00 | N1U dfb $00
|
||||
276 | 1 Unidrive2.asm 257 | Data | 11 | | 1 | 00/051C : 00 | dfb $00
|
||||
277 | 1 Unidrive2.asm 258 | Data | 11 | | 1 | 00/051D : 00 | N2U dfb $00
|
||||
278 | 1 Unidrive2.asm 259 | Data | 11 | | 1 | 00/051E : 00 | dfb $00
|
||||
------+-------------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
BIN
AppleII/Memory dump/Uniprox
Normal file
BIN
AppleII/Memory dump/Uniprox
Normal file
Binary file not shown.
379
AppleII/Memory dump/Uniprox.asm
Normal file
379
AppleII/Memory dump/Uniprox.asm
Normal file
@ -0,0 +1,379 @@
|
||||
*
|
||||
* Unidisk 3.5 ROM Memory Dump <beta>
|
||||
*
|
||||
* The target of this project is to dump all the Unidisk 3.5 memory
|
||||
*
|
||||
* Copyright (C) 2014 Riccardo Greco <rigreco.grc@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* @com.wudsn.ide.asm.hardware=APPLE2
|
||||
* Protocol Converter Call
|
||||
XC
|
||||
ZPTempL equ $0006 ;Temporary zero page storage
|
||||
ZPTempH equ $0007
|
||||
*** Pointers ***
|
||||
LowMain equ $000A
|
||||
HiMain equ $000B
|
||||
*** Monitor routines ***
|
||||
COut equ $FDED ;Console output ASCII
|
||||
COUT1 equ $FDF0 ;Output to screen
|
||||
CROut equ $FD8E ;Carriage return
|
||||
PRbyte equ $FDDA ;Print byte in hex
|
||||
PRBL2 equ $F94A ;Print many spaces
|
||||
KEYIN equ $FD1B ;Waits for keypress
|
||||
** Command Code **
|
||||
StatusCmd equ 0
|
||||
** Status Code **
|
||||
StatusDIB equ 3
|
||||
StatusUNI equ 5
|
||||
*
|
||||
ControlCmd equ 4
|
||||
** Control Codes **
|
||||
Eject equ 4
|
||||
Run equ 5
|
||||
SetDWLoad equ 6
|
||||
DWLoad equ 7
|
||||
*
|
||||
org $8000
|
||||
*****************************************************
|
||||
* Presentation message **************
|
||||
*
|
||||
ldx #0
|
||||
LOOP equ *
|
||||
lda DATA,x
|
||||
beq START
|
||||
jsr COut
|
||||
inx
|
||||
bne LOOP
|
||||
*
|
||||
DATA asc 'UNIDISK 3.5 UTILITY BY R. GRECO'
|
||||
dfb $8D,0 ; Inverse mode on
|
||||
*****************************************************
|
||||
*
|
||||
* Find a Protocol Converter in one of the slots.
|
||||
START jsr FindPC
|
||||
bcs Error
|
||||
|
||||
jsr CROut
|
||||
jsr CROut
|
||||
*
|
||||
* Now make the DIB call to the first guy
|
||||
*
|
||||
jsr Dispatch
|
||||
dfb StatusCmd
|
||||
dw DParmsDIB
|
||||
bcs Error
|
||||
*
|
||||
* Got the DIB; now print the name string
|
||||
*
|
||||
ldx #0
|
||||
morechars equ *
|
||||
lda DIBName,x
|
||||
ora #$80 ;COut wants high Bit set
|
||||
jsr COut ; ASCII
|
||||
inx
|
||||
cpx DIBNameLen
|
||||
bne morechars
|
||||
*************************************
|
||||
ldx #02 ; Set 2 space
|
||||
jsr PRBL2
|
||||
** Print Type ***********************
|
||||
lda DIBType
|
||||
jsr PRbyte ; HEX form
|
||||
*************************************
|
||||
ldx #02 ; Set 2 space
|
||||
jsr PRBL2
|
||||
** Print Firmware version ***********
|
||||
ldx #0
|
||||
morechars2 equ *
|
||||
lda DIBVersion,x
|
||||
jsr PRbyte ; HEX form
|
||||
inx
|
||||
cpx #$02 ; 2 Byte
|
||||
bne morechars2
|
||||
jsr COut
|
||||
**************************************
|
||||
jsr CROut
|
||||
jsr CROut
|
||||
** Wait keypress to continue **
|
||||
*
|
||||
jsr KEYIN
|
||||
*
|
||||
*** Eject ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw E_JECT
|
||||
*** Set start HiMain Memory Pointers ***
|
||||
lda #$20 ; Hi Byte start (//c ram)
|
||||
sta HiMain ; HiMain=$20 set
|
||||
*** Set Address ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw SET_ADD
|
||||
*** Download ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw DOWNLOAD
|
||||
*
|
||||
jsr RESET ; Jump the Error routine
|
||||
rts
|
||||
*********************************************
|
||||
Error equ *
|
||||
*
|
||||
* There's either no PC around, or there was no give message
|
||||
*
|
||||
ldx #0
|
||||
err1 equ *
|
||||
lda Message,x
|
||||
beq errout
|
||||
jsr COut
|
||||
inx
|
||||
bne err1
|
||||
*
|
||||
errout equ *
|
||||
rts
|
||||
*
|
||||
Message asc 'NO PC OR NO DEVICE'
|
||||
dfb $8D,0
|
||||
*********************************************
|
||||
|
||||
*** Set and Reset LoMain Memory Counter ***
|
||||
RESET ldx #$FF ;Lo Byte start One more before $00 (//c ram)
|
||||
clc
|
||||
ldy Y_reg ; 1 time $DF --> Y
|
||||
iny ; Y+ --> $FF
|
||||
sty Y_reg ; Y --> Y_reg Uni=$FF
|
||||
*** Execute ***
|
||||
EXEC inx
|
||||
stx LowMain ; 1 time set LowMain=$00
|
||||
stx X_reg
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw EXE
|
||||
*** Read ***
|
||||
READ jsr Dispatch
|
||||
dfb StatusCmd
|
||||
dw DParms
|
||||
bcs Error
|
||||
*
|
||||
**** Screen Output ****
|
||||
*
|
||||
*** Accumulator ***
|
||||
lda UNIAcc_reg
|
||||
jsr COut ; Out the ASCII value
|
||||
ldx #03 ; Set 3 space
|
||||
jsr PRBL2
|
||||
*** Y Register ***
|
||||
lda UNIY_reg
|
||||
jsr PRbyte
|
||||
*** X Register ***
|
||||
lda UNIX_reg
|
||||
jsr PRbyte
|
||||
ldx #01 ; Set one space
|
||||
jsr PRBL2
|
||||
*** Process Status ***
|
||||
lda UNIP_val
|
||||
jsr PRbyte
|
||||
ldx #05 ; Set five space
|
||||
jsr PRBL2
|
||||
** //c Memory store adress **
|
||||
lda HiMain
|
||||
jsr PRbyte
|
||||
lda LowMain
|
||||
jsr PRbyte
|
||||
jsr CROut
|
||||
**** Store in //c Main Memory ****
|
||||
ldx X_reg
|
||||
lda UNIAcc_reg ;#$FB Test
|
||||
ldy #0
|
||||
sta (LowMain),y
|
||||
cpx UNIL_End
|
||||
bne EXEC
|
||||
UNIL_End dfb $FF ; Lo Byte stop (Unidisk) - $C0 for zero page
|
||||
*** Increment HiMain ***
|
||||
inc HiMain
|
||||
ldy Y_reg
|
||||
cpy UNIH_End
|
||||
bne RESET
|
||||
UNIH_End dfb $FF ; Hi Byte stop (Unidisk) - $00 for zero page
|
||||
*
|
||||
rts
|
||||
|
||||
******************************************************
|
||||
FindPC equ *
|
||||
*
|
||||
* Search slot 7 to slot 1 looking for signature bytes
|
||||
*
|
||||
ldx #7 ;Do for seven slots
|
||||
lda #$C7
|
||||
sta ZPTempH
|
||||
lda #$00
|
||||
sta ZPTempL
|
||||
*
|
||||
newslot equ *
|
||||
ldy #7
|
||||
*
|
||||
again equ *
|
||||
lda (ZPTempL),y
|
||||
cmp sigtab,y ;One for byte signature
|
||||
beq maybe ;Found one signature byte
|
||||
dec ZPTempH
|
||||
dex
|
||||
bne newslot
|
||||
*
|
||||
* if we get here, no PC find
|
||||
sec
|
||||
rts
|
||||
*
|
||||
* if we get here, no byte find on PC
|
||||
maybe equ *
|
||||
dey
|
||||
dey ;if N=1 then all sig bytes OK
|
||||
bpl again
|
||||
* Found PC interface. Set up call address.
|
||||
* we already have high byte ($CN), we need low byte
|
||||
*
|
||||
foundPC equ *
|
||||
lda #$FF
|
||||
sta ZPTempL
|
||||
ldy #0 ;For indirect load
|
||||
lda (ZPTempL),y ;Get the byte
|
||||
*
|
||||
* Now the Acc has the low oreder ProDOS entry point.
|
||||
* The PC entry is three locations past this ...
|
||||
*
|
||||
clc
|
||||
adc #3
|
||||
sta ZPTempL
|
||||
*
|
||||
* Now ZPTempL has PC entry point.
|
||||
* Return with carry clear.
|
||||
*
|
||||
clc
|
||||
rts
|
||||
***********************************************************
|
||||
*
|
||||
* There are the PC signature bytes in their relative order.
|
||||
* The $FF bytes are filler bytes and are not compared.
|
||||
*
|
||||
sigtab dfb $FF,$20,$FF,$00
|
||||
dfb $FF,$03,$FF,$00
|
||||
*
|
||||
Dispatch equ *
|
||||
jmp (ZPTempL) ;Simulate an indirect JSR to PC
|
||||
*
|
||||
*** Status Parameter Set for UNI ***
|
||||
DParms equ *
|
||||
DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
DPUnit dfb 1
|
||||
DPBuffer dw UNI
|
||||
DPStatCode dfb StatusUNI
|
||||
*
|
||||
*
|
||||
*** Status Parameter Set for DIB ***
|
||||
DParmsDIB equ *
|
||||
DPParmsCt2 dfb 3 ;Status calls have three parameters
|
||||
DPUnit2 dfb 1
|
||||
DPBuffer2 dw DIB
|
||||
DPStatCode2 dfb StatusDIB
|
||||
*
|
||||
*
|
||||
*** Status List DIB ***
|
||||
DIB equ *
|
||||
DIBStatByte1 dfb 0
|
||||
DIBDevSize dfb 0,0,0
|
||||
DIBNameLen dfb 0
|
||||
DIBName ds 16,0
|
||||
DIBType dfb 0
|
||||
DIBSubType dfb 0
|
||||
DIBVersion dw 0
|
||||
*
|
||||
*** Status List UNI ***
|
||||
UNI equ *
|
||||
dfb 0
|
||||
UNIError dfb 0
|
||||
UNIRetries dfb 0
|
||||
UNIAcc_reg dfb 0
|
||||
UNIX_reg dfb 0
|
||||
UNIY_reg dfb 0
|
||||
UNIP_val dfb 0
|
||||
HHH dfb 0
|
||||
*
|
||||
*** Set Address ***
|
||||
SET_ADD equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST3
|
||||
dfb SetDWLoad
|
||||
*
|
||||
*** Download ***
|
||||
DOWNLOAD equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST4
|
||||
dfb DWLoad
|
||||
*
|
||||
*** Execute ***
|
||||
EXE equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST2
|
||||
dfb Run
|
||||
*** Eject ***
|
||||
E_JECT equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST1
|
||||
dfb Eject
|
||||
*
|
||||
******** CONTROL LISTS ********
|
||||
*
|
||||
*
|
||||
*** Eject ***
|
||||
CNTL_LIST1 equ *
|
||||
dw $0000
|
||||
*
|
||||
*** Execute ***
|
||||
CNTL_LIST2 equ *
|
||||
Clow_byte dfb $06
|
||||
Chigh_byte dfb $00
|
||||
AccValue dfb $00
|
||||
X_reg dfb $00 ;($80E3) Lo Byte start $00 (Unidisk)
|
||||
Y_reg dfb $DF ;($80E4) Hi Byte One more before start $E0 - $FF-->$00 for zero page (Unidisk)
|
||||
ProStatus dfb $00
|
||||
LowPC_reg dfb $05
|
||||
HighPC_reg dfb $05
|
||||
*
|
||||
*** Set Address ***
|
||||
CNTL_LIST3 equ *
|
||||
CountL_byte dfb $02
|
||||
CountH_byte dfb $00
|
||||
LByte_Addr dfb $05
|
||||
HByte_Addr dfb $05
|
||||
*
|
||||
*** Download ***
|
||||
CNTL_LIST4 equ *
|
||||
LenghtL_byte dfb $0B ;<----- Lenght of Unidisk program Lo Byte
|
||||
LenghtH_byte dfb $00 ;<----- Lenght of Unidisk program Hi Byte
|
||||
*
|
||||
*** Start UNIDISK Program ***
|
||||
** Temporaney save in UNIDISK "Free zero page space" the address point stored in UNIDISK X, Y registers**
|
||||
stx $00C0
|
||||
sty $00C1
|
||||
** Store in UNIDISK Accumulator the value of the UniDISK location that is store in $00C0 plus $00C1
|
||||
ldy #0
|
||||
lda ($00C0),y
|
||||
** Restore the value of Y Unidisk register
|
||||
ldy $00C1
|
||||
rts
|
400
AppleII/Memory dump/Uniprox_Output.txt
Normal file
400
AppleII/Memory dump/Uniprox_Output.txt
Normal file
@ -0,0 +1,400 @@
|
||||
------+-----------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
Line | # File Line | Line Type | MX | Reloc | Size | Address Object Code | Source Code
|
||||
------+-----------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
1 | 1 Uniprox.asm 1 | Comment | 11 | | 0 | 00/8000 | * @com.wudsn.ide.asm.hardware=APPLE2
|
||||
2 | 1 Uniprox.asm 2 | Comment | 11 | | 0 | 00/8000 | * Protocol Converter Call
|
||||
3 | 1 Uniprox.asm 3 | Directive | 11 | | 0 | 00/8000 | XC
|
||||
4 | 1 Uniprox.asm 4 | Equivalence | 11 | | 0 | 00/8000 | ZPTempL equ $0006 ;Temporary zero page storage
|
||||
5 | 1 Uniprox.asm 5 | Equivalence | 11 | | 0 | 00/8000 | ZPTempH equ $0007
|
||||
6 | 1 Uniprox.asm 6 | Comment | 11 | | 0 | 00/8000 | *** Pointers ***
|
||||
7 | 1 Uniprox.asm 7 | Equivalence | 11 | | 0 | 00/8000 | LowMain equ $000A
|
||||
8 | 1 Uniprox.asm 8 | Equivalence | 11 | | 0 | 00/8000 | HiMain equ $000B
|
||||
9 | 1 Uniprox.asm 9 | Comment | 11 | | 0 | 00/8000 | *** Monitor routines ***
|
||||
10 | 1 Uniprox.asm 10 | Equivalence | 11 | | 0 | 00/8000 | COut equ $FDED ;Console output ASCII
|
||||
11 | 1 Uniprox.asm 11 | Equivalence | 11 | | 0 | 00/8000 | COUT1 equ $FDF0 ;Output to screen
|
||||
12 | 1 Uniprox.asm 12 | Equivalence | 11 | | 0 | 00/8000 | CROut equ $FD8E ;Carriage return
|
||||
13 | 1 Uniprox.asm 13 | Equivalence | 11 | | 0 | 00/8000 | PRbyte equ $FDDA ;Print byte in hex
|
||||
14 | 1 Uniprox.asm 14 | Equivalence | 11 | | 0 | 00/8000 | PRBL2 equ $F94A ;Print many spaces
|
||||
15 | 1 Uniprox.asm 15 | Equivalence | 11 | | 0 | 00/8000 | KEYIN equ $FD1B ;Waits for keypress
|
||||
16 | 1 Uniprox.asm 16 | Comment | 11 | | 0 | 00/8000 | ** Command Code **
|
||||
17 | 1 Uniprox.asm 17 | Equivalence | 11 | | 0 | 00/8000 | StatusCmd equ 0
|
||||
18 | 1 Uniprox.asm 18 | Comment | 11 | | 0 | 00/8000 | ** Status Code **
|
||||
19 | 1 Uniprox.asm 19 | Equivalence | 11 | | 0 | 00/8000 | StatusDIB equ 3
|
||||
20 | 1 Uniprox.asm 20 | Equivalence | 11 | | 0 | 00/8000 | StatusUNI equ 5
|
||||
21 | 1 Uniprox.asm 21 | Comment | 11 | | 0 | 00/8000 | *
|
||||
22 | 1 Uniprox.asm 22 | Equivalence | 11 | | 0 | 00/8000 | ControlCmd equ 4
|
||||
23 | 1 Uniprox.asm 23 | Comment | 11 | | 0 | 00/8000 | ** Control Codes **
|
||||
24 | 1 Uniprox.asm 24 | Equivalence | 11 | | 0 | 00/8000 | Eject equ 4
|
||||
25 | 1 Uniprox.asm 25 | Equivalence | 11 | | 0 | 00/8000 | Run equ 5
|
||||
26 | 1 Uniprox.asm 26 | Equivalence | 11 | | 0 | 00/8000 | SetDWLoad equ 6
|
||||
27 | 1 Uniprox.asm 27 | Equivalence | 11 | | 0 | 00/8000 | DWLoad equ 7
|
||||
28 | 1 Uniprox.asm 28 | Comment | 11 | | 0 | 00/8000 | *
|
||||
29 | 1 Uniprox.asm 29 | Directive | 11 | | 0 | 00/8000 | org $8000
|
||||
30 | 1 Uniprox.asm 30 | Comment | 11 | | 0 | 00/8000 | *
|
||||
31 | 1 Uniprox.asm 31 | Comment | 11 | | 0 | 00/8000 | * Presentation message
|
||||
32 | 1 Uniprox.asm 32 | Comment | 11 | | 0 | 00/8000 | *
|
||||
33 | 1 Uniprox.asm 33 | Code | 11 | | 2 | 00/8000 : A2 00 | ldx #0
|
||||
34 | 1 Uniprox.asm 34 | Empty | 11 | | 0 | 00/8002 | ozunid_1
|
||||
35 | 1 Uniprox.asm 34 | Equivalence | 11 | | 0 | 00/8002 | LOOP equ ozunid_1
|
||||
36 | 1 Uniprox.asm 35 | Code | 11 | | 3 | 00/8002 : BD 0D 80 | lda DATA,x
|
||||
37 | 1 Uniprox.asm 36 | Code | 11 | | 2 | 00/8005 : F0 27 | beq START
|
||||
38 | 1 Uniprox.asm 37 | Code | 11 | | 3 | 00/8007 : 20 ED FD | jsr {$FDED}
|
||||
39 | 1 Uniprox.asm 38 | Code | 11 | | 1 | 00/800A : E8 | inx
|
||||
40 | 1 Uniprox.asm 39 | Code | 11 | | 2 | 00/800B : D0 F5 | bne {ozunid_1}
|
||||
41 | 1 Uniprox.asm 40 | Comment | 11 | | 0 | 00/800D | *
|
||||
42 | 1 Uniprox.asm 41 | Data | 11 | | 31 | 00/800D : 55 4E 49 44 | DATA asc 'UNIDISK 3.5 UTILITY BY R. GRECO'
|
||||
| | | | | | 49 53 4B 20 |
|
||||
| | | | | | 33 2E 35 20 |
|
||||
| | | | | | 55 54 49 4C |
|
||||
| | | | | | 49 54 59 20 |
|
||||
| | | | | | 42 59 20 52 |
|
||||
| | | | | | 2E 20 47 52 |
|
||||
| | | | | | 45 43 4F |
|
||||
43 | 1 Uniprox.asm 42 | Data | 11 | | 2 | 00/802C : 8D 00 | dfb $8D,0 ; Inverse mode on
|
||||
44 | 1 Uniprox.asm 43 | Comment | 11 | | 0 | 00/802E | *
|
||||
45 | 1 Uniprox.asm 44 | Comment | 11 | | 0 | 00/802E | * Find a Protocol Converter in one of the slots.
|
||||
46 | 1 Uniprox.asm 45 | Code | 11 | | 3 | 00/802E : 20 24 81 | START jsr {ozunid_7}
|
||||
47 | 1 Uniprox.asm 46 | Code | 11 | | 2 | 00/8031 : B0 61 | bcs {ozunid_4}
|
||||
48 | 1 Uniprox.asm 47 | Empty | 11 | | 0 | 00/8033 |
|
||||
49 | 1 Uniprox.asm 48 | Code | 11 | | 3 | 00/8033 : 20 8E FD | jsr {$FD8E}
|
||||
50 | 1 Uniprox.asm 49 | Code | 11 | | 3 | 00/8036 : 20 8E FD | jsr {$FD8E}
|
||||
51 | 1 Uniprox.asm 50 | Comment | 11 | | 0 | 00/8039 | *
|
||||
52 | 1 Uniprox.asm 51 | Comment | 11 | | 0 | 00/8039 | * Now make the DIB call to the first guy
|
||||
53 | 1 Uniprox.asm 52 | Comment | 11 | | 0 | 00/8039 | *
|
||||
54 | 1 Uniprox.asm 53 | Code | 11 | | 3 | 00/8039 : 20 59 81 | jsr {ozunid_12}
|
||||
55 | 1 Uniprox.asm 54 | Data | 11 | | 1 | 00/803C : 00 | dfb {0}
|
||||
56 | 1 Uniprox.asm 55 | Data | 11 | | 2 | 00/803D : 61 81 | dw {ozunid_14}
|
||||
57 | 1 Uniprox.asm 56 | Code | 11 | | 2 | 00/803F : B0 53 | bcs {ozunid_4}
|
||||
58 | 1 Uniprox.asm 57 | Comment | 11 | | 0 | 00/8041 | *
|
||||
59 | 1 Uniprox.asm 58 | Comment | 11 | | 0 | 00/8041 | * Got the DIB; now print the name string
|
||||
60 | 1 Uniprox.asm 59 | Comment | 11 | | 0 | 00/8041 | *
|
||||
61 | 1 Uniprox.asm 60 | Code | 11 | | 2 | 00/8041 : A2 00 | ldx #0
|
||||
62 | 1 Uniprox.asm 61 | Empty | 11 | | 0 | 00/8043 | ozunid_2
|
||||
63 | 1 Uniprox.asm 61 | Equivalence | 11 | | 0 | 00/8043 | morechars equ ozunid_2
|
||||
64 | 1 Uniprox.asm 62 | Code | 11 | | 3 | 00/8043 : BD 6B 81 | lda DIBName,x
|
||||
65 | 1 Uniprox.asm 63 | Code | 11 | | 2 | 00/8046 : 09 80 | ora #$80 ;COut wants high Bit set
|
||||
66 | 1 Uniprox.asm 64 | Code | 11 | | 3 | 00/8048 : 20 ED FD | jsr {$FDED} ; ASCII
|
||||
67 | 1 Uniprox.asm 65 | Code | 11 | | 1 | 00/804B : E8 | inx
|
||||
68 | 1 Uniprox.asm 66 | Code | 11 | | 3 | 00/804C : EC 6A 81 | cpx DIBNameLen
|
||||
69 | 1 Uniprox.asm 67 | Code | 11 | | 2 | 00/804F : D0 F2 | bne {ozunid_2}
|
||||
70 | 1 Uniprox.asm 68 | Empty | 11 | | 0 | 00/8051 |
|
||||
71 | 1 Uniprox.asm 69 | Code | 11 | | 2 | 00/8051 : A2 02 | ldx #02 ; Set 2 space
|
||||
72 | 1 Uniprox.asm 70 | Code | 11 | | 3 | 00/8053 : 20 4A F9 | jsr {$F94A}
|
||||
73 | 1 Uniprox.asm 71 | Comment | 11 | | 0 | 00/8056 | ** Type **
|
||||
74 | 1 Uniprox.asm 72 | Code | 11 | | 3 | 00/8056 : AD 7B 81 | lda DIBType
|
||||
75 | 1 Uniprox.asm 73 | Code | 11 | | 3 | 00/8059 : 20 DA FD | jsr {$FDDA} ; HEX form
|
||||
76 | 1 Uniprox.asm 74 | Empty | 11 | | 0 | 00/805C |
|
||||
77 | 1 Uniprox.asm 75 | Code | 11 | | 2 | 00/805C : A2 02 | ldx #02 ; Set 2 space
|
||||
78 | 1 Uniprox.asm 76 | Code | 11 | | 3 | 00/805E : 20 4A F9 | jsr {$F94A}
|
||||
79 | 1 Uniprox.asm 77 | Comment | 11 | | 0 | 00/8061 | ** Firmware version
|
||||
80 | 1 Uniprox.asm 78 | Code | 11 | | 2 | 00/8061 : A2 00 | ldx #0
|
||||
81 | 1 Uniprox.asm 79 | Empty | 11 | | 0 | 00/8063 | ozunid_3
|
||||
82 | 1 Uniprox.asm 79 | Equivalence | 11 | | 0 | 00/8063 | morechars2 equ ozunid_3
|
||||
83 | 1 Uniprox.asm 80 | Code | 11 | | 3 | 00/8063 : BD 7D 81 | lda DIBVersion,x
|
||||
84 | 1 Uniprox.asm 81 | Code | 11 | | 3 | 00/8066 : 20 DA FD | jsr {$FDDA} ; HEX form
|
||||
85 | 1 Uniprox.asm 82 | Code | 11 | | 1 | 00/8069 : E8 | inx
|
||||
86 | 1 Uniprox.asm 83 | Code | 11 | | 2 | 00/806A : E0 02 | cpx #$02 ; 2 Byte
|
||||
87 | 1 Uniprox.asm 84 | Code | 11 | | 2 | 00/806C : D0 F5 | bne {ozunid_3}
|
||||
88 | 1 Uniprox.asm 85 | Code | 11 | | 3 | 00/806E : 20 ED FD | jsr {$FDED}
|
||||
89 | 1 Uniprox.asm 86 | Empty | 11 | | 0 | 00/8071 |
|
||||
90 | 1 Uniprox.asm 87 | Code | 11 | | 3 | 00/8071 : 20 8E FD | jsr {$FD8E}
|
||||
91 | 1 Uniprox.asm 88 | Code | 11 | | 3 | 00/8074 : 20 8E FD | jsr {$FD8E}
|
||||
92 | 1 Uniprox.asm 89 | Comment | 11 | | 0 | 00/8077 | ** Wait keypress to continue **
|
||||
93 | 1 Uniprox.asm 90 | Comment | 11 | | 0 | 00/8077 | *
|
||||
94 | 1 Uniprox.asm 91 | Code | 11 | | 3 | 00/8077 : 20 1B FD | jsr {$FD1B}
|
||||
95 | 1 Uniprox.asm 92 | Comment | 11 | | 0 | 00/807A | *
|
||||
96 | 1 Uniprox.asm 93 | Comment | 11 | | 0 | 00/807A | *** Eject ***
|
||||
97 | 1 Uniprox.asm 94 | Code | 11 | | 3 | 00/807A : 20 59 81 | jsr {ozunid_12}
|
||||
98 | 1 Uniprox.asm 95 | Data | 11 | | 1 | 00/807D : 04 | dfb {4}
|
||||
99 | 1 Uniprox.asm 96 | Data | 11 | | 2 | 00/807E : 96 81 | dw {ozunid_20}
|
||||
100 | 1 Uniprox.asm 97 | Comment | 11 | | 0 | 00/8080 | *** Set start HiMain Memory Pointers ***
|
||||
101 | 1 Uniprox.asm 98 | Code | 11 | | 2 | 00/8080 : A9 20 | lda #$20 ; Hi Byte start (//c ram)
|
||||
102 | 1 Uniprox.asm 99 | Code | 11 | | 2 | 00/8082 : 85 0B | sta {$000B} ; HiMain=$20 set
|
||||
103 | 1 Uniprox.asm 100 | Comment | 11 | | 0 | 00/8084 | *** Set Address ***
|
||||
104 | 1 Uniprox.asm 101 | Code | 11 | | 3 | 00/8084 : 20 59 81 | jsr {ozunid_12}
|
||||
105 | 1 Uniprox.asm 102 | Data | 11 | | 1 | 00/8087 : 04 | dfb {4}
|
||||
106 | 1 Uniprox.asm 103 | Data | 11 | | 2 | 00/8088 : 87 81 | dw {ozunid_17}
|
||||
107 | 1 Uniprox.asm 104 | Comment | 11 | | 0 | 00/808A | *** Download ***
|
||||
108 | 1 Uniprox.asm 105 | Code | 11 | | 3 | 00/808A : 20 59 81 | jsr {ozunid_12}
|
||||
109 | 1 Uniprox.asm 106 | Data | 11 | | 1 | 00/808D : 04 | dfb {4}
|
||||
110 | 1 Uniprox.asm 107 | Data | 11 | | 2 | 00/808E : 8C 81 | dw {ozunid_18}
|
||||
111 | 1 Uniprox.asm 108 | Empty | 11 | | 0 | 00/8090 |
|
||||
112 | 1 Uniprox.asm 109 | Code | 11 | | 3 | 00/8090 : 20 B6 80 | jsr RESET ; Jump the Error routine
|
||||
113 | 1 Uniprox.asm 110 | Code | 11 | | 1 | 00/8093 : 60 | rts
|
||||
114 | 1 Uniprox.asm 111 | Comment | 11 | | 0 | 00/8094 | *********************************************
|
||||
115 | 1 Uniprox.asm 112 | Empty | 11 | | 0 | 00/8094 | ozunid_4
|
||||
116 | 1 Uniprox.asm 112 | Equivalence | 11 | | 0 | 00/8094 | Error equ ozunid_4
|
||||
117 | 1 Uniprox.asm 113 | Comment | 11 | | 0 | 00/8094 | *
|
||||
118 | 1 Uniprox.asm 114 | Comment | 11 | | 0 | 00/8094 | * There's either no PC around, or there was no give message
|
||||
119 | 1 Uniprox.asm 115 | Comment | 11 | | 0 | 00/8094 | *
|
||||
120 | 1 Uniprox.asm 116 | Code | 11 | | 2 | 00/8094 : A2 00 | ldx #0
|
||||
121 | 1 Uniprox.asm 117 | Empty | 11 | | 0 | 00/8096 | ozunid_5
|
||||
122 | 1 Uniprox.asm 117 | Equivalence | 11 | | 0 | 00/8096 | err1 equ ozunid_5
|
||||
123 | 1 Uniprox.asm 118 | Code | 11 | | 3 | 00/8096 : BD A2 80 | lda Message,x
|
||||
124 | 1 Uniprox.asm 119 | Code | 11 | | 2 | 00/8099 : F0 06 | beq {ozunid_6}
|
||||
125 | 1 Uniprox.asm 120 | Code | 11 | | 3 | 00/809B : 20 ED FD | jsr {$FDED}
|
||||
126 | 1 Uniprox.asm 121 | Code | 11 | | 1 | 00/809E : E8 | inx
|
||||
127 | 1 Uniprox.asm 122 | Code | 11 | | 2 | 00/809F : D0 F5 | bne {ozunid_5}
|
||||
128 | 1 Uniprox.asm 123 | Comment | 11 | | 0 | 00/80A1 | *
|
||||
129 | 1 Uniprox.asm 124 | Empty | 11 | | 0 | 00/80A1 | ozunid_6
|
||||
130 | 1 Uniprox.asm 124 | Equivalence | 11 | | 0 | 00/80A1 | errout equ ozunid_6
|
||||
131 | 1 Uniprox.asm 125 | Code | 11 | | 1 | 00/80A1 : 60 | rts
|
||||
132 | 1 Uniprox.asm 126 | Comment | 11 | | 0 | 00/80A2 | *
|
||||
133 | 1 Uniprox.asm 127 | Data | 11 | | 18 | 00/80A2 : 4E 4F 20 50 | Message asc 'NO PC OR NO DEVICE'
|
||||
| | | | | | 43 20 4F 52 |
|
||||
| | | | | | 20 4E 4F 20 |
|
||||
| | | | | | 44 45 56 49 |
|
||||
| | | | | | 43 45 |
|
||||
134 | 1 Uniprox.asm 128 | Data | 11 | | 2 | 00/80B4 : 8D 00 | dfb $8D,0
|
||||
135 | 1 Uniprox.asm 129 | Comment | 11 | | 0 | 00/80B6 | *********************************************
|
||||
136 | 1 Uniprox.asm 130 | Empty | 11 | | 0 | 00/80B6 |
|
||||
137 | 1 Uniprox.asm 131 | Comment | 11 | | 0 | 00/80B6 | *** Set and Reset LoMain Memory Counter ***
|
||||
138 | 1 Uniprox.asm 132 | Code | 11 | | 2 | 00/80B6 : A2 FF | RESET ldx #$FF ;Lo Byte start One more before $00 (//c ram)
|
||||
139 | 1 Uniprox.asm 133 | Code | 11 | | 1 | 00/80B8 : 18 | clc
|
||||
140 | 1 Uniprox.asm 134 | Code | 11 | | 3 | 00/80B9 : AC A1 81 | ldy Y_reg ; 1 time $DF --> Y
|
||||
141 | 1 Uniprox.asm 135 | Code | 11 | | 1 | 00/80BC : C8 | iny ; Y+ --> $FF
|
||||
142 | 1 Uniprox.asm 136 | Code | 11 | | 3 | 00/80BD : 8C A1 81 | sty Y_reg ; Y --> Y_reg Uni=$FF
|
||||
143 | 1 Uniprox.asm 137 | Comment | 11 | | 0 | 00/80C0 | *** Execute ***
|
||||
144 | 1 Uniprox.asm 138 | Code | 11 | | 1 | 00/80C0 : E8 | EXEC inx
|
||||
145 | 1 Uniprox.asm 139 | Code | 11 | | 2 | 00/80C1 : 86 0A | stx {$000A} ; 1 time set LowMain=$00
|
||||
146 | 1 Uniprox.asm 140 | Code | 11 | | 3 | 00/80C3 : 8E A0 81 | stx X_reg
|
||||
147 | 1 Uniprox.asm 141 | Code | 11 | | 3 | 00/80C6 : 20 59 81 | jsr {ozunid_12}
|
||||
148 | 1 Uniprox.asm 142 | Data | 11 | | 1 | 00/80C9 : 04 | dfb {4}
|
||||
149 | 1 Uniprox.asm 143 | Data | 11 | | 2 | 00/80CA : 91 81 | dw {ozunid_19}
|
||||
150 | 1 Uniprox.asm 144 | Code | 11 | | 3 | 00/80CC : 20 59 81 | READ jsr {ozunid_12}
|
||||
151 | 1 Uniprox.asm 145 | Data | 11 | | 1 | 00/80CF : 00 | dfb {0}
|
||||
152 | 1 Uniprox.asm 146 | Data | 11 | | 2 | 00/80D0 : 5C 81 | dw {ozunid_13}
|
||||
153 | 1 Uniprox.asm 147 | Code | 11 | | 2 | 00/80D2 : B0 C0 | bcs {ozunid_4}
|
||||
154 | 1 Uniprox.asm 148 | Comment | 11 | | 0 | 00/80D4 | *
|
||||
155 | 1 Uniprox.asm 149 | Comment | 11 | | 0 | 00/80D4 | **** Screen Output ****
|
||||
156 | 1 Uniprox.asm 150 | Comment | 11 | | 0 | 00/80D4 | *
|
||||
157 | 1 Uniprox.asm 151 | Comment | 11 | | 0 | 00/80D4 | *** Accumulator ***
|
||||
158 | 1 Uniprox.asm 152 | Code | 11 | | 3 | 00/80D4 : AD 82 81 | lda UNIAcc_reg
|
||||
159 | 1 Uniprox.asm 153 | Code | 11 | | 3 | 00/80D7 : 20 ED FD | jsr {$FDED} ; Out the ASCII value
|
||||
160 | 1 Uniprox.asm 154 | Code | 11 | | 2 | 00/80DA : A2 03 | ldx #03 ; Set 3 space
|
||||
161 | 1 Uniprox.asm 155 | Code | 11 | | 3 | 00/80DC : 20 4A F9 | jsr {$F94A}
|
||||
162 | 1 Uniprox.asm 156 | Comment | 11 | | 0 | 00/80DF | *** Y Register ***
|
||||
163 | 1 Uniprox.asm 157 | Code | 11 | | 3 | 00/80DF : AD 84 81 | lda UNIY_reg
|
||||
164 | 1 Uniprox.asm 158 | Code | 11 | | 3 | 00/80E2 : 20 DA FD | jsr {$FDDA}
|
||||
165 | 1 Uniprox.asm 159 | Comment | 11 | | 0 | 00/80E5 | *** X Register ***
|
||||
166 | 1 Uniprox.asm 160 | Code | 11 | | 3 | 00/80E5 : AD 83 81 | lda UNIX_reg
|
||||
167 | 1 Uniprox.asm 161 | Code | 11 | | 3 | 00/80E8 : 20 DA FD | jsr {$FDDA}
|
||||
168 | 1 Uniprox.asm 162 | Code | 11 | | 2 | 00/80EB : A2 01 | ldx #01 ; Set one space
|
||||
169 | 1 Uniprox.asm 163 | Code | 11 | | 3 | 00/80ED : 20 4A F9 | jsr {$F94A}
|
||||
170 | 1 Uniprox.asm 164 | Comment | 11 | | 0 | 00/80F0 | *** Process Status ***
|
||||
171 | 1 Uniprox.asm 165 | Code | 11 | | 3 | 00/80F0 : AD 85 81 | lda UNIP_val
|
||||
172 | 1 Uniprox.asm 166 | Code | 11 | | 3 | 00/80F3 : 20 DA FD | jsr {$FDDA}
|
||||
173 | 1 Uniprox.asm 167 | Code | 11 | | 2 | 00/80F6 : A2 05 | ldx #05 ; Set five space
|
||||
174 | 1 Uniprox.asm 168 | Code | 11 | | 3 | 00/80F8 : 20 4A F9 | jsr {$F94A}
|
||||
175 | 1 Uniprox.asm 169 | Comment | 11 | | 0 | 00/80FB | ** //c Memory store adress **
|
||||
176 | 1 Uniprox.asm 170 | Code | 11 | | 2 | 00/80FB : A5 0B | lda {$000B}
|
||||
177 | 1 Uniprox.asm 171 | Code | 11 | | 3 | 00/80FD : 20 DA FD | jsr {$FDDA}
|
||||
178 | 1 Uniprox.asm 172 | Code | 11 | | 2 | 00/8100 : A5 0A | lda {$000A}
|
||||
179 | 1 Uniprox.asm 173 | Code | 11 | | 3 | 00/8102 : 20 DA FD | jsr {$FDDA}
|
||||
180 | 1 Uniprox.asm 174 | Code | 11 | | 3 | 00/8105 : 20 8E FD | jsr {$FD8E}
|
||||
181 | 1 Uniprox.asm 175 | Comment | 11 | | 0 | 00/8108 | **** Store in //c Main Memory ****
|
||||
182 | 1 Uniprox.asm 176 | Code | 11 | | 3 | 00/8108 : AE A0 81 | ldx X_reg
|
||||
183 | 1 Uniprox.asm 177 | Code | 11 | | 3 | 00/810B : AD 82 81 | lda UNIAcc_reg ;#$FB Test
|
||||
184 | 1 Uniprox.asm 178 | Code | 11 | | 2 | 00/810E : A0 00 | ldy #0
|
||||
185 | 1 Uniprox.asm 179 | Code | 11 | | 2 | 00/8110 : 91 0A | sta ({$000A}),y
|
||||
186 | 1 Uniprox.asm 180 | Code | 11 | | 3 | 00/8112 : EC 17 81 | cpx UNIL_End
|
||||
187 | 1 Uniprox.asm 181 | Code | 11 | | 2 | 00/8115 : D0 A9 | bne EXEC
|
||||
188 | 1 Uniprox.asm 182 | Data | 11 | | 1 | 00/8117 : FF | UNIL_End dfb $FF ; Lo Byte stop (Unidisk) - $C0 for zero page
|
||||
189 | 1 Uniprox.asm 183 | Comment | 11 | | 0 | 00/8118 | *** Increment HiMain ***
|
||||
190 | 1 Uniprox.asm 184 | Code | 11 | | 2 | 00/8118 : E6 0B | inc {$000B}
|
||||
191 | 1 Uniprox.asm 185 | Code | 11 | | 3 | 00/811A : AC A1 81 | ldy Y_reg
|
||||
192 | 1 Uniprox.asm 186 | Code | 11 | | 3 | 00/811D : CC 22 81 | cpy UNIH_End
|
||||
193 | 1 Uniprox.asm 187 | Code | 11 | | 2 | 00/8120 : D0 94 | bne RESET
|
||||
194 | 1 Uniprox.asm 188 | Data | 11 | | 1 | 00/8122 : FF | UNIH_End dfb $FF ; Hi Byte stop (Unidisk) - $00 for zero page
|
||||
195 | 1 Uniprox.asm 189 | Comment | 11 | | 0 | 00/8123 | *
|
||||
196 | 1 Uniprox.asm 190 | Code | 11 | | 1 | 00/8123 : 60 | rts
|
||||
197 | 1 Uniprox.asm 191 | Empty | 11 | | 0 | 00/8124 |
|
||||
198 | 1 Uniprox.asm 192 | Comment | 11 | | 0 | 00/8124 | ******************************************************
|
||||
199 | 1 Uniprox.asm 193 | Empty | 11 | | 0 | 00/8124 | ozunid_7
|
||||
200 | 1 Uniprox.asm 193 | Equivalence | 11 | | 0 | 00/8124 | FindPC equ ozunid_7
|
||||
201 | 1 Uniprox.asm 194 | Comment | 11 | | 0 | 00/8124 | *
|
||||
202 | 1 Uniprox.asm 195 | Comment | 11 | | 0 | 00/8124 | * Search slot 7 to slot 1 looking for signature bytes
|
||||
203 | 1 Uniprox.asm 196 | Comment | 11 | | 0 | 00/8124 | *
|
||||
204 | 1 Uniprox.asm 197 | Code | 11 | | 2 | 00/8124 : A2 07 | ldx #7 ;Do for seven slots
|
||||
205 | 1 Uniprox.asm 198 | Code | 11 | | 2 | 00/8126 : A9 C7 | lda #$C7
|
||||
206 | 1 Uniprox.asm 199 | Code | 11 | | 2 | 00/8128 : 85 07 | sta {$0007}
|
||||
207 | 1 Uniprox.asm 200 | Code | 11 | | 2 | 00/812A : A9 00 | lda #$00
|
||||
208 | 1 Uniprox.asm 201 | Code | 11 | | 2 | 00/812C : 85 06 | sta {$0006}
|
||||
209 | 1 Uniprox.asm 202 | Comment | 11 | | 0 | 00/812E | *
|
||||
210 | 1 Uniprox.asm 203 | Empty | 11 | | 0 | 00/812E | ozunid_8
|
||||
211 | 1 Uniprox.asm 203 | Equivalence | 11 | | 0 | 00/812E | newslot equ ozunid_8
|
||||
212 | 1 Uniprox.asm 204 | Code | 11 | | 2 | 00/812E : A0 07 | ldy #7
|
||||
213 | 1 Uniprox.asm 205 | Comment | 11 | | 0 | 00/8130 | *
|
||||
214 | 1 Uniprox.asm 206 | Empty | 11 | | 0 | 00/8130 | ozunid_9
|
||||
215 | 1 Uniprox.asm 206 | Equivalence | 11 | | 0 | 00/8130 | again equ ozunid_9
|
||||
216 | 1 Uniprox.asm 207 | Code | 11 | | 2 | 00/8130 : B1 06 | lda ({$0006}),y
|
||||
217 | 1 Uniprox.asm 208 | Code | 11 | | 3 | 00/8132 : D9 51 81 | cmp sigtab,y ;One for byte signature
|
||||
218 | 1 Uniprox.asm 209 | Code | 11 | | 2 | 00/8135 : F0 07 | beq {ozunid_10} ;Found one signature byte
|
||||
219 | 1 Uniprox.asm 210 | Code | 11 | | 2 | 00/8137 : C6 07 | dec {$0007}
|
||||
220 | 1 Uniprox.asm 211 | Code | 11 | | 1 | 00/8139 : CA | dex
|
||||
221 | 1 Uniprox.asm 212 | Code | 11 | | 2 | 00/813A : D0 F2 | bne {ozunid_8}
|
||||
222 | 1 Uniprox.asm 213 | Comment | 11 | | 0 | 00/813C | *
|
||||
223 | 1 Uniprox.asm 214 | Comment | 11 | | 0 | 00/813C | * if we get here, no PC find
|
||||
224 | 1 Uniprox.asm 215 | Code | 11 | | 1 | 00/813C : 38 | sec
|
||||
225 | 1 Uniprox.asm 216 | Code | 11 | | 1 | 00/813D : 60 | rts
|
||||
226 | 1 Uniprox.asm 217 | Comment | 11 | | 0 | 00/813E | *
|
||||
227 | 1 Uniprox.asm 218 | Comment | 11 | | 0 | 00/813E | * if we get here, no byte find on PC
|
||||
228 | 1 Uniprox.asm 219 | Empty | 11 | | 0 | 00/813E | ozunid_10
|
||||
229 | 1 Uniprox.asm 219 | Equivalence | 11 | | 0 | 00/813E | maybe equ ozunid_10
|
||||
230 | 1 Uniprox.asm 220 | Code | 11 | | 1 | 00/813E : 88 | dey
|
||||
231 | 1 Uniprox.asm 221 | Code | 11 | | 1 | 00/813F : 88 | dey ;if N=1 then all sig bytes OK
|
||||
232 | 1 Uniprox.asm 222 | Code | 11 | | 2 | 00/8140 : 10 EE | bpl {ozunid_9}
|
||||
233 | 1 Uniprox.asm 223 | Comment | 11 | | 0 | 00/8142 | * Found PC interface. Set up call address.
|
||||
234 | 1 Uniprox.asm 224 | Comment | 11 | | 0 | 00/8142 | * we already have high byte ($CN), we need low byte
|
||||
235 | 1 Uniprox.asm 225 | Comment | 11 | | 0 | 00/8142 | *
|
||||
236 | 1 Uniprox.asm 226 | Empty | 11 | | 0 | 00/8142 | ozunid_11
|
||||
237 | 1 Uniprox.asm 226 | Equivalence | 11 | | 0 | 00/8142 | foundPC equ ozunid_11
|
||||
238 | 1 Uniprox.asm 227 | Code | 11 | | 2 | 00/8142 : A9 FF | lda #$FF
|
||||
239 | 1 Uniprox.asm 228 | Code | 11 | | 2 | 00/8144 : 85 06 | sta {$0006}
|
||||
240 | 1 Uniprox.asm 229 | Code | 11 | | 2 | 00/8146 : A0 00 | ldy #0 ;For indirect load
|
||||
241 | 1 Uniprox.asm 230 | Code | 11 | | 2 | 00/8148 : B1 06 | lda ({$0006}),y ;Get the byte
|
||||
242 | 1 Uniprox.asm 231 | Comment | 11 | | 0 | 00/814A | *
|
||||
243 | 1 Uniprox.asm 232 | Comment | 11 | | 0 | 00/814A | * Now the Acc has the low oreder ProDOS entry point.
|
||||
244 | 1 Uniprox.asm 233 | Comment | 11 | | 0 | 00/814A | * The PC entry is three locations past this ...
|
||||
245 | 1 Uniprox.asm 234 | Comment | 11 | | 0 | 00/814A | *
|
||||
246 | 1 Uniprox.asm 235 | Code | 11 | | 1 | 00/814A : 18 | clc
|
||||
247 | 1 Uniprox.asm 236 | Code | 11 | | 2 | 00/814B : 69 03 | adc #3
|
||||
248 | 1 Uniprox.asm 237 | Code | 11 | | 2 | 00/814D : 85 06 | sta {$0006}
|
||||
249 | 1 Uniprox.asm 238 | Comment | 11 | | 0 | 00/814F | *
|
||||
250 | 1 Uniprox.asm 239 | Comment | 11 | | 0 | 00/814F | * Now ZPTempL has PC entry point.
|
||||
251 | 1 Uniprox.asm 240 | Comment | 11 | | 0 | 00/814F | * Return with carry clear.
|
||||
252 | 1 Uniprox.asm 241 | Comment | 11 | | 0 | 00/814F | *
|
||||
253 | 1 Uniprox.asm 242 | Code | 11 | | 1 | 00/814F : 18 | clc
|
||||
254 | 1 Uniprox.asm 243 | Code | 11 | | 1 | 00/8150 : 60 | rts
|
||||
255 | 1 Uniprox.asm 244 | Comment | 11 | | 0 | 00/8151 | ***********************************************************
|
||||
256 | 1 Uniprox.asm 245 | Comment | 11 | | 0 | 00/8151 | *
|
||||
257 | 1 Uniprox.asm 246 | Comment | 11 | | 0 | 00/8151 | * There are the PC signature bytes in their relative order.
|
||||
258 | 1 Uniprox.asm 247 | Comment | 11 | | 0 | 00/8151 | * The $FF bytes are filler bytes and are not compared.
|
||||
259 | 1 Uniprox.asm 248 | Comment | 11 | | 0 | 00/8151 | *
|
||||
260 | 1 Uniprox.asm 249 | Data | 11 | | 4 | 00/8151 : FF 20 FF 00 | sigtab dfb $FF,$20,$FF,$00
|
||||
261 | 1 Uniprox.asm 250 | Data | 11 | | 4 | 00/8155 : FF 03 FF 00 | dfb $FF,$03,$FF,$00
|
||||
262 | 1 Uniprox.asm 251 | Comment | 11 | | 0 | 00/8159 | *
|
||||
263 | 1 Uniprox.asm 252 | Empty | 11 | | 0 | 00/8159 | ozunid_12
|
||||
264 | 1 Uniprox.asm 252 | Equivalence | 11 | | 0 | 00/8159 | Dispatch equ ozunid_12
|
||||
265 | 1 Uniprox.asm 253 | Code | 11 | | 3 | 00/8159 : 6C 06 00 | jmp ({$0006}) ;Simulate an indirect JSR to PC
|
||||
266 | 1 Uniprox.asm 254 | Comment | 11 | | 0 | 00/815C | *
|
||||
267 | 1 Uniprox.asm 255 | Comment | 11 | | 0 | 00/815C | *** Status Parameter Set for UNI ***
|
||||
268 | 1 Uniprox.asm 256 | Empty | 11 | | 0 | 00/815C | ozunid_13
|
||||
269 | 1 Uniprox.asm 256 | Equivalence | 11 | | 0 | 00/815C | DParms equ ozunid_13
|
||||
270 | 1 Uniprox.asm 257 | Data | 11 | | 1 | 00/815C : 03 | DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
271 | 1 Uniprox.asm 258 | Data | 11 | | 1 | 00/815D : 01 | DPUnit dfb 1
|
||||
272 | 1 Uniprox.asm 259 | Data | 11 | | 2 | 00/815E : 7F 81 | DPBuffer dw {ozunid_16}
|
||||
273 | 1 Uniprox.asm 260 | Data | 11 | | 1 | 00/8160 : 05 | DPStatCode dfb {5}
|
||||
274 | 1 Uniprox.asm 261 | Comment | 11 | | 0 | 00/8161 | *
|
||||
275 | 1 Uniprox.asm 262 | Comment | 11 | | 0 | 00/8161 | *
|
||||
276 | 1 Uniprox.asm 263 | Comment | 11 | | 0 | 00/8161 | *** Status Parameter Set for DIB ***
|
||||
277 | 1 Uniprox.asm 264 | Empty | 11 | | 0 | 00/8161 | ozunid_14
|
||||
278 | 1 Uniprox.asm 264 | Equivalence | 11 | | 0 | 00/8161 | DParmsDIB equ ozunid_14
|
||||
279 | 1 Uniprox.asm 265 | Data | 11 | | 1 | 00/8161 : 03 | DPParmsCt2 dfb 3 ;Status calls have three parameters
|
||||
280 | 1 Uniprox.asm 266 | Data | 11 | | 1 | 00/8162 : 01 | DPUnit2 dfb 1
|
||||
281 | 1 Uniprox.asm 267 | Data | 11 | | 2 | 00/8163 : 66 81 | DPBuffer2 dw {ozunid_15}
|
||||
282 | 1 Uniprox.asm 268 | Data | 11 | | 1 | 00/8165 : 03 | DPStatCode2 dfb {3}
|
||||
283 | 1 Uniprox.asm 269 | Comment | 11 | | 0 | 00/8166 | *
|
||||
284 | 1 Uniprox.asm 270 | Comment | 11 | | 0 | 00/8166 | *
|
||||
285 | 1 Uniprox.asm 271 | Comment | 11 | | 0 | 00/8166 | *** Status List DIB ***
|
||||
286 | 1 Uniprox.asm 272 | Empty | 11 | | 0 | 00/8166 | ozunid_15
|
||||
287 | 1 Uniprox.asm 272 | Equivalence | 11 | | 0 | 00/8166 | DIB equ ozunid_15
|
||||
288 | 1 Uniprox.asm 273 | Data | 11 | | 1 | 00/8166 : 00 | DIBStatByte1 dfb 0
|
||||
289 | 1 Uniprox.asm 274 | Data | 11 | | 3 | 00/8167 : 00 00 00 | DIBDevSize dfb 0,0,0
|
||||
290 | 1 Uniprox.asm 275 | Data | 11 | | 1 | 00/816A : 00 | DIBNameLen dfb 0
|
||||
291 | 1 Uniprox.asm 276 | Data | 11 | | 16 | 00/816B : 00 00 00 00 | DIBName ds 16,0
|
||||
| | | | | | 00 00 00 00 |
|
||||
| | | | | | 00 00 00 00 |
|
||||
| | | | | | 00 00 00 00 |
|
||||
292 | 1 Uniprox.asm 277 | Data | 11 | | 1 | 00/817B : 00 | DIBType dfb 0
|
||||
293 | 1 Uniprox.asm 278 | Data | 11 | | 1 | 00/817C : 00 | DIBSubType dfb 0
|
||||
294 | 1 Uniprox.asm 279 | Data | 11 | | 2 | 00/817D : 00 00 | DIBVersion dw 0
|
||||
295 | 1 Uniprox.asm 280 | Comment | 11 | | 0 | 00/817F | *
|
||||
296 | 1 Uniprox.asm 281 | Comment | 11 | | 0 | 00/817F | *** Status List UNI ***
|
||||
297 | 1 Uniprox.asm 282 | Empty | 11 | | 0 | 00/817F | ozunid_16
|
||||
298 | 1 Uniprox.asm 282 | Equivalence | 11 | | 0 | 00/817F | UNI equ ozunid_16
|
||||
299 | 1 Uniprox.asm 283 | Data | 11 | | 1 | 00/817F : 00 | dfb 0
|
||||
300 | 1 Uniprox.asm 284 | Data | 11 | | 1 | 00/8180 : 00 | UNIError dfb 0
|
||||
301 | 1 Uniprox.asm 285 | Data | 11 | | 1 | 00/8181 : 00 | UNIRetries dfb 0
|
||||
302 | 1 Uniprox.asm 286 | Data | 11 | | 1 | 00/8182 : 00 | UNIAcc_reg dfb 0
|
||||
303 | 1 Uniprox.asm 287 | Data | 11 | | 1 | 00/8183 : 00 | UNIX_reg dfb 0
|
||||
304 | 1 Uniprox.asm 288 | Data | 11 | | 1 | 00/8184 : 00 | UNIY_reg dfb 0
|
||||
305 | 1 Uniprox.asm 289 | Data | 11 | | 1 | 00/8185 : 00 | UNIP_val dfb 0
|
||||
306 | 1 Uniprox.asm 290 | Data | 11 | | 1 | 00/8186 : 00 | HHH dfb 0
|
||||
307 | 1 Uniprox.asm 291 | Comment | 11 | | 0 | 00/8187 | *
|
||||
308 | 1 Uniprox.asm 292 | Comment | 11 | | 0 | 00/8187 | *** Set Address ***
|
||||
309 | 1 Uniprox.asm 293 | Empty | 11 | | 0 | 00/8187 | ozunid_17
|
||||
310 | 1 Uniprox.asm 293 | Equivalence | 11 | | 0 | 00/8187 | SET_ADD equ ozunid_17
|
||||
311 | 1 Uniprox.asm 294 | Data | 11 | | 1 | 00/8187 : 03 | dfb 3
|
||||
312 | 1 Uniprox.asm 295 | Data | 11 | | 1 | 00/8188 : 01 | dfb 1
|
||||
313 | 1 Uniprox.asm 296 | Data | 11 | | 2 | 00/8189 : A5 81 | dw {ozunid_23}
|
||||
314 | 1 Uniprox.asm 297 | Data | 11 | | 1 | 00/818B : 06 | dfb {6}
|
||||
315 | 1 Uniprox.asm 298 | Comment | 11 | | 0 | 00/818C | *
|
||||
316 | 1 Uniprox.asm 299 | Comment | 11 | | 0 | 00/818C | *** Download ***
|
||||
317 | 1 Uniprox.asm 300 | Empty | 11 | | 0 | 00/818C | ozunid_18
|
||||
318 | 1 Uniprox.asm 300 | Equivalence | 11 | | 0 | 00/818C | DOWNLOAD equ ozunid_18
|
||||
319 | 1 Uniprox.asm 301 | Data | 11 | | 1 | 00/818C : 03 | dfb 3
|
||||
320 | 1 Uniprox.asm 302 | Data | 11 | | 1 | 00/818D : 01 | dfb 1
|
||||
321 | 1 Uniprox.asm 303 | Data | 11 | | 2 | 00/818E : A9 81 | dw {ozunid_24}
|
||||
322 | 1 Uniprox.asm 304 | Data | 11 | | 1 | 00/8190 : 07 | dfb {7}
|
||||
323 | 1 Uniprox.asm 305 | Comment | 11 | | 0 | 00/8191 | *
|
||||
324 | 1 Uniprox.asm 306 | Comment | 11 | | 0 | 00/8191 | *** Execute ***
|
||||
325 | 1 Uniprox.asm 307 | Empty | 11 | | 0 | 00/8191 | ozunid_19
|
||||
326 | 1 Uniprox.asm 307 | Equivalence | 11 | | 0 | 00/8191 | EXE equ ozunid_19
|
||||
327 | 1 Uniprox.asm 308 | Data | 11 | | 1 | 00/8191 : 03 | dfb 3
|
||||
328 | 1 Uniprox.asm 309 | Data | 11 | | 1 | 00/8192 : 01 | dfb 1
|
||||
329 | 1 Uniprox.asm 310 | Data | 11 | | 2 | 00/8193 : 9D 81 | dw {ozunid_22}
|
||||
330 | 1 Uniprox.asm 311 | Data | 11 | | 1 | 00/8195 : 05 | dfb {5}
|
||||
331 | 1 Uniprox.asm 312 | Comment | 11 | | 0 | 00/8196 | *** Eject ***
|
||||
332 | 1 Uniprox.asm 313 | Empty | 11 | | 0 | 00/8196 | ozunid_20
|
||||
333 | 1 Uniprox.asm 313 | Equivalence | 11 | | 0 | 00/8196 | E_JECT equ ozunid_20
|
||||
334 | 1 Uniprox.asm 314 | Data | 11 | | 1 | 00/8196 : 03 | dfb 3
|
||||
335 | 1 Uniprox.asm 315 | Data | 11 | | 1 | 00/8197 : 01 | dfb 1
|
||||
336 | 1 Uniprox.asm 316 | Data | 11 | | 2 | 00/8198 : 9B 81 | dw {ozunid_21}
|
||||
337 | 1 Uniprox.asm 317 | Data | 11 | | 1 | 00/819A : 04 | dfb {4}
|
||||
338 | 1 Uniprox.asm 318 | Comment | 11 | | 0 | 00/819B | *
|
||||
339 | 1 Uniprox.asm 319 | Comment | 11 | | 0 | 00/819B | ******** CONTROL LISTS ********
|
||||
340 | 1 Uniprox.asm 320 | Comment | 11 | | 0 | 00/819B | *
|
||||
341 | 1 Uniprox.asm 321 | Comment | 11 | | 0 | 00/819B | *
|
||||
342 | 1 Uniprox.asm 322 | Comment | 11 | | 0 | 00/819B | *** Eject ***
|
||||
343 | 1 Uniprox.asm 323 | Empty | 11 | | 0 | 00/819B | ozunid_21
|
||||
344 | 1 Uniprox.asm 323 | Equivalence | 11 | | 0 | 00/819B | CNTL_LIST1 equ ozunid_21
|
||||
345 | 1 Uniprox.asm 324 | Data | 11 | | 2 | 00/819B : 00 00 | dw $0000
|
||||
346 | 1 Uniprox.asm 325 | Comment | 11 | | 0 | 00/819D | *
|
||||
347 | 1 Uniprox.asm 326 | Comment | 11 | | 0 | 00/819D | *** Execute ***
|
||||
348 | 1 Uniprox.asm 327 | Empty | 11 | | 0 | 00/819D | ozunid_22
|
||||
349 | 1 Uniprox.asm 327 | Equivalence | 11 | | 0 | 00/819D | CNTL_LIST2 equ ozunid_22
|
||||
350 | 1 Uniprox.asm 328 | Data | 11 | | 1 | 00/819D : 06 | Clow_byte dfb $06
|
||||
351 | 1 Uniprox.asm 329 | Data | 11 | | 1 | 00/819E : 00 | Chigh_byte dfb $00
|
||||
352 | 1 Uniprox.asm 330 | Data | 11 | | 1 | 00/819F : 00 | AccValue dfb $00
|
||||
353 | 1 Uniprox.asm 331 | Data | 11 | | 1 | 00/81A0 : 00 | X_reg dfb $00 ;($80E3) Lo Byte start $00 (Unidisk)
|
||||
354 | 1 Uniprox.asm 332 | Data | 11 | | 1 | 00/81A1 : DF | Y_reg dfb $DF ;($80E4) Hi Byte One more before start $E0 - $FF-->$00 for zero page (Unidisk)
|
||||
355 | 1 Uniprox.asm 333 | Data | 11 | | 1 | 00/81A2 : 00 | ProStatus dfb $00
|
||||
356 | 1 Uniprox.asm 334 | Data | 11 | | 1 | 00/81A3 : 05 | LowPC_reg dfb $05
|
||||
357 | 1 Uniprox.asm 335 | Data | 11 | | 1 | 00/81A4 : 05 | HighPC_reg dfb $05
|
||||
358 | 1 Uniprox.asm 336 | Comment | 11 | | 0 | 00/81A5 | *
|
||||
359 | 1 Uniprox.asm 337 | Comment | 11 | | 0 | 00/81A5 | *** Set Address ***
|
||||
360 | 1 Uniprox.asm 338 | Empty | 11 | | 0 | 00/81A5 | ozunid_23
|
||||
361 | 1 Uniprox.asm 338 | Equivalence | 11 | | 0 | 00/81A5 | CNTL_LIST3 equ ozunid_23
|
||||
362 | 1 Uniprox.asm 339 | Data | 11 | | 1 | 00/81A5 : 02 | CountL_byte dfb $02
|
||||
363 | 1 Uniprox.asm 340 | Data | 11 | | 1 | 00/81A6 : 00 | CountH_byte dfb $00
|
||||
364 | 1 Uniprox.asm 341 | Data | 11 | | 1 | 00/81A7 : 05 | LByte_Addr dfb $05
|
||||
365 | 1 Uniprox.asm 342 | Data | 11 | | 1 | 00/81A8 : 05 | HByte_Addr dfb $05
|
||||
366 | 1 Uniprox.asm 343 | Comment | 11 | | 0 | 00/81A9 | *
|
||||
367 | 1 Uniprox.asm 344 | Comment | 11 | | 0 | 00/81A9 | *** Download ***
|
||||
368 | 1 Uniprox.asm 345 | Empty | 11 | | 0 | 00/81A9 | ozunid_24
|
||||
369 | 1 Uniprox.asm 345 | Equivalence | 11 | | 0 | 00/81A9 | CNTL_LIST4 equ ozunid_24
|
||||
370 | 1 Uniprox.asm 346 | Data | 11 | | 1 | 00/81A9 : 0B | LenghtL_byte dfb $0B
|
||||
371 | 1 Uniprox.asm 347 | Data | 11 | | 1 | 00/81AA : 00 | LenghtH_byte dfb $00
|
||||
372 | 1 Uniprox.asm 348 | Comment | 11 | | 0 | 00/81AB | *
|
||||
373 | 1 Uniprox.asm 349 | Comment | 11 | | 0 | 00/81AB | *** Start UNIDISK Program ***
|
||||
374 | 1 Uniprox.asm 350 | Comment | 11 | | 0 | 00/81AB | ** Temporaney save in UNIDISK "Free zero page space" the address point stored in UNIDISK X, Y registers**
|
||||
375 | 1 Uniprox.asm 351 | Code | 11 | | 2 | 00/81AB : 86 C0 | stx $00C0
|
||||
376 | 1 Uniprox.asm 352 | Code | 11 | | 2 | 00/81AD : 84 C1 | sty $00C1
|
||||
377 | 1 Uniprox.asm 353 | Comment | 11 | | 0 | 00/81AF | ** Store in UNIDISK Accumulator the value of the UniDISK location that is store in $00C0 plus $00C1
|
||||
378 | 1 Uniprox.asm 354 | Code | 11 | | 2 | 00/81AF : A0 00 | ldy #0
|
||||
379 | 1 Uniprox.asm 355 | Code | 11 | | 2 | 00/81B1 : B1 C0 | lda ($00C0),y
|
||||
380 | 1 Uniprox.asm 356 | Comment | 11 | | 0 | 00/81B3 | ** Restore the value of Y Unidisk register
|
||||
381 | 1 Uniprox.asm 357 | Code | 11 | | 2 | 00/81B3 : A4 C1 | ldy $00C1
|
||||
382 | 1 Uniprox.asm 358 | Code | 11 | | 1 | 00/81B5 : 60 | rts
|
||||
------+-----------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
BIN
AppleII/Memory dump/Uniproz
Normal file
BIN
AppleII/Memory dump/Uniproz
Normal file
Binary file not shown.
264
AppleII/Memory dump/Uniproz.asm
Normal file
264
AppleII/Memory dump/Uniproz.asm
Normal file
@ -0,0 +1,264 @@
|
||||
*
|
||||
* Unidisk 3.5 RAM Zero Page Memory Dump <beta>
|
||||
*
|
||||
* The target of this project is to dump all the Unidisk 3.5 memory
|
||||
*
|
||||
* Copyright (C) 2014 Riccardo Greco <rigreco.grc@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* @com.wudsn.ide.asm.hardware=APPLE2
|
||||
* Protocol Converter Call
|
||||
XC
|
||||
ZPTempL equ $0006 ;Temporary zero page storage
|
||||
ZPTempH equ $0007
|
||||
*** Pointers ***
|
||||
LowMain equ $000A
|
||||
HiMain equ $000B
|
||||
*** Monitor routines ***
|
||||
COut equ $FDED ;Console output ASCII
|
||||
CROut equ $FD8E ;Carriage return
|
||||
PRbyte equ $FDDA ;Print byte in hex
|
||||
** Command Code **
|
||||
StatusCmd equ 0
|
||||
** Status Code **
|
||||
StatusDIB equ 3
|
||||
StatusUNI equ 5
|
||||
*
|
||||
ControlCmd equ 4
|
||||
** Control Codes **
|
||||
Run equ 5
|
||||
SetDWLoad equ 6
|
||||
DWLoad equ 7
|
||||
*
|
||||
org $8000
|
||||
*
|
||||
* Find a Protocol Converter in one of the slots.
|
||||
*
|
||||
jsr FindPC
|
||||
bcs Error
|
||||
*
|
||||
*** Set HiMain Memory Pointers ***
|
||||
lda #$20
|
||||
sta HiMain
|
||||
*** Set Address ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw SET_ADD
|
||||
*** Download ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw DOWNLOAD
|
||||
*** Set and Reset LoMain Memory Counter ***
|
||||
RESET ldx #$FF ;One more before start
|
||||
clc
|
||||
ldy Y_reg
|
||||
iny
|
||||
sty Y_reg
|
||||
*** Execute ***
|
||||
EXEC inx
|
||||
stx LowMain
|
||||
stx X_reg
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw EXE
|
||||
READ jsr Dispatch
|
||||
dfb StatusCmd
|
||||
dw DParms
|
||||
bcs Error
|
||||
*
|
||||
*** Accumulator ***
|
||||
lda UNIAcc_reg
|
||||
jsr PRbyte
|
||||
*** X Register ***
|
||||
lda UNIX_reg
|
||||
jsr PRbyte
|
||||
*** Y Register ***
|
||||
lda UNIY_reg
|
||||
jsr PRbyte
|
||||
*** Process Status ***
|
||||
lda UNIP_val
|
||||
jsr PRbyte
|
||||
jsr CROut
|
||||
**** Store in //c Main Memory ****
|
||||
ldx X_reg
|
||||
lda UNIAcc_reg ;#$FB Test
|
||||
ldy #0
|
||||
sta (LowMain),y
|
||||
cpx UNIL_End
|
||||
bne EXEC
|
||||
UNIL_End dfb $C0 ;$FF
|
||||
*** Increment HiMain ***
|
||||
inc HiMain
|
||||
ldy Y_reg
|
||||
cpy UNIH_End
|
||||
bne RESET
|
||||
UNIH_End dfb $00 ;$FF
|
||||
*
|
||||
rts
|
||||
*
|
||||
Error equ *
|
||||
*
|
||||
* There's either no PC around, or there was no give message
|
||||
*
|
||||
ldx #0
|
||||
err1 equ *
|
||||
lda Message,x
|
||||
beq errout
|
||||
jsr COut
|
||||
inx
|
||||
bne err1
|
||||
*
|
||||
errout equ *
|
||||
rts
|
||||
*
|
||||
Message asc 'NO PC OR NO DEVICE'
|
||||
dfb $8D,0
|
||||
*
|
||||
FindPC equ *
|
||||
*
|
||||
* Search slot 7 to slot 1 looking for signature bytes
|
||||
*
|
||||
ldx #7 ;Do for seven slots
|
||||
lda #$C7
|
||||
sta ZPTempH
|
||||
lda #$00
|
||||
sta ZPTempL
|
||||
*
|
||||
newslot equ *
|
||||
ldy #7
|
||||
*
|
||||
again equ *
|
||||
lda (ZPTempL),y
|
||||
cmp sigtab,y ;One for byte signature
|
||||
beq maybe ;Found one signature byte
|
||||
dec ZPTempH
|
||||
dex
|
||||
bne newslot
|
||||
*
|
||||
* if we get here, no PC find
|
||||
sec
|
||||
rts
|
||||
*
|
||||
* if we get here, no byte find on PC
|
||||
maybe equ *
|
||||
dey
|
||||
dey ;if N=1 then all sig bytes OK
|
||||
bpl again
|
||||
* Found PC interface. Set up call address.
|
||||
* we already have high byte ($CN), we need low byte
|
||||
*
|
||||
foundPC equ *
|
||||
lda #$FF
|
||||
sta ZPTempL
|
||||
ldy #0 ;For indirect load
|
||||
lda (ZPTempL),y ;Get the byte
|
||||
*
|
||||
* Now the Acc has the low oreder ProDOS entry point.
|
||||
* The PC entry is three locations past this ...
|
||||
*
|
||||
clc
|
||||
adc #3
|
||||
sta ZPTempL
|
||||
*
|
||||
* Now ZPTempL has PC entry point.
|
||||
* Return with carry clear.
|
||||
*
|
||||
clc
|
||||
rts
|
||||
*
|
||||
* There are the PC signature bytes in their relative order.
|
||||
* The $FF bytes are filler bytes and are not compared.
|
||||
*
|
||||
sigtab dfb $FF,$20,$FF,$00
|
||||
dfb $FF,$03,$FF,$00
|
||||
*
|
||||
Dispatch equ *
|
||||
jmp (ZPTempL) ;Simulate an indirect JSR to PC
|
||||
*** Status Parameter Set ***
|
||||
DParms equ *
|
||||
DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
DPUnit dfb 1
|
||||
DPBuffer dw UNI
|
||||
DPStatCode dfb StatusUNI
|
||||
*
|
||||
*
|
||||
*** Status List UNI ***
|
||||
UNI equ *
|
||||
dfb 0
|
||||
UNIError dfb 0
|
||||
UNIRetries dfb 0
|
||||
UNIAcc_reg dfb 0
|
||||
UNIX_reg dfb 0
|
||||
UNIY_reg dfb 0
|
||||
UNIP_val dfb 0
|
||||
HHH dfb 0
|
||||
*
|
||||
*** Set Address ***
|
||||
SET_ADD equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST3
|
||||
dfb SetDWLoad
|
||||
*
|
||||
*** Download ***
|
||||
DOWNLOAD equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST4
|
||||
dfb DWLoad
|
||||
*
|
||||
*** Execute ***
|
||||
EXE equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST2
|
||||
dfb Run
|
||||
*
|
||||
*
|
||||
******** CONTROL LISTS ********
|
||||
*
|
||||
*
|
||||
*** Execute ***
|
||||
CNTL_LIST2 equ *
|
||||
Clow_byte dfb $06
|
||||
Chigh_byte dfb $00
|
||||
AccValue dfb $00
|
||||
X_reg dfb $00 ;($80E3)
|
||||
Y_reg dfb $FF ;($80E4) One more before start
|
||||
ProStatus dfb $00
|
||||
LowPC_reg dfb $05
|
||||
HighPC_reg dfb $05
|
||||
*
|
||||
*** Set Address ***
|
||||
CNTL_LIST3 equ *
|
||||
CountL_byte dfb $02
|
||||
CountH_byte dfb $00
|
||||
LByte_Addr dfb $05
|
||||
HByte_Addr dfb $05
|
||||
*
|
||||
*** Download ***
|
||||
CNTL_LIST4 equ *
|
||||
LenghtL_byte dfb $0B
|
||||
LenghtH_byte dfb $00
|
||||
*
|
||||
*** Start UNIDISK Program ***
|
||||
** Temporaney save in UNIDISK "Free zero page space" the address point stored in UNIDISK X, Y registers**
|
||||
stx $00C0
|
||||
sty $00C1
|
||||
** Store in UNIDISK Accumulator the value of the UniDISK location that is store in $00C0 plus $00C1
|
||||
ldy #0
|
||||
lda ($00C0),y
|
||||
** Restore the value of Y Unidisk register
|
||||
ldy $00C1
|
||||
rts
|
270
AppleII/Memory dump/Uniproz_Output.txt
Normal file
270
AppleII/Memory dump/Uniproz_Output.txt
Normal file
@ -0,0 +1,270 @@
|
||||
------+-----------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
Line | # File Line | Line Type | MX | Reloc | Size | Address Object Code | Source Code
|
||||
------+-----------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
1 | 1 Uniproz.asm 1 | Comment | 11 | | 0 | 00/8000 | * @com.wudsn.ide.asm.hardware=APPLE2
|
||||
2 | 1 Uniproz.asm 2 | Comment | 11 | | 0 | 00/8000 | * Protocol Converter Call
|
||||
3 | 1 Uniproz.asm 3 | Directive | 11 | | 0 | 00/8000 | XC
|
||||
4 | 1 Uniproz.asm 4 | Equivalence | 11 | | 0 | 00/8000 | ZPTempL equ $0006 ;Temporary zero page storage
|
||||
5 | 1 Uniproz.asm 5 | Equivalence | 11 | | 0 | 00/8000 | ZPTempH equ $0007
|
||||
6 | 1 Uniproz.asm 6 | Comment | 11 | | 0 | 00/8000 | *** Pointers ***
|
||||
7 | 1 Uniproz.asm 7 | Equivalence | 11 | | 0 | 00/8000 | LowMain equ $000A
|
||||
8 | 1 Uniproz.asm 8 | Equivalence | 11 | | 0 | 00/8000 | HiMain equ $000B
|
||||
9 | 1 Uniproz.asm 9 | Comment | 11 | | 0 | 00/8000 | *** Monitor routines ***
|
||||
10 | 1 Uniproz.asm 10 | Equivalence | 11 | | 0 | 00/8000 | COut equ $FDED ;Console output ASCII
|
||||
11 | 1 Uniproz.asm 11 | Equivalence | 11 | | 0 | 00/8000 | CROut equ $FD8E ;Carriage return
|
||||
12 | 1 Uniproz.asm 12 | Equivalence | 11 | | 0 | 00/8000 | PRbyte equ $FDDA ;Print byte in hex
|
||||
13 | 1 Uniproz.asm 13 | Comment | 11 | | 0 | 00/8000 | ** Command Code **
|
||||
14 | 1 Uniproz.asm 14 | Equivalence | 11 | | 0 | 00/8000 | StatusCmd equ 0
|
||||
15 | 1 Uniproz.asm 15 | Comment | 11 | | 0 | 00/8000 | ** Status Code **
|
||||
16 | 1 Uniproz.asm 16 | Equivalence | 11 | | 0 | 00/8000 | StatusDIB equ 3
|
||||
17 | 1 Uniproz.asm 17 | Equivalence | 11 | | 0 | 00/8000 | StatusUNI equ 5
|
||||
18 | 1 Uniproz.asm 18 | Comment | 11 | | 0 | 00/8000 | *
|
||||
19 | 1 Uniproz.asm 19 | Equivalence | 11 | | 0 | 00/8000 | ControlCmd equ 4
|
||||
20 | 1 Uniproz.asm 20 | Comment | 11 | | 0 | 00/8000 | ** Control Codes **
|
||||
21 | 1 Uniproz.asm 21 | Equivalence | 11 | | 0 | 00/8000 | Run equ 5
|
||||
22 | 1 Uniproz.asm 22 | Equivalence | 11 | | 0 | 00/8000 | SetDWLoad equ 6
|
||||
23 | 1 Uniproz.asm 23 | Equivalence | 11 | | 0 | 00/8000 | DWLoad equ 7
|
||||
24 | 1 Uniproz.asm 24 | Comment | 11 | | 0 | 00/8000 | *
|
||||
25 | 1 Uniproz.asm 25 | Directive | 11 | | 0 | 00/8000 | org $8000
|
||||
26 | 1 Uniproz.asm 26 | Comment | 11 | | 0 | 00/8000 | *
|
||||
27 | 1 Uniproz.asm 27 | Comment | 11 | | 0 | 00/8000 | * Find a Protocol Converter in one of the slots.
|
||||
28 | 1 Uniproz.asm 28 | Comment | 11 | | 0 | 00/8000 | *
|
||||
29 | 1 Uniproz.asm 29 | Code | 11 | | 3 | 00/8000 : 20 8C 80 | jsr {ozunid_4}
|
||||
30 | 1 Uniproz.asm 30 | Code | 11 | | 2 | 00/8003 : B0 65 | bcs {ozunid_1}
|
||||
31 | 1 Uniproz.asm 31 | Comment | 11 | | 0 | 00/8005 | *
|
||||
32 | 1 Uniproz.asm 32 | Comment | 11 | | 0 | 00/8005 | *** Set HiMain Memory Pointers ***
|
||||
33 | 1 Uniproz.asm 33 | Code | 11 | | 2 | 00/8005 : A9 20 | lda #$20
|
||||
34 | 1 Uniproz.asm 34 | Code | 11 | | 2 | 00/8007 : 85 0B | sta {$000B}
|
||||
35 | 1 Uniproz.asm 35 | Comment | 11 | | 0 | 00/8009 | *** Set Address ***
|
||||
36 | 1 Uniproz.asm 36 | Code | 11 | | 3 | 00/8009 : 20 C1 80 | jsr {ozunid_9}
|
||||
37 | 1 Uniproz.asm 37 | Data | 11 | | 1 | 00/800C : 04 | dfb {4}
|
||||
38 | 1 Uniproz.asm 38 | Data | 11 | | 2 | 00/800D : D1 80 | dw {ozunid_12}
|
||||
39 | 1 Uniproz.asm 39 | Comment | 11 | | 0 | 00/800F | *** Download ***
|
||||
40 | 1 Uniproz.asm 40 | Code | 11 | | 3 | 00/800F : 20 C1 80 | jsr {ozunid_9}
|
||||
41 | 1 Uniproz.asm 41 | Data | 11 | | 1 | 00/8012 : 04 | dfb {4}
|
||||
42 | 1 Uniproz.asm 42 | Data | 11 | | 2 | 00/8013 : D6 80 | dw {ozunid_13}
|
||||
43 | 1 Uniproz.asm 43 | Comment | 11 | | 0 | 00/8015 | *** Set and Reset LoMain Memory Counter ***
|
||||
44 | 1 Uniproz.asm 44 | Code | 11 | | 2 | 00/8015 : A2 FF | RESET ldx #$FF ;One more before start
|
||||
45 | 1 Uniproz.asm 45 | Code | 11 | | 1 | 00/8017 : 18 | clc
|
||||
46 | 1 Uniproz.asm 46 | Code | 11 | | 3 | 00/8018 : AC E4 80 | ldy Y_reg
|
||||
47 | 1 Uniproz.asm 47 | Code | 11 | | 1 | 00/801B : C8 | iny
|
||||
48 | 1 Uniproz.asm 48 | Code | 11 | | 3 | 00/801C : 8C E4 80 | sty Y_reg
|
||||
49 | 1 Uniproz.asm 49 | Comment | 11 | | 0 | 00/801F | *** Execute ***
|
||||
50 | 1 Uniproz.asm 50 | Code | 11 | | 1 | 00/801F : E8 | EXEC inx
|
||||
51 | 1 Uniproz.asm 51 | Code | 11 | | 2 | 00/8020 : 86 0A | stx {$000A}
|
||||
52 | 1 Uniproz.asm 52 | Code | 11 | | 3 | 00/8022 : 8E E3 80 | stx X_reg
|
||||
53 | 1 Uniproz.asm 53 | Code | 11 | | 3 | 00/8025 : 20 C1 80 | jsr {ozunid_9}
|
||||
54 | 1 Uniproz.asm 54 | Data | 11 | | 1 | 00/8028 : 04 | dfb {4}
|
||||
55 | 1 Uniproz.asm 55 | Data | 11 | | 2 | 00/8029 : DB 80 | dw {ozunid_14}
|
||||
56 | 1 Uniproz.asm 56 | Code | 11 | | 3 | 00/802B : 20 C1 80 | READ jsr {ozunid_9}
|
||||
57 | 1 Uniproz.asm 57 | Data | 11 | | 1 | 00/802E : 00 | dfb {0}
|
||||
58 | 1 Uniproz.asm 58 | Data | 11 | | 2 | 00/802F : C4 80 | dw {ozunid_10}
|
||||
59 | 1 Uniproz.asm 59 | Code | 11 | | 2 | 00/8031 : B0 37 | bcs {ozunid_1}
|
||||
60 | 1 Uniproz.asm 60 | Comment | 11 | | 0 | 00/8033 | *
|
||||
61 | 1 Uniproz.asm 61 | Comment | 11 | | 0 | 00/8033 | *** Accumulator ***
|
||||
62 | 1 Uniproz.asm 62 | Code | 11 | | 3 | 00/8033 : AD CC 80 | lda UNIAcc_reg
|
||||
63 | 1 Uniproz.asm 63 | Code | 11 | | 3 | 00/8036 : 20 DA FD | jsr {$FDDA}
|
||||
64 | 1 Uniproz.asm 64 | Comment | 11 | | 0 | 00/8039 | *** X Register ***
|
||||
65 | 1 Uniproz.asm 65 | Code | 11 | | 3 | 00/8039 : AD CD 80 | lda UNIX_reg
|
||||
66 | 1 Uniproz.asm 66 | Code | 11 | | 3 | 00/803C : 20 DA FD | jsr {$FDDA}
|
||||
67 | 1 Uniproz.asm 67 | Comment | 11 | | 0 | 00/803F | *** Y Register ***
|
||||
68 | 1 Uniproz.asm 68 | Code | 11 | | 3 | 00/803F : AD CE 80 | lda UNIY_reg
|
||||
69 | 1 Uniproz.asm 69 | Code | 11 | | 3 | 00/8042 : 20 DA FD | jsr {$FDDA}
|
||||
70 | 1 Uniproz.asm 70 | Comment | 11 | | 0 | 00/8045 | *** Prrocess Status ***
|
||||
71 | 1 Uniproz.asm 71 | Code | 11 | | 3 | 00/8045 : AD CF 80 | lda UNIP_val
|
||||
72 | 1 Uniproz.asm 72 | Code | 11 | | 3 | 00/8048 : 20 DA FD | jsr {$FDDA}
|
||||
73 | 1 Uniproz.asm 73 | Code | 11 | | 3 | 00/804B : 20 8E FD | jsr {$FD8E}
|
||||
74 | 1 Uniproz.asm 74 | Comment | 11 | | 0 | 00/804E | **** Store in //c Main Memory ****
|
||||
75 | 1 Uniproz.asm 75 | Code | 11 | | 3 | 00/804E : AE E3 80 | ldx X_reg
|
||||
76 | 1 Uniproz.asm 76 | Code | 11 | | 3 | 00/8051 : AD CC 80 | lda UNIAcc_reg ;#$FB Test
|
||||
77 | 1 Uniproz.asm 77 | Code | 11 | | 2 | 00/8054 : A0 00 | ldy #0
|
||||
78 | 1 Uniproz.asm 78 | Code | 11 | | 2 | 00/8056 : 91 0A | sta ({$000A}),y
|
||||
79 | 1 Uniproz.asm 79 | Code | 11 | | 3 | 00/8058 : EC 5D 80 | cpx UNIL_End
|
||||
80 | 1 Uniproz.asm 80 | Code | 11 | | 2 | 00/805B : D0 C2 | bne EXEC
|
||||
81 | 1 Uniproz.asm 81 | Data | 11 | | 1 | 00/805D : C0 | UNIL_End dfb $C0 ;$FF
|
||||
82 | 1 Uniproz.asm 82 | Comment | 11 | | 0 | 00/805E | *** Increment HiMain ***
|
||||
83 | 1 Uniproz.asm 83 | Code | 11 | | 2 | 00/805E : E6 0B | inc {$000B}
|
||||
84 | 1 Uniproz.asm 84 | Code | 11 | | 3 | 00/8060 : AC E4 80 | ldy Y_reg
|
||||
85 | 1 Uniproz.asm 85 | Code | 11 | | 3 | 00/8063 : CC 68 80 | cpy UNIH_End
|
||||
86 | 1 Uniproz.asm 86 | Code | 11 | | 2 | 00/8066 : D0 AD | bne RESET
|
||||
87 | 1 Uniproz.asm 87 | Data | 11 | | 1 | 00/8068 : 00 | UNIH_End dfb $00 ;$FF
|
||||
88 | 1 Uniproz.asm 88 | Comment | 11 | | 0 | 00/8069 | *
|
||||
89 | 1 Uniproz.asm 89 | Code | 11 | | 1 | 00/8069 : 60 | rts
|
||||
90 | 1 Uniproz.asm 90 | Comment | 11 | | 0 | 00/806A | *
|
||||
91 | 1 Uniproz.asm 91 | Empty | 11 | | 0 | 00/806A | ozunid_1
|
||||
92 | 1 Uniproz.asm 91 | Equivalence | 11 | | 0 | 00/806A | Error equ ozunid_1
|
||||
93 | 1 Uniproz.asm 92 | Comment | 11 | | 0 | 00/806A | *
|
||||
94 | 1 Uniproz.asm 93 | Comment | 11 | | 0 | 00/806A | * There's either no PC around, or there was no give message
|
||||
95 | 1 Uniproz.asm 94 | Comment | 11 | | 0 | 00/806A | *
|
||||
96 | 1 Uniproz.asm 95 | Code | 11 | | 2 | 00/806A : A2 00 | ldx #0
|
||||
97 | 1 Uniproz.asm 96 | Empty | 11 | | 0 | 00/806C | ozunid_2
|
||||
98 | 1 Uniproz.asm 96 | Equivalence | 11 | | 0 | 00/806C | err1 equ ozunid_2
|
||||
99 | 1 Uniproz.asm 97 | Code | 11 | | 3 | 00/806C : BD 78 80 | lda Message,x
|
||||
100 | 1 Uniproz.asm 98 | Code | 11 | | 2 | 00/806F : F0 06 | beq {ozunid_3}
|
||||
101 | 1 Uniproz.asm 99 | Code | 11 | | 3 | 00/8071 : 20 ED FD | jsr {$FDED}
|
||||
102 | 1 Uniproz.asm 100 | Code | 11 | | 1 | 00/8074 : E8 | inx
|
||||
103 | 1 Uniproz.asm 101 | Code | 11 | | 2 | 00/8075 : D0 F5 | bne {ozunid_2}
|
||||
104 | 1 Uniproz.asm 102 | Comment | 11 | | 0 | 00/8077 | *
|
||||
105 | 1 Uniproz.asm 103 | Empty | 11 | | 0 | 00/8077 | ozunid_3
|
||||
106 | 1 Uniproz.asm 103 | Equivalence | 11 | | 0 | 00/8077 | errout equ ozunid_3
|
||||
107 | 1 Uniproz.asm 104 | Code | 11 | | 1 | 00/8077 : 60 | rts
|
||||
108 | 1 Uniproz.asm 105 | Comment | 11 | | 0 | 00/8078 | *
|
||||
109 | 1 Uniproz.asm 106 | Data | 11 | | 18 | 00/8078 : 4E 4F 20 50 | Message asc 'NO PC OR NO DEVICE'
|
||||
| | | | | | 43 20 4F 52 |
|
||||
| | | | | | 20 4E 4F 20 |
|
||||
| | | | | | 44 45 56 49 |
|
||||
| | | | | | 43 45 |
|
||||
110 | 1 Uniproz.asm 107 | Data | 11 | | 2 | 00/808A : 8D 00 | dfb $8D,0
|
||||
111 | 1 Uniproz.asm 108 | Comment | 11 | | 0 | 00/808C | *
|
||||
112 | 1 Uniproz.asm 109 | Empty | 11 | | 0 | 00/808C | ozunid_4
|
||||
113 | 1 Uniproz.asm 109 | Equivalence | 11 | | 0 | 00/808C | FindPC equ ozunid_4
|
||||
114 | 1 Uniproz.asm 110 | Comment | 11 | | 0 | 00/808C | *
|
||||
115 | 1 Uniproz.asm 111 | Comment | 11 | | 0 | 00/808C | * Search slot 7 to slot 1 looking for signature bytes
|
||||
116 | 1 Uniproz.asm 112 | Comment | 11 | | 0 | 00/808C | *
|
||||
117 | 1 Uniproz.asm 113 | Code | 11 | | 2 | 00/808C : A2 07 | ldx #7 ;Do for seven slots
|
||||
118 | 1 Uniproz.asm 114 | Code | 11 | | 2 | 00/808E : A9 C7 | lda #$C7
|
||||
119 | 1 Uniproz.asm 115 | Code | 11 | | 2 | 00/8090 : 85 07 | sta {$0007}
|
||||
120 | 1 Uniproz.asm 116 | Code | 11 | | 2 | 00/8092 : A9 00 | lda #$00
|
||||
121 | 1 Uniproz.asm 117 | Code | 11 | | 2 | 00/8094 : 85 06 | sta {$0006}
|
||||
122 | 1 Uniproz.asm 118 | Comment | 11 | | 0 | 00/8096 | *
|
||||
123 | 1 Uniproz.asm 119 | Empty | 11 | | 0 | 00/8096 | ozunid_5
|
||||
124 | 1 Uniproz.asm 119 | Equivalence | 11 | | 0 | 00/8096 | newslot equ ozunid_5
|
||||
125 | 1 Uniproz.asm 120 | Code | 11 | | 2 | 00/8096 : A0 07 | ldy #7
|
||||
126 | 1 Uniproz.asm 121 | Comment | 11 | | 0 | 00/8098 | *
|
||||
127 | 1 Uniproz.asm 122 | Empty | 11 | | 0 | 00/8098 | ozunid_6
|
||||
128 | 1 Uniproz.asm 122 | Equivalence | 11 | | 0 | 00/8098 | again equ ozunid_6
|
||||
129 | 1 Uniproz.asm 123 | Code | 11 | | 2 | 00/8098 : B1 06 | lda ({$0006}),y
|
||||
130 | 1 Uniproz.asm 124 | Code | 11 | | 3 | 00/809A : D9 B9 80 | cmp sigtab,y ;One for byte signature
|
||||
131 | 1 Uniproz.asm 125 | Code | 11 | | 2 | 00/809D : F0 07 | beq {ozunid_7} ;Found one signature byte
|
||||
132 | 1 Uniproz.asm 126 | Code | 11 | | 2 | 00/809F : C6 07 | dec {$0007}
|
||||
133 | 1 Uniproz.asm 127 | Code | 11 | | 1 | 00/80A1 : CA | dex
|
||||
134 | 1 Uniproz.asm 128 | Code | 11 | | 2 | 00/80A2 : D0 F2 | bne {ozunid_5}
|
||||
135 | 1 Uniproz.asm 129 | Comment | 11 | | 0 | 00/80A4 | *
|
||||
136 | 1 Uniproz.asm 130 | Comment | 11 | | 0 | 00/80A4 | * if we get here, no PC find
|
||||
137 | 1 Uniproz.asm 131 | Code | 11 | | 1 | 00/80A4 : 38 | sec
|
||||
138 | 1 Uniproz.asm 132 | Code | 11 | | 1 | 00/80A5 : 60 | rts
|
||||
139 | 1 Uniproz.asm 133 | Comment | 11 | | 0 | 00/80A6 | *
|
||||
140 | 1 Uniproz.asm 134 | Comment | 11 | | 0 | 00/80A6 | * if we get here, no byte find on PC
|
||||
141 | 1 Uniproz.asm 135 | Empty | 11 | | 0 | 00/80A6 | ozunid_7
|
||||
142 | 1 Uniproz.asm 135 | Equivalence | 11 | | 0 | 00/80A6 | maybe equ ozunid_7
|
||||
143 | 1 Uniproz.asm 136 | Code | 11 | | 1 | 00/80A6 : 88 | dey
|
||||
144 | 1 Uniproz.asm 137 | Code | 11 | | 1 | 00/80A7 : 88 | dey ;if N=1 then all sig bytes OK
|
||||
145 | 1 Uniproz.asm 138 | Code | 11 | | 2 | 00/80A8 : 10 EE | bpl {ozunid_6}
|
||||
146 | 1 Uniproz.asm 139 | Comment | 11 | | 0 | 00/80AA | * Found PC interface. Set up call address.
|
||||
147 | 1 Uniproz.asm 140 | Comment | 11 | | 0 | 00/80AA | * we already have high byte ($CN), we need low byte
|
||||
148 | 1 Uniproz.asm 141 | Comment | 11 | | 0 | 00/80AA | *
|
||||
149 | 1 Uniproz.asm 142 | Empty | 11 | | 0 | 00/80AA | ozunid_8
|
||||
150 | 1 Uniproz.asm 142 | Equivalence | 11 | | 0 | 00/80AA | foundPC equ ozunid_8
|
||||
151 | 1 Uniproz.asm 143 | Code | 11 | | 2 | 00/80AA : A9 FF | lda #$FF
|
||||
152 | 1 Uniproz.asm 144 | Code | 11 | | 2 | 00/80AC : 85 06 | sta {$0006}
|
||||
153 | 1 Uniproz.asm 145 | Code | 11 | | 2 | 00/80AE : A0 00 | ldy #0 ;For indirect load
|
||||
154 | 1 Uniproz.asm 146 | Code | 11 | | 2 | 00/80B0 : B1 06 | lda ({$0006}),y ;Get the byte
|
||||
155 | 1 Uniproz.asm 147 | Comment | 11 | | 0 | 00/80B2 | *
|
||||
156 | 1 Uniproz.asm 148 | Comment | 11 | | 0 | 00/80B2 | * Now the Acc has the low oreder ProDOS entry point.
|
||||
157 | 1 Uniproz.asm 149 | Comment | 11 | | 0 | 00/80B2 | * The PC entry is three locations past this ...
|
||||
158 | 1 Uniproz.asm 150 | Comment | 11 | | 0 | 00/80B2 | *
|
||||
159 | 1 Uniproz.asm 151 | Code | 11 | | 1 | 00/80B2 : 18 | clc
|
||||
160 | 1 Uniproz.asm 152 | Code | 11 | | 2 | 00/80B3 : 69 03 | adc #3
|
||||
161 | 1 Uniproz.asm 153 | Code | 11 | | 2 | 00/80B5 : 85 06 | sta {$0006}
|
||||
162 | 1 Uniproz.asm 154 | Comment | 11 | | 0 | 00/80B7 | *
|
||||
163 | 1 Uniproz.asm 155 | Comment | 11 | | 0 | 00/80B7 | * Now ZPTempL has PC entry point.
|
||||
164 | 1 Uniproz.asm 156 | Comment | 11 | | 0 | 00/80B7 | * Return with carry clear.
|
||||
165 | 1 Uniproz.asm 157 | Comment | 11 | | 0 | 00/80B7 | *
|
||||
166 | 1 Uniproz.asm 158 | Code | 11 | | 1 | 00/80B7 : 18 | clc
|
||||
167 | 1 Uniproz.asm 159 | Code | 11 | | 1 | 00/80B8 : 60 | rts
|
||||
168 | 1 Uniproz.asm 160 | Comment | 11 | | 0 | 00/80B9 | *
|
||||
169 | 1 Uniproz.asm 161 | Comment | 11 | | 0 | 00/80B9 | * There are the PC signature bytes in their relative order.
|
||||
170 | 1 Uniproz.asm 162 | Comment | 11 | | 0 | 00/80B9 | * The $FF bytes are filler bytes and are not compared.
|
||||
171 | 1 Uniproz.asm 163 | Comment | 11 | | 0 | 00/80B9 | *
|
||||
172 | 1 Uniproz.asm 164 | Data | 11 | | 4 | 00/80B9 : FF 20 FF 00 | sigtab dfb $FF,$20,$FF,$00
|
||||
173 | 1 Uniproz.asm 165 | Data | 11 | | 4 | 00/80BD : FF 03 FF 00 | dfb $FF,$03,$FF,$00
|
||||
174 | 1 Uniproz.asm 166 | Comment | 11 | | 0 | 00/80C1 | *
|
||||
175 | 1 Uniproz.asm 167 | Empty | 11 | | 0 | 00/80C1 | ozunid_9
|
||||
176 | 1 Uniproz.asm 167 | Equivalence | 11 | | 0 | 00/80C1 | Dispatch equ ozunid_9
|
||||
177 | 1 Uniproz.asm 168 | Code | 11 | | 3 | 00/80C1 : 6C 06 00 | jmp ({$0006}) ;Simulate an indirect JSR to PC
|
||||
178 | 1 Uniproz.asm 169 | Comment | 11 | | 0 | 00/80C4 | *** Status Parameter Set ***
|
||||
179 | 1 Uniproz.asm 170 | Empty | 11 | | 0 | 00/80C4 | ozunid_10
|
||||
180 | 1 Uniproz.asm 170 | Equivalence | 11 | | 0 | 00/80C4 | DParms equ ozunid_10
|
||||
181 | 1 Uniproz.asm 171 | Data | 11 | | 1 | 00/80C4 : 03 | DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
182 | 1 Uniproz.asm 172 | Data | 11 | | 1 | 00/80C5 : 01 | DPUnit dfb 1
|
||||
183 | 1 Uniproz.asm 173 | Data | 11 | | 2 | 00/80C6 : C9 80 | DPBuffer dw {ozunid_11}
|
||||
184 | 1 Uniproz.asm 174 | Data | 11 | | 1 | 00/80C8 : 05 | DPStatCode dfb {5}
|
||||
185 | 1 Uniproz.asm 175 | Comment | 11 | | 0 | 00/80C9 | *
|
||||
186 | 1 Uniproz.asm 176 | Comment | 11 | | 0 | 00/80C9 | *
|
||||
187 | 1 Uniproz.asm 177 | Comment | 11 | | 0 | 00/80C9 | *** Status List UNI ***
|
||||
188 | 1 Uniproz.asm 178 | Empty | 11 | | 0 | 00/80C9 | ozunid_11
|
||||
189 | 1 Uniproz.asm 178 | Equivalence | 11 | | 0 | 00/80C9 | UNI equ ozunid_11
|
||||
190 | 1 Uniproz.asm 179 | Data | 11 | | 1 | 00/80C9 : 00 | dfb 0
|
||||
191 | 1 Uniproz.asm 180 | Data | 11 | | 1 | 00/80CA : 00 | UNIError dfb 0
|
||||
192 | 1 Uniproz.asm 181 | Data | 11 | | 1 | 00/80CB : 00 | UNIRetries dfb 0
|
||||
193 | 1 Uniproz.asm 182 | Data | 11 | | 1 | 00/80CC : 00 | UNIAcc_reg dfb 0
|
||||
194 | 1 Uniproz.asm 183 | Data | 11 | | 1 | 00/80CD : 00 | UNIX_reg dfb 0
|
||||
195 | 1 Uniproz.asm 184 | Data | 11 | | 1 | 00/80CE : 00 | UNIY_reg dfb 0
|
||||
196 | 1 Uniproz.asm 185 | Data | 11 | | 1 | 00/80CF : 00 | UNIP_val dfb 0
|
||||
197 | 1 Uniproz.asm 186 | Data | 11 | | 1 | 00/80D0 : 00 | HHH dfb 0
|
||||
198 | 1 Uniproz.asm 187 | Comment | 11 | | 0 | 00/80D1 | *
|
||||
199 | 1 Uniproz.asm 188 | Comment | 11 | | 0 | 00/80D1 | *** Set Address ***
|
||||
200 | 1 Uniproz.asm 189 | Empty | 11 | | 0 | 00/80D1 | ozunid_12
|
||||
201 | 1 Uniproz.asm 189 | Equivalence | 11 | | 0 | 00/80D1 | SET_ADD equ ozunid_12
|
||||
202 | 1 Uniproz.asm 190 | Data | 11 | | 1 | 00/80D1 : 03 | dfb 3
|
||||
203 | 1 Uniproz.asm 191 | Data | 11 | | 1 | 00/80D2 : 01 | dfb 1
|
||||
204 | 1 Uniproz.asm 192 | Data | 11 | | 2 | 00/80D3 : E8 80 | dw {ozunid_16}
|
||||
205 | 1 Uniproz.asm 193 | Data | 11 | | 1 | 00/80D5 : 06 | dfb {6}
|
||||
206 | 1 Uniproz.asm 194 | Comment | 11 | | 0 | 00/80D6 | *
|
||||
207 | 1 Uniproz.asm 195 | Comment | 11 | | 0 | 00/80D6 | *** Download ***
|
||||
208 | 1 Uniproz.asm 196 | Empty | 11 | | 0 | 00/80D6 | ozunid_13
|
||||
209 | 1 Uniproz.asm 196 | Equivalence | 11 | | 0 | 00/80D6 | DOWNLOAD equ ozunid_13
|
||||
210 | 1 Uniproz.asm 197 | Data | 11 | | 1 | 00/80D6 : 03 | dfb 3
|
||||
211 | 1 Uniproz.asm 198 | Data | 11 | | 1 | 00/80D7 : 01 | dfb 1
|
||||
212 | 1 Uniproz.asm 199 | Data | 11 | | 2 | 00/80D8 : EC 80 | dw {ozunid_17}
|
||||
213 | 1 Uniproz.asm 200 | Data | 11 | | 1 | 00/80DA : 07 | dfb {7}
|
||||
214 | 1 Uniproz.asm 201 | Comment | 11 | | 0 | 00/80DB | *
|
||||
215 | 1 Uniproz.asm 202 | Comment | 11 | | 0 | 00/80DB | *** Execute ***
|
||||
216 | 1 Uniproz.asm 203 | Empty | 11 | | 0 | 00/80DB | ozunid_14
|
||||
217 | 1 Uniproz.asm 203 | Equivalence | 11 | | 0 | 00/80DB | EXE equ ozunid_14
|
||||
218 | 1 Uniproz.asm 204 | Data | 11 | | 1 | 00/80DB : 03 | dfb 3
|
||||
219 | 1 Uniproz.asm 205 | Data | 11 | | 1 | 00/80DC : 01 | dfb 1
|
||||
220 | 1 Uniproz.asm 206 | Data | 11 | | 2 | 00/80DD : E0 80 | dw {ozunid_15}
|
||||
221 | 1 Uniproz.asm 207 | Data | 11 | | 1 | 00/80DF : 05 | dfb {5}
|
||||
222 | 1 Uniproz.asm 208 | Comment | 11 | | 0 | 00/80E0 | *
|
||||
223 | 1 Uniproz.asm 209 | Comment | 11 | | 0 | 00/80E0 | *
|
||||
224 | 1 Uniproz.asm 210 | Comment | 11 | | 0 | 00/80E0 | ******** CONTROL LISTS ********
|
||||
225 | 1 Uniproz.asm 211 | Comment | 11 | | 0 | 00/80E0 | *
|
||||
226 | 1 Uniproz.asm 212 | Comment | 11 | | 0 | 00/80E0 | *
|
||||
227 | 1 Uniproz.asm 213 | Comment | 11 | | 0 | 00/80E0 | *** Execute ***
|
||||
228 | 1 Uniproz.asm 214 | Empty | 11 | | 0 | 00/80E0 | ozunid_15
|
||||
229 | 1 Uniproz.asm 214 | Equivalence | 11 | | 0 | 00/80E0 | CNTL_LIST2 equ ozunid_15
|
||||
230 | 1 Uniproz.asm 215 | Data | 11 | | 1 | 00/80E0 : 06 | Clow_byte dfb $06
|
||||
231 | 1 Uniproz.asm 216 | Data | 11 | | 1 | 00/80E1 : 00 | Chigh_byte dfb $00
|
||||
232 | 1 Uniproz.asm 217 | Data | 11 | | 1 | 00/80E2 : 00 | AccValue dfb $00
|
||||
233 | 1 Uniproz.asm 218 | Data | 11 | | 1 | 00/80E3 : 00 | X_reg dfb $00 ;($80E3)
|
||||
234 | 1 Uniproz.asm 219 | Data | 11 | | 1 | 00/80E4 : FF | Y_reg dfb $FF ;($80E4) One more before start
|
||||
235 | 1 Uniproz.asm 220 | Data | 11 | | 1 | 00/80E5 : 00 | ProStatus dfb $00
|
||||
236 | 1 Uniproz.asm 221 | Data | 11 | | 1 | 00/80E6 : 05 | LowPC_reg dfb $05
|
||||
237 | 1 Uniproz.asm 222 | Data | 11 | | 1 | 00/80E7 : 05 | HighPC_reg dfb $05
|
||||
238 | 1 Uniproz.asm 223 | Comment | 11 | | 0 | 00/80E8 | *
|
||||
239 | 1 Uniproz.asm 224 | Comment | 11 | | 0 | 00/80E8 | *** Set Address ***
|
||||
240 | 1 Uniproz.asm 225 | Empty | 11 | | 0 | 00/80E8 | ozunid_16
|
||||
241 | 1 Uniproz.asm 225 | Equivalence | 11 | | 0 | 00/80E8 | CNTL_LIST3 equ ozunid_16
|
||||
242 | 1 Uniproz.asm 226 | Data | 11 | | 1 | 00/80E8 : 02 | CountL_byte dfb $02
|
||||
243 | 1 Uniproz.asm 227 | Data | 11 | | 1 | 00/80E9 : 00 | CountH_byte dfb $00
|
||||
244 | 1 Uniproz.asm 228 | Data | 11 | | 1 | 00/80EA : 05 | LByte_Addr dfb $05
|
||||
245 | 1 Uniproz.asm 229 | Data | 11 | | 1 | 00/80EB : 05 | HByte_Addr dfb $05
|
||||
246 | 1 Uniproz.asm 230 | Comment | 11 | | 0 | 00/80EC | *
|
||||
247 | 1 Uniproz.asm 231 | Comment | 11 | | 0 | 00/80EC | *** Download ***
|
||||
248 | 1 Uniproz.asm 232 | Empty | 11 | | 0 | 00/80EC | ozunid_17
|
||||
249 | 1 Uniproz.asm 232 | Equivalence | 11 | | 0 | 00/80EC | CNTL_LIST4 equ ozunid_17
|
||||
250 | 1 Uniproz.asm 233 | Data | 11 | | 1 | 00/80EC : 0B | LenghtL_byte dfb $0B
|
||||
251 | 1 Uniproz.asm 234 | Data | 11 | | 1 | 00/80ED : 00 | LenghtH_byte dfb $00
|
||||
252 | 1 Uniproz.asm 235 | Comment | 11 | | 0 | 00/80EE | *
|
||||
253 | 1 Uniproz.asm 236 | Comment | 11 | | 0 | 00/80EE | *** Start UNIDISK Program ***
|
||||
254 | 1 Uniproz.asm 237 | Comment | 11 | | 0 | 00/80EE | ** Temporaney save in UNIDISK "Free zero page space" the address point stored in UNIDISK X, Y registers**
|
||||
255 | 1 Uniproz.asm 238 | Code | 11 | | 2 | 00/80EE : 86 C0 | stx $00C0
|
||||
256 | 1 Uniproz.asm 239 | Code | 11 | | 2 | 00/80F0 : 84 C1 | sty $00C1
|
||||
257 | 1 Uniproz.asm 240 | Comment | 11 | | 0 | 00/80F2 | ** Store in UNIDISK Accumulator the value of the UniDISK location that is store in $00C0 plus $00C1
|
||||
258 | 1 Uniproz.asm 241 | Code | 11 | | 2 | 00/80F2 : A0 00 | ldy #0
|
||||
259 | 1 Uniproz.asm 242 | Code | 11 | | 2 | 00/80F4 : B1 C0 | lda ($00C0),y
|
||||
260 | 1 Uniproz.asm 243 | Comment | 11 | | 0 | 00/80F6 | ** Restore the value of Y Unidisk register
|
||||
261 | 1 Uniproz.asm 244 | Code | 11 | | 2 | 00/80F6 : A4 C1 | ldy $00C1
|
||||
262 | 1 Uniproz.asm 245 | Code | 11 | | 1 | 00/80F8 : 60 | rts
|
||||
------+-----------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
2
AppleII/N integer adc 2 Byte/TestN
Normal file
2
AppleII/N integer adc 2 Byte/TestN
Normal file
@ -0,0 +1,2 @@
|
||||
H…ÄI…ťąÀ¥Å…Á¥Äð
|
||||
:…¥ŅÃL+¥Åð:…éÿ…Â¥ÀeÂ…À¥ÁeÃ…Á¥Â…ĥÅÅL¦À¤Á`ÿÿ
|
71
AppleII/N integer adc 2 Byte/TestN.asm
Normal file
71
AppleII/N integer adc 2 Byte/TestN.asm
Normal file
@ -0,0 +1,71 @@
|
||||
* @com.wudsn.ide.asm.hardware=APPLE2
|
||||
*** Start UNIDISK Program ***
|
||||
** Two byte adc **
|
||||
org $300
|
||||
RSLTU equ $C0
|
||||
NDEC equ $C2
|
||||
N equ $C4
|
||||
|
||||
** Save the N number **
|
||||
lda N1U
|
||||
sta N
|
||||
lda N1U+1
|
||||
sta N+1
|
||||
** Set RSLTU=N **
|
||||
lda N
|
||||
sta RSLTU ; N Lo
|
||||
lda N+1
|
||||
sta RSLTU+1 ; N Hi
|
||||
|
||||
LOOP lda N
|
||||
|
||||
beq HI ; If NLo =0 dec NHi
|
||||
|
||||
** Set NDEC=N-1 Lo **
|
||||
dec A
|
||||
sta NDEC ; N-1 Lo
|
||||
** Set NDEC=N Hi **
|
||||
lda N+1
|
||||
sta NDEC+1 ; NHi = NDEC Hi
|
||||
|
||||
jmp ENTRY
|
||||
|
||||
** Set NDEC=N-1 Hi **
|
||||
HI lda N+1
|
||||
|
||||
beq DONE ; If also NHi =0 done
|
||||
|
||||
dec A
|
||||
sta NDEC+1 ; N-1 Hi
|
||||
|
||||
lda #$FF
|
||||
sta NDEC ; N-1 Lo = FF Set NDEC to FF
|
||||
|
||||
ENTRY clc
|
||||
|
||||
lda RSLTU ; Lo Byte
|
||||
adc NDEC ; N+(N-1)
|
||||
sta RSLTU
|
||||
|
||||
lda RSLTU+1 ; Hi Byte
|
||||
adc NDEC+1 ; N+(N-1)
|
||||
sta RSLTU+1
|
||||
|
||||
** Update N=NDEC **
|
||||
lda NDEC
|
||||
sta N
|
||||
lda NDEC+1
|
||||
sta N+1
|
||||
|
||||
jmp LOOP
|
||||
|
||||
** Output Data **
|
||||
DONE ldx RSLTU
|
||||
ldy RSLTU+1
|
||||
|
||||
rts
|
||||
|
||||
|
||||
** Input Dynamic Data append in the end of Unidisk routine **
|
||||
N1U dfb $FF
|
||||
dfb $FF
|
75
AppleII/N integer adc 2 Byte/TestN_Output.txt
Normal file
75
AppleII/N integer adc 2 Byte/TestN_Output.txt
Normal file
@ -0,0 +1,75 @@
|
||||
------+---------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
Line | # File Line | Line Type | MX | Reloc | Size | Address Object Code | Source Code
|
||||
------+---------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
1 | 1 TestN.asm 1 | Comment | 11 | | 0 | 00/8000 | * @com.wudsn.ide.asm.hardware=APPLE2
|
||||
2 | 1 TestN.asm 2 | Comment | 11 | | 0 | 00/8000 | *** Start UNIDISK Program ***
|
||||
3 | 1 TestN.asm 3 | Comment | 11 | | 0 | 00/8000 | ** Two byte adc **
|
||||
4 | 1 TestN.asm 4 | Directive | 11 | | 0 | 00/8000 | org $300
|
||||
5 | 1 TestN.asm 5 | Equivalence | 11 | | 0 | 00/0300 | RSLTU equ $C0
|
||||
6 | 1 TestN.asm 6 | Equivalence | 11 | | 0 | 00/0300 | NDEC equ $C2
|
||||
7 | 1 TestN.asm 7 | Equivalence | 11 | | 0 | 00/0300 | N equ $C4
|
||||
8 | 1 TestN.asm 8 | Empty | 11 | | 0 | 00/0300 |
|
||||
9 | 1 TestN.asm 9 | Comment | 11 | | 0 | 00/0300 | ** Save the N number **
|
||||
10 | 1 TestN.asm 10 | Code | 11 | | 3 | 00/0300 : AD 48 03 | lda N1U
|
||||
11 | 1 TestN.asm 11 | Code | 11 | | 2 | 00/0303 : 85 C4 | sta {$C4}
|
||||
12 | 1 TestN.asm 12 | Code | 11 | | 3 | 00/0305 : AD 49 03 | lda N1U+1
|
||||
13 | 1 TestN.asm 13 | Code | 11 | | 2 | 00/0308 : 85 C5 | sta {$C4}+1
|
||||
14 | 1 TestN.asm 14 | Comment | 11 | | 0 | 00/030A | ** Set RSLTU=N **
|
||||
15 | 1 TestN.asm 15 | Code | 11 | | 2 | 00/030A : A5 C4 | lda {$C4}
|
||||
16 | 1 TestN.asm 16 | Code | 11 | | 2 | 00/030C : 85 C0 | sta {$C0} ; N Lo
|
||||
17 | 1 TestN.asm 17 | Code | 11 | | 2 | 00/030E : A5 C5 | lda {$C4}+1
|
||||
18 | 1 TestN.asm 18 | Code | 11 | | 2 | 00/0310 : 85 C1 | sta {$C0}+1 ; N Hi
|
||||
19 | 1 TestN.asm 19 | Empty | 11 | | 0 | 00/0312 |
|
||||
20 | 1 TestN.asm 20 | Code | 11 | | 2 | 00/0312 : A5 C4 | LOOP lda {$C4}
|
||||
21 | 1 TestN.asm 21 | Empty | 11 | | 0 | 00/0314 |
|
||||
22 | 1 TestN.asm 22 | Code | 11 | | 2 | 00/0314 : F0 0A | beq HI ; If NLo =0 dec NHi
|
||||
23 | 1 TestN.asm 23 | Empty | 11 | | 0 | 00/0316 |
|
||||
24 | 1 TestN.asm 24 | Comment | 11 | | 0 | 00/0316 | ** Set NDEC=N-1 Lo **
|
||||
25 | 1 TestN.asm 25 | Code | 11 | | 1 | 00/0316 : 3A | dec A
|
||||
26 | 1 TestN.asm 26 | Code | 11 | | 2 | 00/0317 : 85 C2 | sta {$C2} ; N-1 Lo
|
||||
27 | 1 TestN.asm 27 | Comment | 11 | | 0 | 00/0319 | ** Set NDEC=N Hi **
|
||||
28 | 1 TestN.asm 28 | Code | 11 | | 2 | 00/0319 : A5 C5 | lda {$C4}+1
|
||||
29 | 1 TestN.asm 29 | Code | 11 | | 2 | 00/031B : 85 C3 | sta {$C2}+1 ; NHi = NDEC Hi
|
||||
30 | 1 TestN.asm 30 | Empty | 11 | | 0 | 00/031D |
|
||||
31 | 1 TestN.asm 31 | Code | 11 | | 3 | 00/031D : 4C 2B 03 | jmp ENTRY
|
||||
32 | 1 TestN.asm 32 | Empty | 11 | | 0 | 00/0320 |
|
||||
33 | 1 TestN.asm 33 | Comment | 11 | | 0 | 00/0320 | ** Set NDEC=N-1 Hi **
|
||||
34 | 1 TestN.asm 34 | Code | 11 | | 2 | 00/0320 : A5 C5 | HI lda {$C4}+1
|
||||
35 | 1 TestN.asm 35 | Empty | 11 | | 0 | 00/0322 |
|
||||
36 | 1 TestN.asm 36 | Code | 11 | | 2 | 00/0322 : F0 1F | beq DONE ; If also NHi =0 done
|
||||
37 | 1 TestN.asm 37 | Empty | 11 | | 0 | 00/0324 |
|
||||
38 | 1 TestN.asm 38 | Code | 11 | | 1 | 00/0324 : 3A | dec A
|
||||
39 | 1 TestN.asm 39 | Code | 11 | | 2 | 00/0325 : 85 C3 | sta {$C2}+1 ; N-1 Hi
|
||||
40 | 1 TestN.asm 40 | Empty | 11 | | 0 | 00/0327 |
|
||||
41 | 1 TestN.asm 41 | Code | 11 | | 2 | 00/0327 : A9 FF | lda #$FF
|
||||
42 | 1 TestN.asm 42 | Code | 11 | | 2 | 00/0329 : 85 C2 | sta {$C2} ; N-1 Lo = FF Set NDEC to FF
|
||||
43 | 1 TestN.asm 43 | Empty | 11 | | 0 | 00/032B |
|
||||
44 | 1 TestN.asm 44 | Code | 11 | | 1 | 00/032B : 18 | ENTRY clc
|
||||
45 | 1 TestN.asm 45 | Empty | 11 | | 0 | 00/032C |
|
||||
46 | 1 TestN.asm 46 | Code | 11 | | 2 | 00/032C : A5 C0 | lda {$C0} ; Lo Byte
|
||||
47 | 1 TestN.asm 47 | Code | 11 | | 2 | 00/032E : 65 C2 | adc {$C2} ; N+(N-1)
|
||||
48 | 1 TestN.asm 48 | Code | 11 | | 2 | 00/0330 : 85 C0 | sta {$C0}
|
||||
49 | 1 TestN.asm 49 | Empty | 11 | | 0 | 00/0332 |
|
||||
50 | 1 TestN.asm 50 | Code | 11 | | 2 | 00/0332 : A5 C1 | lda {$C0}+1 ; Hi Byte
|
||||
51 | 1 TestN.asm 51 | Code | 11 | | 2 | 00/0334 : 65 C3 | adc {$C2}+1 ; N+(N-1)
|
||||
52 | 1 TestN.asm 52 | Code | 11 | | 2 | 00/0336 : 85 C1 | sta {$C0}+1
|
||||
53 | 1 TestN.asm 53 | Empty | 11 | | 0 | 00/0338 |
|
||||
54 | 1 TestN.asm 54 | Comment | 11 | | 0 | 00/0338 | ** Update N=NDEC **
|
||||
55 | 1 TestN.asm 55 | Code | 11 | | 2 | 00/0338 : A5 C2 | lda {$C2}
|
||||
56 | 1 TestN.asm 56 | Code | 11 | | 2 | 00/033A : 85 C4 | sta {$C4}
|
||||
57 | 1 TestN.asm 57 | Code | 11 | | 2 | 00/033C : A5 C3 | lda {$C2}+1
|
||||
58 | 1 TestN.asm 58 | Code | 11 | | 2 | 00/033E : 85 C5 | sta {$C4}+1
|
||||
59 | 1 TestN.asm 59 | Empty | 11 | | 0 | 00/0340 |
|
||||
60 | 1 TestN.asm 60 | Code | 11 | | 3 | 00/0340 : 4C 12 03 | jmp LOOP
|
||||
61 | 1 TestN.asm 61 | Empty | 11 | | 0 | 00/0343 |
|
||||
62 | 1 TestN.asm 62 | Comment | 11 | | 0 | 00/0343 | ** Output Data **
|
||||
63 | 1 TestN.asm 63 | Code | 11 | | 2 | 00/0343 : A6 C0 | DONE ldx {$C0}
|
||||
64 | 1 TestN.asm 64 | Code | 11 | | 2 | 00/0345 : A4 C1 | ldy {$C0}+1
|
||||
65 | 1 TestN.asm 65 | Empty | 11 | | 0 | 00/0347 |
|
||||
66 | 1 TestN.asm 66 | Code | 11 | | 1 | 00/0347 : 60 | rts
|
||||
67 | 1 TestN.asm 67 | Empty | 11 | | 0 | 00/0348 |
|
||||
68 | 1 TestN.asm 68 | Empty | 11 | | 0 | 00/0348 |
|
||||
69 | 1 TestN.asm 69 | Comment | 11 | | 0 | 00/0348 | ** Input Dynamic Data append in the end of Unidisk routine **
|
||||
70 | 1 TestN.asm 70 | Data | 11 | | 1 | 00/0348 : FF | N1U dfb $FF
|
||||
71 | 1 TestN.asm 71 | Data | 11 | | 1 | 00/0349 : FF | dfb $FF
|
||||
------+---------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
BIN
AppleII/N integer adc 2 Byte/Unidrive3
Normal file
BIN
AppleII/N integer adc 2 Byte/Unidrive3
Normal file
Binary file not shown.
321
AppleII/N integer adc 2 Byte/Unidrive3.asm
Normal file
321
AppleII/N integer adc 2 Byte/Unidrive3.asm
Normal file
@ -0,0 +1,321 @@
|
||||
*
|
||||
* Unidisk 3.5 Calc3 <beta>
|
||||
*
|
||||
* The target of this project is to use the Unidisk 3.5 drive to perform
|
||||
* specific numerical routines: 2 Byte Add of the first N integer numbers calculation;
|
||||
* in order to use it as a Apple II co-processor unit.
|
||||
*
|
||||
* Copyright (C) 2015 Riccardo Greco <rigreco.grc@gmail.com>.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* @com.wudsn.ide.asm.hardware=APPLE2
|
||||
* Protocol Converter Call
|
||||
XC
|
||||
ZPTempL equ $0006 ;Temporary zero page storage
|
||||
ZPTempH equ $0007
|
||||
** Zero page storage **
|
||||
N1 equ $19 ;25
|
||||
* N2 equ $1B ;27
|
||||
RSLT equ $1D ;29
|
||||
*** Monitor routines ***
|
||||
COut equ $FDED ;Console output ASCII
|
||||
CROut equ $FD8E ;Carriage return
|
||||
** Command Code **
|
||||
StatusCmd equ 0
|
||||
** Status Code **
|
||||
* StatusDIB equ 3
|
||||
StatusUNI equ 5
|
||||
*
|
||||
ControlCmd equ 4
|
||||
** Control Codes **
|
||||
Eject equ 4
|
||||
Run equ 5
|
||||
SetDWLoad equ 6
|
||||
DWLoad equ 7
|
||||
*
|
||||
org $8000
|
||||
*****************************************************
|
||||
|
||||
*
|
||||
* Find a Protocol Converter in one of the slots.
|
||||
START jsr FindPC
|
||||
bcs Error
|
||||
*** Eject ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw E_JECT
|
||||
*** Set Address ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw SET_ADD
|
||||
*
|
||||
jsr EXEC ; Jump the Error routine
|
||||
rts
|
||||
*********************************************
|
||||
Error equ *
|
||||
*
|
||||
* There's either no PC around, or there was no give message
|
||||
*
|
||||
ldx #0
|
||||
err1 equ *
|
||||
lda Message,x
|
||||
beq errout
|
||||
jsr COut
|
||||
inx
|
||||
bne err1
|
||||
*
|
||||
errout equ *
|
||||
rts
|
||||
*
|
||||
Message asc 'NO PC OR NO DEVICE'
|
||||
dfb $8D,0
|
||||
*********************************************
|
||||
*
|
||||
** Set the Input Value first **
|
||||
EXEC lda N1
|
||||
sta $8111 ; Absolute addressing
|
||||
lda N1+1
|
||||
sta $8112
|
||||
*** Download ***
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw DOWNLOAD
|
||||
** Execute **
|
||||
jsr Dispatch
|
||||
dfb ControlCmd
|
||||
dw EXE
|
||||
READ jsr Dispatch
|
||||
dfb StatusCmd
|
||||
dw DParms
|
||||
bcs Error
|
||||
*
|
||||
**** Store Output results in //c ****
|
||||
*
|
||||
lda UNIX_reg
|
||||
sta RSLT ; Store the result
|
||||
lda UNIY_reg
|
||||
sta RSLT+1
|
||||
*
|
||||
rts
|
||||
|
||||
******************************************************
|
||||
FindPC equ *
|
||||
*
|
||||
* Search slot 7 to slot 1 looking for signature bytes
|
||||
*
|
||||
ldx #7 ;Do for seven slots
|
||||
lda #$C7
|
||||
sta ZPTempH
|
||||
lda #$00
|
||||
sta ZPTempL
|
||||
*
|
||||
newslot equ *
|
||||
ldy #7
|
||||
*
|
||||
again equ *
|
||||
lda (ZPTempL),y
|
||||
cmp sigtab,y ;One for byte signature
|
||||
beq maybe ;Found one signature byte
|
||||
dec ZPTempH
|
||||
dex
|
||||
bne newslot
|
||||
*
|
||||
* if we get here, no PC find
|
||||
sec
|
||||
rts
|
||||
*
|
||||
* if we get here, no byte find on PC
|
||||
maybe equ *
|
||||
dey
|
||||
dey ;if N=1 then all sig bytes OK
|
||||
bpl again
|
||||
* Found PC interface. Set up call address.
|
||||
* we already have high byte ($CN), we need low byte
|
||||
*
|
||||
foundPC equ *
|
||||
lda #$FF
|
||||
sta ZPTempL
|
||||
ldy #0 ;For indirect load
|
||||
lda (ZPTempL),y ;Get the byte
|
||||
*
|
||||
* Now the Acc has the low oreder ProDOS entry point.
|
||||
* The PC entry is three locations past this ...
|
||||
*
|
||||
clc
|
||||
adc #3
|
||||
sta ZPTempL
|
||||
*
|
||||
* Now ZPTempL has PC entry point.
|
||||
* Return with carry clear.
|
||||
*
|
||||
clc
|
||||
rts
|
||||
***********************************************************
|
||||
*
|
||||
* There are the PC signature bytes in their relative order.
|
||||
* The $FF bytes are filler bytes and are not compared.
|
||||
*
|
||||
sigtab dfb $FF,$20,$FF,$00
|
||||
dfb $FF,$03,$FF,$00
|
||||
*
|
||||
Dispatch equ *
|
||||
jmp (ZPTempL) ;Simulate an indirect JSR to PC
|
||||
*
|
||||
*** Status Parameter Set for UNI ***
|
||||
DParms equ *
|
||||
DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
DPUnit dfb 1
|
||||
DPBuffer dw UNI
|
||||
DPStatCode dfb StatusUNI
|
||||
*
|
||||
*
|
||||
*
|
||||
*** Status List UNI ***
|
||||
UNI equ *
|
||||
dfb 0
|
||||
UNIError dfb 0
|
||||
UNIRetries dfb 0
|
||||
UNIAcc_reg dfb 0
|
||||
UNIX_reg dfb 0
|
||||
UNIY_reg dfb 0
|
||||
UNIP_val dfb 0
|
||||
HHH dfb 0
|
||||
*
|
||||
*** Set Address ***
|
||||
SET_ADD equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST3
|
||||
dfb SetDWLoad
|
||||
*
|
||||
*** Download ***
|
||||
DOWNLOAD equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST4
|
||||
dfb DWLoad
|
||||
*
|
||||
*** Execute ***
|
||||
EXE equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST2
|
||||
dfb Run
|
||||
*** Eject ***
|
||||
E_JECT equ *
|
||||
dfb 3
|
||||
dfb 1
|
||||
dw CNTL_LIST1
|
||||
dfb Eject
|
||||
*
|
||||
******** CONTROL LISTS ********
|
||||
*
|
||||
*
|
||||
*** Eject ***
|
||||
CNTL_LIST1 equ *
|
||||
dw $0000
|
||||
*
|
||||
*** Execute ***
|
||||
CNTL_LIST2 equ *
|
||||
Clow_byte dfb $06
|
||||
Chigh_byte dfb $00
|
||||
AccValue dfb $00 ; Input Value
|
||||
X_reg dfb $00 ; Input Value (N1)
|
||||
Y_reg dfb $00 ; Input Value (N2)
|
||||
ProStatus dfb $00 ; Input Value
|
||||
LowPC_reg dfb $05 ; Like ORG
|
||||
HighPC_reg dfb $05
|
||||
*
|
||||
*** Set Address ***
|
||||
CNTL_LIST3 equ *
|
||||
CountL_byte dfb $02
|
||||
CountH_byte dfb $00
|
||||
LByte_Addr dfb $05 ; Like ORG
|
||||
HByte_Addr dfb $05
|
||||
*
|
||||
*** Download ***
|
||||
CNTL_LIST4 equ *
|
||||
LenghtL_byte dfb $4A ;<----- Lenght of Unidisk program Lo Byte
|
||||
LenghtH_byte dfb $00 ;<----- Lenght of Unidisk program Hi Byte
|
||||
*
|
||||
*** Start UNIDISK Program ***
|
||||
** Two byte adc **
|
||||
org $0505
|
||||
RSLTU equ $C0
|
||||
NDEC equ $C2
|
||||
N equ $C4
|
||||
|
||||
** Save the N number **
|
||||
lda N1U
|
||||
sta N
|
||||
lda N1U+1
|
||||
sta N+1
|
||||
** Set RSLTU=N **
|
||||
lda N
|
||||
sta RSLTU ; N Lo
|
||||
lda N+1
|
||||
sta RSLTU+1 ; N Hi
|
||||
|
||||
LOOP lda N
|
||||
|
||||
beq HI ; If NLo =0 dec NHi
|
||||
|
||||
** Set NDEC=N-1 Lo **
|
||||
dec A
|
||||
sta NDEC ; N-1 Lo
|
||||
** Set NDEC=N Hi **
|
||||
lda N+1
|
||||
sta NDEC+1 ; NHi = NDEC Hi
|
||||
|
||||
jmp ENTRY
|
||||
|
||||
** Set NDEC=N-1 Hi **
|
||||
HI lda N+1
|
||||
|
||||
beq DONE ; If also NHi =0 done
|
||||
|
||||
dec A
|
||||
sta NDEC+1 ; N-1 Hi
|
||||
|
||||
lda #$FF
|
||||
sta NDEC ; N-1 Lo = FF Set NDEC to FF
|
||||
|
||||
ENTRY clc
|
||||
|
||||
lda RSLTU ; Lo Byte
|
||||
adc NDEC ; N+(N-1)
|
||||
sta RSLTU
|
||||
|
||||
lda RSLTU+1 ; Hi Byte
|
||||
adc NDEC+1 ; N+(N-1)
|
||||
sta RSLTU+1
|
||||
|
||||
** Update N=NDEC **
|
||||
lda NDEC
|
||||
sta N
|
||||
lda NDEC+1
|
||||
sta N+1
|
||||
|
||||
jmp LOOP
|
||||
|
||||
** Output Data **
|
||||
DONE ldx RSLTU
|
||||
ldy RSLTU+1
|
||||
|
||||
rts
|
||||
|
||||
|
||||
** Input Dynamic Data append in the end of Unidisk routine **
|
||||
N1U dfb $00
|
||||
dfb $00
|
327
AppleII/N integer adc 2 Byte/Unidrive3_Output.txt
Normal file
327
AppleII/N integer adc 2 Byte/Unidrive3_Output.txt
Normal file
@ -0,0 +1,327 @@
|
||||
------+-------------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
Line | # File Line | Line Type | MX | Reloc | Size | Address Object Code | Source Code
|
||||
------+-------------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
||||
1 | 1 Unidrive3.asm 1 | Comment | 11 | | 0 | 00/8000 | * @com.wudsn.ide.asm.hardware=APPLE2
|
||||
2 | 1 Unidrive3.asm 2 | Comment | 11 | | 0 | 00/8000 | * Protocol Converter Call
|
||||
3 | 1 Unidrive3.asm 3 | Directive | 11 | | 0 | 00/8000 | XC
|
||||
4 | 1 Unidrive3.asm 4 | Equivalence | 11 | | 0 | 00/8000 | ZPTempL equ $0006 ;Temporary zero page storage
|
||||
5 | 1 Unidrive3.asm 5 | Equivalence | 11 | | 0 | 00/8000 | ZPTempH equ $0007
|
||||
6 | 1 Unidrive3.asm 6 | Comment | 11 | | 0 | 00/8000 | ** Zero page storage **
|
||||
7 | 1 Unidrive3.asm 7 | Equivalence | 11 | | 0 | 00/8000 | N1 equ $19 ;25
|
||||
8 | 1 Unidrive3.asm 8 | Comment | 11 | | 0 | 00/8000 | * N2 equ $1B ;27
|
||||
9 | 1 Unidrive3.asm 9 | Equivalence | 11 | | 0 | 00/8000 | RSLT equ $1D ;29
|
||||
10 | 1 Unidrive3.asm 10 | Comment | 11 | | 0 | 00/8000 | *** Monitor routines ***
|
||||
11 | 1 Unidrive3.asm 11 | Equivalence | 11 | | 0 | 00/8000 | COut equ $FDED ;Console output ASCII
|
||||
12 | 1 Unidrive3.asm 12 | Equivalence | 11 | | 0 | 00/8000 | CROut equ $FD8E ;Carriage return
|
||||
13 | 1 Unidrive3.asm 13 | Comment | 11 | | 0 | 00/8000 | ** Command Code **
|
||||
14 | 1 Unidrive3.asm 14 | Equivalence | 11 | | 0 | 00/8000 | StatusCmd equ 0
|
||||
15 | 1 Unidrive3.asm 15 | Comment | 11 | | 0 | 00/8000 | ** Status Code **
|
||||
16 | 1 Unidrive3.asm 16 | Comment | 11 | | 0 | 00/8000 | * StatusDIB equ 3
|
||||
17 | 1 Unidrive3.asm 17 | Equivalence | 11 | | 0 | 00/8000 | StatusUNI equ 5
|
||||
18 | 1 Unidrive3.asm 18 | Comment | 11 | | 0 | 00/8000 | *
|
||||
19 | 1 Unidrive3.asm 19 | Equivalence | 11 | | 0 | 00/8000 | ControlCmd equ 4
|
||||
20 | 1 Unidrive3.asm 20 | Comment | 11 | | 0 | 00/8000 | ** Control Codes **
|
||||
21 | 1 Unidrive3.asm 21 | Equivalence | 11 | | 0 | 00/8000 | Eject equ 4
|
||||
22 | 1 Unidrive3.asm 22 | Equivalence | 11 | | 0 | 00/8000 | Run equ 5
|
||||
23 | 1 Unidrive3.asm 23 | Equivalence | 11 | | 0 | 00/8000 | SetDWLoad equ 6
|
||||
24 | 1 Unidrive3.asm 24 | Equivalence | 11 | | 0 | 00/8000 | DWLoad equ 7
|
||||
25 | 1 Unidrive3.asm 25 | Comment | 11 | | 0 | 00/8000 | *
|
||||
26 | 1 Unidrive3.asm 26 | Directive | 11 | | 0 | 00/8000 | org $8000
|
||||
27 | 1 Unidrive3.asm 27 | Comment | 11 | | 0 | 00/8000 | *****************************************************
|
||||
28 | 1 Unidrive3.asm 28 | Empty | 11 | | 0 | 00/8000 |
|
||||
29 | 1 Unidrive3.asm 29 | Comment | 11 | | 0 | 00/8000 | *
|
||||
30 | 1 Unidrive3.asm 30 | Comment | 11 | | 0 | 00/8000 | * Find a Protocol Converter in one of the slots.
|
||||
31 | 1 Unidrive3.asm 31 | Code | 11 | | 3 | 00/8000 : 20 60 80 | START jsr {ozunid_4}
|
||||
32 | 1 Unidrive3.asm 32 | Code | 11 | | 2 | 00/8003 : B0 10 | bcs {ozunid_1}
|
||||
33 | 1 Unidrive3.asm 33 | Comment | 11 | | 0 | 00/8005 | *** Eject ***
|
||||
34 | 1 Unidrive3.asm 34 | Code | 11 | | 3 | 00/8005 : 20 95 80 | jsr {ozunid_9}
|
||||
35 | 1 Unidrive3.asm 35 | Data | 11 | | 1 | 00/8008 : 04 | dfb {4}
|
||||
36 | 1 Unidrive3.asm 36 | Data | 11 | | 2 | 00/8009 : B4 80 | dw {ozunid_15}
|
||||
37 | 1 Unidrive3.asm 37 | Comment | 11 | | 0 | 00/800B | *** Set Address ***
|
||||
38 | 1 Unidrive3.asm 38 | Code | 11 | | 3 | 00/800B : 20 95 80 | jsr {ozunid_9}
|
||||
39 | 1 Unidrive3.asm 39 | Data | 11 | | 1 | 00/800E : 04 | dfb {4}
|
||||
40 | 1 Unidrive3.asm 40 | Data | 11 | | 2 | 00/800F : A5 80 | dw {ozunid_12}
|
||||
41 | 1 Unidrive3.asm 41 | Comment | 11 | | 0 | 00/8011 | *
|
||||
42 | 1 Unidrive3.asm 42 | Code | 11 | | 3 | 00/8011 : 20 37 80 | jsr EXEC ; Jump the Error routine
|
||||
43 | 1 Unidrive3.asm 43 | Code | 11 | | 1 | 00/8014 : 60 | rts
|
||||
44 | 1 Unidrive3.asm 44 | Comment | 11 | | 0 | 00/8015 | *********************************************
|
||||
45 | 1 Unidrive3.asm 45 | Empty | 11 | | 0 | 00/8015 | ozunid_1
|
||||
46 | 1 Unidrive3.asm 45 | Equivalence | 11 | | 0 | 00/8015 | Error equ ozunid_1
|
||||
47 | 1 Unidrive3.asm 46 | Comment | 11 | | 0 | 00/8015 | *
|
||||
48 | 1 Unidrive3.asm 47 | Comment | 11 | | 0 | 00/8015 | * There's either no PC around, or there was no give message
|
||||
49 | 1 Unidrive3.asm 48 | Comment | 11 | | 0 | 00/8015 | *
|
||||
50 | 1 Unidrive3.asm 49 | Code | 11 | | 2 | 00/8015 : A2 00 | ldx #0
|
||||
51 | 1 Unidrive3.asm 50 | Empty | 11 | | 0 | 00/8017 | ozunid_2
|
||||
52 | 1 Unidrive3.asm 50 | Equivalence | 11 | | 0 | 00/8017 | err1 equ ozunid_2
|
||||
53 | 1 Unidrive3.asm 51 | Code | 11 | | 3 | 00/8017 : BD 23 80 | lda Message,x
|
||||
54 | 1 Unidrive3.asm 52 | Code | 11 | | 2 | 00/801A : F0 06 | beq {ozunid_3}
|
||||
55 | 1 Unidrive3.asm 53 | Code | 11 | | 3 | 00/801C : 20 ED FD | jsr {$FDED}
|
||||
56 | 1 Unidrive3.asm 54 | Code | 11 | | 1 | 00/801F : E8 | inx
|
||||
57 | 1 Unidrive3.asm 55 | Code | 11 | | 2 | 00/8020 : D0 F5 | bne {ozunid_2}
|
||||
58 | 1 Unidrive3.asm 56 | Comment | 11 | | 0 | 00/8022 | *
|
||||
59 | 1 Unidrive3.asm 57 | Empty | 11 | | 0 | 00/8022 | ozunid_3
|
||||
60 | 1 Unidrive3.asm 57 | Equivalence | 11 | | 0 | 00/8022 | errout equ ozunid_3
|
||||
61 | 1 Unidrive3.asm 58 | Code | 11 | | 1 | 00/8022 : 60 | rts
|
||||
62 | 1 Unidrive3.asm 59 | Comment | 11 | | 0 | 00/8023 | *
|
||||
63 | 1 Unidrive3.asm 60 | Data | 11 | | 18 | 00/8023 : 4E 4F 20 50 | Message asc 'NO PC OR NO DEVICE'
|
||||
| | | | | | 43 20 4F 52 |
|
||||
| | | | | | 20 4E 4F 20 |
|
||||
| | | | | | 44 45 56 49 |
|
||||
| | | | | | 43 45 |
|
||||
64 | 1 Unidrive3.asm 61 | Data | 11 | | 2 | 00/8035 : 8D 00 | dfb $8D,0
|
||||
65 | 1 Unidrive3.asm 62 | Comment | 11 | | 0 | 00/8037 | *********************************************
|
||||
66 | 1 Unidrive3.asm 63 | Comment | 11 | | 0 | 00/8037 | *
|
||||
67 | 1 Unidrive3.asm 64 | Comment | 11 | | 0 | 00/8037 | ** Set the Input Value first **
|
||||
68 | 1 Unidrive3.asm 65 | Code | 11 | | 2 | 00/8037 : A5 19 | EXEC lda {$19}
|
||||
69 | 1 Unidrive3.asm 66 | Code | 11 | | 3 | 00/8039 : 8D 11 81 | sta $8111 ; Absolute addressing
|
||||
70 | 1 Unidrive3.asm 67 | Code | 11 | | 2 | 00/803C : A5 1A | lda {$19}+1
|
||||
71 | 1 Unidrive3.asm 68 | Code | 11 | | 3 | 00/803E : 8D 12 81 | sta $8112
|
||||
72 | 1 Unidrive3.asm 69 | Comment | 11 | | 0 | 00/8041 | *** Download ***
|
||||
73 | 1 Unidrive3.asm 70 | Code | 11 | | 3 | 00/8041 : 20 95 80 | jsr {ozunid_9}
|
||||
74 | 1 Unidrive3.asm 71 | Data | 11 | | 1 | 00/8044 : 04 | dfb {4}
|
||||
75 | 1 Unidrive3.asm 72 | Data | 11 | | 2 | 00/8045 : AA 80 | dw {ozunid_13}
|
||||
76 | 1 Unidrive3.asm 73 | Comment | 11 | | 0 | 00/8047 | ** Execute **
|
||||
77 | 1 Unidrive3.asm 74 | Code | 11 | | 3 | 00/8047 : 20 95 80 | jsr {ozunid_9}
|
||||
78 | 1 Unidrive3.asm 75 | Data | 11 | | 1 | 00/804A : 04 | dfb {4}
|
||||
79 | 1 Unidrive3.asm 76 | Data | 11 | | 2 | 00/804B : AF 80 | dw {ozunid_14}
|
||||
80 | 1 Unidrive3.asm 77 | Code | 11 | | 3 | 00/804D : 20 95 80 | READ jsr {ozunid_9}
|
||||
81 | 1 Unidrive3.asm 78 | Data | 11 | | 1 | 00/8050 : 00 | dfb {0}
|
||||
82 | 1 Unidrive3.asm 79 | Data | 11 | | 2 | 00/8051 : 98 80 | dw {ozunid_10}
|
||||
83 | 1 Unidrive3.asm 80 | Code | 11 | | 2 | 00/8053 : B0 C0 | bcs {ozunid_1}
|
||||
84 | 1 Unidrive3.asm 81 | Comment | 11 | | 0 | 00/8055 | *
|
||||
85 | 1 Unidrive3.asm 82 | Comment | 11 | | 0 | 00/8055 | **** Store Output results in //c ****
|
||||
86 | 1 Unidrive3.asm 83 | Comment | 11 | | 0 | 00/8055 | *
|
||||
87 | 1 Unidrive3.asm 84 | Code | 11 | | 3 | 00/8055 : AD A1 80 | lda UNIX_reg
|
||||
88 | 1 Unidrive3.asm 85 | Code | 11 | | 2 | 00/8058 : 85 1D | sta {$1D} ; Store the result
|
||||
89 | 1 Unidrive3.asm 86 | Code | 11 | | 3 | 00/805A : AD A2 80 | lda UNIY_reg
|
||||
90 | 1 Unidrive3.asm 87 | Code | 11 | | 2 | 00/805D : 85 1E | sta {$1D}+1
|
||||
91 | 1 Unidrive3.asm 88 | Comment | 11 | | 0 | 00/805F | *
|
||||
92 | 1 Unidrive3.asm 89 | Code | 11 | | 1 | 00/805F : 60 | rts
|
||||
93 | 1 Unidrive3.asm 90 | Empty | 11 | | 0 | 00/8060 |
|
||||
94 | 1 Unidrive3.asm 91 | Comment | 11 | | 0 | 00/8060 | ******************************************************
|
||||
95 | 1 Unidrive3.asm 92 | Empty | 11 | | 0 | 00/8060 | ozunid_4
|
||||
96 | 1 Unidrive3.asm 92 | Equivalence | 11 | | 0 | 00/8060 | FindPC equ ozunid_4
|
||||
97 | 1 Unidrive3.asm 93 | Comment | 11 | | 0 | 00/8060 | *
|
||||
98 | 1 Unidrive3.asm 94 | Comment | 11 | | 0 | 00/8060 | * Search slot 7 to slot 1 looking for signature bytes
|
||||
99 | 1 Unidrive3.asm 95 | Comment | 11 | | 0 | 00/8060 | *
|
||||
100 | 1 Unidrive3.asm 96 | Code | 11 | | 2 | 00/8060 : A2 07 | ldx #7 ;Do for seven slots
|
||||
101 | 1 Unidrive3.asm 97 | Code | 11 | | 2 | 00/8062 : A9 C7 | lda #$C7
|
||||
102 | 1 Unidrive3.asm 98 | Code | 11 | | 2 | 00/8064 : 85 07 | sta {$0007}
|
||||
103 | 1 Unidrive3.asm 99 | Code | 11 | | 2 | 00/8066 : A9 00 | lda #$00
|
||||
104 | 1 Unidrive3.asm 100 | Code | 11 | | 2 | 00/8068 : 85 06 | sta {$0006}
|
||||
105 | 1 Unidrive3.asm 101 | Comment | 11 | | 0 | 00/806A | *
|
||||
106 | 1 Unidrive3.asm 102 | Empty | 11 | | 0 | 00/806A | ozunid_5
|
||||
107 | 1 Unidrive3.asm 102 | Equivalence | 11 | | 0 | 00/806A | newslot equ ozunid_5
|
||||
108 | 1 Unidrive3.asm 103 | Code | 11 | | 2 | 00/806A : A0 07 | ldy #7
|
||||
109 | 1 Unidrive3.asm 104 | Comment | 11 | | 0 | 00/806C | *
|
||||
110 | 1 Unidrive3.asm 105 | Empty | 11 | | 0 | 00/806C | ozunid_6
|
||||
111 | 1 Unidrive3.asm 105 | Equivalence | 11 | | 0 | 00/806C | again equ ozunid_6
|
||||
112 | 1 Unidrive3.asm 106 | Code | 11 | | 2 | 00/806C : B1 06 | lda ({$0006}),y
|
||||
113 | 1 Unidrive3.asm 107 | Code | 11 | | 3 | 00/806E : D9 8D 80 | cmp sigtab,y ;One for byte signature
|
||||
114 | 1 Unidrive3.asm 108 | Code | 11 | | 2 | 00/8071 : F0 07 | beq {ozunid_7} ;Found one signature byte
|
||||
115 | 1 Unidrive3.asm 109 | Code | 11 | | 2 | 00/8073 : C6 07 | dec {$0007}
|
||||
116 | 1 Unidrive3.asm 110 | Code | 11 | | 1 | 00/8075 : CA | dex
|
||||
117 | 1 Unidrive3.asm 111 | Code | 11 | | 2 | 00/8076 : D0 F2 | bne {ozunid_5}
|
||||
118 | 1 Unidrive3.asm 112 | Comment | 11 | | 0 | 00/8078 | *
|
||||
119 | 1 Unidrive3.asm 113 | Comment | 11 | | 0 | 00/8078 | * if we get here, no PC find
|
||||
120 | 1 Unidrive3.asm 114 | Code | 11 | | 1 | 00/8078 : 38 | sec
|
||||
121 | 1 Unidrive3.asm 115 | Code | 11 | | 1 | 00/8079 : 60 | rts
|
||||
122 | 1 Unidrive3.asm 116 | Comment | 11 | | 0 | 00/807A | *
|
||||
123 | 1 Unidrive3.asm 117 | Comment | 11 | | 0 | 00/807A | * if we get here, no byte find on PC
|
||||
124 | 1 Unidrive3.asm 118 | Empty | 11 | | 0 | 00/807A | ozunid_7
|
||||
125 | 1 Unidrive3.asm 118 | Equivalence | 11 | | 0 | 00/807A | maybe equ ozunid_7
|
||||
126 | 1 Unidrive3.asm 119 | Code | 11 | | 1 | 00/807A : 88 | dey
|
||||
127 | 1 Unidrive3.asm 120 | Code | 11 | | 1 | 00/807B : 88 | dey ;if N=1 then all sig bytes OK
|
||||
128 | 1 Unidrive3.asm 121 | Code | 11 | | 2 | 00/807C : 10 EE | bpl {ozunid_6}
|
||||
129 | 1 Unidrive3.asm 122 | Comment | 11 | | 0 | 00/807E | * Found PC interface. Set up call address.
|
||||
130 | 1 Unidrive3.asm 123 | Comment | 11 | | 0 | 00/807E | * we already have high byte ($CN), we need low byte
|
||||
131 | 1 Unidrive3.asm 124 | Comment | 11 | | 0 | 00/807E | *
|
||||
132 | 1 Unidrive3.asm 125 | Empty | 11 | | 0 | 00/807E | ozunid_8
|
||||
133 | 1 Unidrive3.asm 125 | Equivalence | 11 | | 0 | 00/807E | foundPC equ ozunid_8
|
||||
134 | 1 Unidrive3.asm 126 | Code | 11 | | 2 | 00/807E : A9 FF | lda #$FF
|
||||
135 | 1 Unidrive3.asm 127 | Code | 11 | | 2 | 00/8080 : 85 06 | sta {$0006}
|
||||
136 | 1 Unidrive3.asm 128 | Code | 11 | | 2 | 00/8082 : A0 00 | ldy #0 ;For indirect load
|
||||
137 | 1 Unidrive3.asm 129 | Code | 11 | | 2 | 00/8084 : B1 06 | lda ({$0006}),y ;Get the byte
|
||||
138 | 1 Unidrive3.asm 130 | Comment | 11 | | 0 | 00/8086 | *
|
||||
139 | 1 Unidrive3.asm 131 | Comment | 11 | | 0 | 00/8086 | * Now the Acc has the low oreder ProDOS entry point.
|
||||
140 | 1 Unidrive3.asm 132 | Comment | 11 | | 0 | 00/8086 | * The PC entry is three locations past this ...
|
||||
141 | 1 Unidrive3.asm 133 | Comment | 11 | | 0 | 00/8086 | *
|
||||
142 | 1 Unidrive3.asm 134 | Code | 11 | | 1 | 00/8086 : 18 | clc
|
||||
143 | 1 Unidrive3.asm 135 | Code | 11 | | 2 | 00/8087 : 69 03 | adc #3
|
||||
144 | 1 Unidrive3.asm 136 | Code | 11 | | 2 | 00/8089 : 85 06 | sta {$0006}
|
||||
145 | 1 Unidrive3.asm 137 | Comment | 11 | | 0 | 00/808B | *
|
||||
146 | 1 Unidrive3.asm 138 | Comment | 11 | | 0 | 00/808B | * Now ZPTempL has PC entry point.
|
||||
147 | 1 Unidrive3.asm 139 | Comment | 11 | | 0 | 00/808B | * Return with carry clear.
|
||||
148 | 1 Unidrive3.asm 140 | Comment | 11 | | 0 | 00/808B | *
|
||||
149 | 1 Unidrive3.asm 141 | Code | 11 | | 1 | 00/808B : 18 | clc
|
||||
150 | 1 Unidrive3.asm 142 | Code | 11 | | 1 | 00/808C : 60 | rts
|
||||
151 | 1 Unidrive3.asm 143 | Comment | 11 | | 0 | 00/808D | ***********************************************************
|
||||
152 | 1 Unidrive3.asm 144 | Comment | 11 | | 0 | 00/808D | *
|
||||
153 | 1 Unidrive3.asm 145 | Comment | 11 | | 0 | 00/808D | * There are the PC signature bytes in their relative order.
|
||||
154 | 1 Unidrive3.asm 146 | Comment | 11 | | 0 | 00/808D | * The $FF bytes are filler bytes and are not compared.
|
||||
155 | 1 Unidrive3.asm 147 | Comment | 11 | | 0 | 00/808D | *
|
||||
156 | 1 Unidrive3.asm 148 | Data | 11 | | 4 | 00/808D : FF 20 FF 00 | sigtab dfb $FF,$20,$FF,$00
|
||||
157 | 1 Unidrive3.asm 149 | Data | 11 | | 4 | 00/8091 : FF 03 FF 00 | dfb $FF,$03,$FF,$00
|
||||
158 | 1 Unidrive3.asm 150 | Comment | 11 | | 0 | 00/8095 | *
|
||||
159 | 1 Unidrive3.asm 151 | Empty | 11 | | 0 | 00/8095 | ozunid_9
|
||||
160 | 1 Unidrive3.asm 151 | Equivalence | 11 | | 0 | 00/8095 | Dispatch equ ozunid_9
|
||||
161 | 1 Unidrive3.asm 152 | Code | 11 | | 3 | 00/8095 : 6C 06 00 | jmp ({$0006}) ;Simulate an indirect JSR to PC
|
||||
162 | 1 Unidrive3.asm 153 | Comment | 11 | | 0 | 00/8098 | *
|
||||
163 | 1 Unidrive3.asm 154 | Comment | 11 | | 0 | 00/8098 | *** Status Parameter Set for UNI ***
|
||||
164 | 1 Unidrive3.asm 155 | Empty | 11 | | 0 | 00/8098 | ozunid_10
|
||||
165 | 1 Unidrive3.asm 155 | Equivalence | 11 | | 0 | 00/8098 | DParms equ ozunid_10
|
||||
166 | 1 Unidrive3.asm 156 | Data | 11 | | 1 | 00/8098 : 03 | DPParmsCt dfb 3 ;Status calls have three parameters
|
||||
167 | 1 Unidrive3.asm 157 | Data | 11 | | 1 | 00/8099 : 01 | DPUnit dfb 1
|
||||
168 | 1 Unidrive3.asm 158 | Data | 11 | | 2 | 00/809A : 9D 80 | DPBuffer dw {ozunid_11}
|
||||
169 | 1 Unidrive3.asm 159 | Data | 11 | | 1 | 00/809C : 05 | DPStatCode dfb {5}
|
||||
170 | 1 Unidrive3.asm 160 | Comment | 11 | | 0 | 00/809D | *
|
||||
171 | 1 Unidrive3.asm 161 | Comment | 11 | | 0 | 00/809D | *
|
||||
172 | 1 Unidrive3.asm 162 | Comment | 11 | | 0 | 00/809D | *
|
||||
173 | 1 Unidrive3.asm 163 | Comment | 11 | | 0 | 00/809D | *** Status List UNI ***
|
||||
174 | 1 Unidrive3.asm 164 | Empty | 11 | | 0 | 00/809D | ozunid_11
|
||||
175 | 1 Unidrive3.asm 164 | Equivalence | 11 | | 0 | 00/809D | UNI equ ozunid_11
|
||||
176 | 1 Unidrive3.asm 165 | Data | 11 | | 1 | 00/809D : 00 | dfb 0
|
||||
177 | 1 Unidrive3.asm 166 | Data | 11 | | 1 | 00/809E : 00 | UNIError dfb 0
|
||||
178 | 1 Unidrive3.asm 167 | Data | 11 | | 1 | 00/809F : 00 | UNIRetries dfb 0
|
||||
179 | 1 Unidrive3.asm 168 | Data | 11 | | 1 | 00/80A0 : 00 | UNIAcc_reg dfb 0
|
||||
180 | 1 Unidrive3.asm 169 | Data | 11 | | 1 | 00/80A1 : 00 | UNIX_reg dfb 0
|
||||
181 | 1 Unidrive3.asm 170 | Data | 11 | | 1 | 00/80A2 : 00 | UNIY_reg dfb 0
|
||||
182 | 1 Unidrive3.asm 171 | Data | 11 | | 1 | 00/80A3 : 00 | UNIP_val dfb 0
|
||||
183 | 1 Unidrive3.asm 172 | Data | 11 | | 1 | 00/80A4 : 00 | HHH dfb 0
|
||||
184 | 1 Unidrive3.asm 173 | Comment | 11 | | 0 | 00/80A5 | *
|
||||
185 | 1 Unidrive3.asm 174 | Comment | 11 | | 0 | 00/80A5 | *** Set Address ***
|
||||
186 | 1 Unidrive3.asm 175 | Empty | 11 | | 0 | 00/80A5 | ozunid_12
|
||||
187 | 1 Unidrive3.asm 175 | Equivalence | 11 | | 0 | 00/80A5 | SET_ADD equ ozunid_12
|
||||
188 | 1 Unidrive3.asm 176 | Data | 11 | | 1 | 00/80A5 : 03 | dfb 3
|
||||
189 | 1 Unidrive3.asm 177 | Data | 11 | | 1 | 00/80A6 : 01 | dfb 1
|
||||
190 | 1 Unidrive3.asm 178 | Data | 11 | | 2 | 00/80A7 : C3 80 | dw {ozunid_18}
|
||||
191 | 1 Unidrive3.asm 179 | Data | 11 | | 1 | 00/80A9 : 06 | dfb {6}
|
||||
192 | 1 Unidrive3.asm 180 | Comment | 11 | | 0 | 00/80AA | *
|
||||
193 | 1 Unidrive3.asm 181 | Comment | 11 | | 0 | 00/80AA | *** Download ***
|
||||
194 | 1 Unidrive3.asm 182 | Empty | 11 | | 0 | 00/80AA | ozunid_13
|
||||
195 | 1 Unidrive3.asm 182 | Equivalence | 11 | | 0 | 00/80AA | DOWNLOAD equ ozunid_13
|
||||
196 | 1 Unidrive3.asm 183 | Data | 11 | | 1 | 00/80AA : 03 | dfb 3
|
||||
197 | 1 Unidrive3.asm 184 | Data | 11 | | 1 | 00/80AB : 01 | dfb 1
|
||||
198 | 1 Unidrive3.asm 185 | Data | 11 | | 2 | 00/80AC : C7 80 | dw {ozunid_19}
|
||||
199 | 1 Unidrive3.asm 186 | Data | 11 | | 1 | 00/80AE : 07 | dfb {7}
|
||||
200 | 1 Unidrive3.asm 187 | Comment | 11 | | 0 | 00/80AF | *
|
||||
201 | 1 Unidrive3.asm 188 | Comment | 11 | | 0 | 00/80AF | *** Execute ***
|
||||
202 | 1 Unidrive3.asm 189 | Empty | 11 | | 0 | 00/80AF | ozunid_14
|
||||
203 | 1 Unidrive3.asm 189 | Equivalence | 11 | | 0 | 00/80AF | EXE equ ozunid_14
|
||||
204 | 1 Unidrive3.asm 190 | Data | 11 | | 1 | 00/80AF : 03 | dfb 3
|
||||
205 | 1 Unidrive3.asm 191 | Data | 11 | | 1 | 00/80B0 : 01 | dfb 1
|
||||
206 | 1 Unidrive3.asm 192 | Data | 11 | | 2 | 00/80B1 : BB 80 | dw {ozunid_17}
|
||||
207 | 1 Unidrive3.asm 193 | Data | 11 | | 1 | 00/80B3 : 05 | dfb {5}
|
||||
208 | 1 Unidrive3.asm 194 | Comment | 11 | | 0 | 00/80B4 | *** Eject ***
|
||||
209 | 1 Unidrive3.asm 195 | Empty | 11 | | 0 | 00/80B4 | ozunid_15
|
||||
210 | 1 Unidrive3.asm 195 | Equivalence | 11 | | 0 | 00/80B4 | E_JECT equ ozunid_15
|
||||
211 | 1 Unidrive3.asm 196 | Data | 11 | | 1 | 00/80B4 : 03 | dfb 3
|
||||
212 | 1 Unidrive3.asm 197 | Data | 11 | | 1 | 00/80B5 : 01 | dfb 1
|
||||
213 | 1 Unidrive3.asm 198 | Data | 11 | | 2 | 00/80B6 : B9 80 | dw {ozunid_16}
|
||||
214 | 1 Unidrive3.asm 199 | Data | 11 | | 1 | 00/80B8 : 04 | dfb {4}
|
||||
215 | 1 Unidrive3.asm 200 | Comment | 11 | | 0 | 00/80B9 | *
|
||||
216 | 1 Unidrive3.asm 201 | Comment | 11 | | 0 | 00/80B9 | ******** CONTROL LISTS ********
|
||||
217 | 1 Unidrive3.asm 202 | Comment | 11 | | 0 | 00/80B9 | *
|
||||
218 | 1 Unidrive3.asm 203 | Comment | 11 | | 0 | 00/80B9 | *
|
||||
219 | 1 Unidrive3.asm 204 | Comment | 11 | | 0 | 00/80B9 | *** Eject ***
|
||||
220 | 1 Unidrive3.asm 205 | Empty | 11 | | 0 | 00/80B9 | ozunid_16
|
||||
221 | 1 Unidrive3.asm 205 | Equivalence | 11 | | 0 | 00/80B9 | CNTL_LIST1 equ ozunid_16
|
||||
222 | 1 Unidrive3.asm 206 | Data | 11 | | 2 | 00/80B9 : 00 00 | dw $0000
|
||||
223 | 1 Unidrive3.asm 207 | Comment | 11 | | 0 | 00/80BB | *
|
||||
224 | 1 Unidrive3.asm 208 | Comment | 11 | | 0 | 00/80BB | *** Execute ***
|
||||
225 | 1 Unidrive3.asm 209 | Empty | 11 | | 0 | 00/80BB | ozunid_17
|
||||
226 | 1 Unidrive3.asm 209 | Equivalence | 11 | | 0 | 00/80BB | CNTL_LIST2 equ ozunid_17
|
||||
227 | 1 Unidrive3.asm 210 | Data | 11 | | 1 | 00/80BB : 06 | Clow_byte dfb $06
|
||||
228 | 1 Unidrive3.asm 211 | Data | 11 | | 1 | 00/80BC : 00 | Chigh_byte dfb $00
|
||||
229 | 1 Unidrive3.asm 212 | Data | 11 | | 1 | 00/80BD : 00 | AccValue dfb $00 ; Input Value
|
||||
230 | 1 Unidrive3.asm 213 | Data | 11 | | 1 | 00/80BE : 00 | X_reg dfb $00 ; Input Value (N1)
|
||||
231 | 1 Unidrive3.asm 214 | Data | 11 | | 1 | 00/80BF : 00 | Y_reg dfb $00 ; Input Value (N2)
|
||||
232 | 1 Unidrive3.asm 215 | Data | 11 | | 1 | 00/80C0 : 00 | ProStatus dfb $00 ; Input Value
|
||||
233 | 1 Unidrive3.asm 216 | Data | 11 | | 1 | 00/80C1 : 05 | LowPC_reg dfb $05 ; Like ORG
|
||||
234 | 1 Unidrive3.asm 217 | Data | 11 | | 1 | 00/80C2 : 05 | HighPC_reg dfb $05
|
||||
235 | 1 Unidrive3.asm 218 | Comment | 11 | | 0 | 00/80C3 | *
|
||||
236 | 1 Unidrive3.asm 219 | Comment | 11 | | 0 | 00/80C3 | *** Set Address ***
|
||||
237 | 1 Unidrive3.asm 220 | Empty | 11 | | 0 | 00/80C3 | ozunid_18
|
||||
238 | 1 Unidrive3.asm 220 | Equivalence | 11 | | 0 | 00/80C3 | CNTL_LIST3 equ ozunid_18
|
||||
239 | 1 Unidrive3.asm 221 | Data | 11 | | 1 | 00/80C3 : 02 | CountL_byte dfb $02
|
||||
240 | 1 Unidrive3.asm 222 | Data | 11 | | 1 | 00/80C4 : 00 | CountH_byte dfb $00
|
||||
241 | 1 Unidrive3.asm 223 | Data | 11 | | 1 | 00/80C5 : 05 | LByte_Addr dfb $05 ; Like ORG
|
||||
242 | 1 Unidrive3.asm 224 | Data | 11 | | 1 | 00/80C6 : 05 | HByte_Addr dfb $05
|
||||
243 | 1 Unidrive3.asm 225 | Comment | 11 | | 0 | 00/80C7 | *
|
||||
244 | 1 Unidrive3.asm 226 | Comment | 11 | | 0 | 00/80C7 | *** Download ***
|
||||
245 | 1 Unidrive3.asm 227 | Empty | 11 | | 0 | 00/80C7 | ozunid_19
|
||||
246 | 1 Unidrive3.asm 227 | Equivalence | 11 | | 0 | 00/80C7 | CNTL_LIST4 equ ozunid_19
|
||||
247 | 1 Unidrive3.asm 228 | Data | 11 | | 1 | 00/80C7 : 4A | LenghtL_byte dfb $4A ;<----- Lenght of Unidisk program Lo Byte
|
||||
248 | 1 Unidrive3.asm 229 | Data | 11 | | 1 | 00/80C8 : 00 | LenghtH_byte dfb $00 ;<----- Lenght of Unidisk program Hi Byte
|
||||
249 | 1 Unidrive3.asm 230 | Comment | 11 | | 0 | 00/80C9 | *
|
||||
250 | 1 Unidrive3.asm 231 | Comment | 11 | | 0 | 00/80C9 | *** Start UNIDISK Program ***
|
||||
251 | 1 Unidrive3.asm 232 | Comment | 11 | | 0 | 00/80C9 | ** Two byte adc **
|
||||
252 | 1 Unidrive3.asm 233 | Directive | 11 | | 0 | 00/80C9 | org $0505
|
||||
253 | 1 Unidrive3.asm 234 | Equivalence | 11 | | 0 | 00/0505 | RSLTU equ $C0
|
||||
254 | 1 Unidrive3.asm 235 | Equivalence | 11 | | 0 | 00/0505 | NDEC equ $C2
|
||||
255 | 1 Unidrive3.asm 236 | Equivalence | 11 | | 0 | 00/0505 | N equ $C4
|
||||
256 | 1 Unidrive3.asm 237 | Empty | 11 | | 0 | 00/0505 |
|
||||
257 | 1 Unidrive3.asm 238 | Comment | 11 | | 0 | 00/0505 | ** Save the N number **
|
||||
258 | 1 Unidrive3.asm 239 | Code | 11 | | 3 | 00/0505 : AD 4D 05 | lda N1U
|
||||
259 | 1 Unidrive3.asm 240 | Code | 11 | | 2 | 00/0508 : 85 C4 | sta {$C4}
|
||||
260 | 1 Unidrive3.asm 241 | Code | 11 | | 3 | 00/050A : AD 4E 05 | lda N1U+1
|
||||
261 | 1 Unidrive3.asm 242 | Code | 11 | | 2 | 00/050D : 85 C5 | sta {$C4}+1
|
||||
262 | 1 Unidrive3.asm 243 | Comment | 11 | | 0 | 00/050F | ** Set RSLTU=N **
|
||||
263 | 1 Unidrive3.asm 244 | Code | 11 | | 2 | 00/050F : A5 C4 | lda {$C4}
|
||||
264 | 1 Unidrive3.asm 245 | Code | 11 | | 2 | 00/0511 : 85 C0 | sta {$C0} ; N Lo
|
||||
265 | 1 Unidrive3.asm 246 | Code | 11 | | 2 | 00/0513 : A5 C5 | lda {$C4}+1
|
||||
266 | 1 Unidrive3.asm 247 | Code | 11 | | 2 | 00/0515 : 85 C1 | sta {$C0}+1 ; N Hi
|
||||
267 | 1 Unidrive3.asm 248 | Empty | 11 | | 0 | 00/0517 |
|
||||
268 | 1 Unidrive3.asm 249 | Code | 11 | | 2 | 00/0517 : A5 C4 | LOOP lda {$C4}
|
||||
269 | 1 Unidrive3.asm 250 | Empty | 11 | | 0 | 00/0519 |
|
||||
270 | 1 Unidrive3.asm 251 | Code | 11 | | 2 | 00/0519 : F0 0A | beq HI ; If NLo =0 dec NHi
|
||||
271 | 1 Unidrive3.asm 252 | Empty | 11 | | 0 | 00/051B |
|
||||
272 | 1 Unidrive3.asm 253 | Comment | 11 | | 0 | 00/051B | ** Set NDEC=N-1 Lo **
|
||||
273 | 1 Unidrive3.asm 254 | Code | 11 | | 1 | 00/051B : 3A | dec A
|
||||
274 | 1 Unidrive3.asm 255 | Code | 11 | | 2 | 00/051C : 85 C2 | sta {$C2} ; N-1 Lo
|
||||
275 | 1 Unidrive3.asm 256 | Comment | 11 | | 0 | 00/051E | ** Set NDEC=N Hi **
|
||||
276 | 1 Unidrive3.asm 257 | Code | 11 | | 2 | 00/051E : A5 C5 | lda {$C4}+1
|
||||
277 | 1 Unidrive3.asm 258 | Code | 11 | | 2 | 00/0520 : 85 C3 | sta {$C2}+1 ; NHi = NDEC Hi
|
||||
278 | 1 Unidrive3.asm 259 | Empty | 11 | | 0 | 00/0522 |
|
||||
279 | 1 Unidrive3.asm 260 | Code | 11 | | 3 | 00/0522 : 4C 30 05 | jmp ENTRY
|
||||
280 | 1 Unidrive3.asm 261 | Empty | 11 | | 0 | 00/0525 |
|
||||
281 | 1 Unidrive3.asm 262 | Comment | 11 | | 0 | 00/0525 | ** Set NDEC=N-1 Hi **
|
||||
282 | 1 Unidrive3.asm 263 | Code | 11 | | 2 | 00/0525 : A5 C5 | HI lda {$C4}+1
|
||||
283 | 1 Unidrive3.asm 264 | Empty | 11 | | 0 | 00/0527 |
|
||||
284 | 1 Unidrive3.asm 265 | Code | 11 | | 2 | 00/0527 : F0 1F | beq DONE ; If also NHi =0 done
|
||||
285 | 1 Unidrive3.asm 266 | Empty | 11 | | 0 | 00/0529 |
|
||||
286 | 1 Unidrive3.asm 267 | Code | 11 | | 1 | 00/0529 : 3A | dec A
|
||||
287 | 1 Unidrive3.asm 268 | Code | 11 | | 2 | 00/052A : 85 C3 | sta {$C2}+1 ; N-1 Hi
|
||||
288 | 1 Unidrive3.asm 269 | Empty | 11 | | 0 | 00/052C |
|
||||
289 | 1 Unidrive3.asm 270 | Code | 11 | | 2 | 00/052C : A9 FF | lda #$FF
|
||||
290 | 1 Unidrive3.asm 271 | Code | 11 | | 2 | 00/052E : 85 C2 | sta {$C2} ; N-1 Lo = FF Set NDEC to FF
|
||||
291 | 1 Unidrive3.asm 272 | Empty | 11 | | 0 | 00/0530 |
|
||||
292 | 1 Unidrive3.asm 273 | Code | 11 | | 1 | 00/0530 : 18 | ENTRY clc
|
||||
293 | 1 Unidrive3.asm 274 | Empty | 11 | | 0 | 00/0531 |
|
||||
294 | 1 Unidrive3.asm 275 | Code | 11 | | 2 | 00/0531 : A5 C0 | lda {$C0} ; Lo Byte
|
||||
295 | 1 Unidrive3.asm 276 | Code | 11 | | 2 | 00/0533 : 65 C2 | adc {$C2} ; N+(N-1)
|
||||
296 | 1 Unidrive3.asm 277 | Code | 11 | | 2 | 00/0535 : 85 C0 | sta {$C0}
|
||||
297 | 1 Unidrive3.asm 278 | Empty | 11 | | 0 | 00/0537 |
|
||||
298 | 1 Unidrive3.asm 279 | Code | 11 | | 2 | 00/0537 : A5 C1 | lda {$C0}+1 ; Hi Byte
|
||||
299 | 1 Unidrive3.asm 280 | Code | 11 | | 2 | 00/0539 : 65 C3 | adc {$C2}+1 ; N+(N-1)
|
||||
300 | 1 Unidrive3.asm 281 | Code | 11 | | 2 | 00/053B : 85 C1 | sta {$C0}+1
|
||||
301 | 1 Unidrive3.asm 282 | Empty | 11 | | 0 | 00/053D |
|
||||
302 | 1 Unidrive3.asm 283 | Comment | 11 | | 0 | 00/053D | ** Update N=NDEC **
|
||||
303 | 1 Unidrive3.asm 284 | Code | 11 | | 2 | 00/053D : A5 C2 | lda {$C2}
|
||||
304 | 1 Unidrive3.asm 285 | Code | 11 | | 2 | 00/053F : 85 C4 | sta {$C4}
|
||||
305 | 1 Unidrive3.asm 286 | Code | 11 | | 2 | 00/0541 : A5 C3 | lda {$C2}+1
|
||||
306 | 1 Unidrive3.asm 287 | Code | 11 | | 2 | 00/0543 : 85 C5 | sta {$C4}+1
|
||||
307 | 1 Unidrive3.asm 288 | Empty | 11 | | 0 | 00/0545 |
|
||||
308 | 1 Unidrive3.asm 289 | Code | 11 | | 3 | 00/0545 : 4C 17 05 | jmp LOOP
|
||||
309 | 1 Unidrive3.asm 290 | Empty | 11 | | 0 | 00/0548 |
|
||||
310 | 1 Unidrive3.asm 291 | Comment | 11 | | 0 | 00/0548 | ** Output Data **
|
||||
311 | 1 Unidrive3.asm 292 | Code | 11 | | 2 | 00/0548 : A6 C0 | DONE ldx {$C0}
|
||||
312 | 1 Unidrive3.asm 293 | Code | 11 | | 2 | 00/054A : A4 C1 | ldy {$C0}+1
|
||||
313 | 1 Unidrive3.asm 294 | Empty | 11 | | 0 | 00/054C |
|
||||
314 | 1 Unidrive3.asm 295 | Code | 11 | | 1 | 00/054C : 60 | rts
|
||||
315 | 1 Unidrive3.asm 296 | Empty | 11 | | 0 | 00/054D |
|
||||
316 | 1 Unidrive3.asm 297 | Empty | 11 | | 0 | 00/054D |
|
||||
317 | 1 Unidrive3.asm 298 | Comment | 11 | | 0 | 00/054D | ** Input Dynamic Data append in the end of Unidisk routine **
|
||||
318 | 1 Unidrive3.asm 299 | Data | 11 | | 1 | 00/054D : 00 | N1U dfb $00
|
||||
319 | 1 Unidrive3.asm 300 | Data | 11 | | 1 | 00/054E : 00 | dfb $00
|
||||
------+-------------------------+-------------+----+---------+------+-----------------------+-------------------------------------------------------------------
|
Loading…
x
Reference in New Issue
Block a user