mirror of
https://github.com/A2osX/A2osX.git
synced 2025-02-16 18:30:26 +00:00
Kernel 0.93+
This commit is contained in:
parent
5d0ce8f1e4
commit
f1797cca6f
Binary file not shown.
311
BIN/CMP.S.txt
Normal file
311
BIN/CMP.S.txt
Normal file
@ -0,0 +1,311 @@
|
||||
NEW
|
||||
AUTO 3,1
|
||||
.LIST OFF
|
||||
.OP 65C02
|
||||
.OR $2000
|
||||
.TF BIN/CMP
|
||||
*--------------------------------------
|
||||
.INB INC/MACROS.I
|
||||
.INB INC/A2OSX.I
|
||||
.INB INC/MLI.I
|
||||
.INB INC/MLI.E.I
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR ZPBIN
|
||||
ZS.START
|
||||
ArgIndex .BS 1
|
||||
ZPPTR1 .BS 2
|
||||
|
||||
bPause .BS 1
|
||||
bAll .BS 1
|
||||
bVerbose .BS 1
|
||||
bDiff .BS 1
|
||||
|
||||
hFile1 .BS 1
|
||||
hBuf1 .BS 1
|
||||
ZPBufPtr1 .BS 2
|
||||
bSkip1 .BS 1
|
||||
hFile2 .BS 1
|
||||
hBuf2 .BS 1
|
||||
ZPBufPtr2 .BS 2
|
||||
bSkip2 .BS 1
|
||||
|
||||
Offset .BS 2
|
||||
|
||||
BufCnt .BS 2
|
||||
ZS.END .ED
|
||||
*--------------------------------------
|
||||
* File Header (16 Bytes)
|
||||
*--------------------------------------
|
||||
CS.START cld
|
||||
jmp (.1,x)
|
||||
.DA #$61 6502,Level 1 (65c02)
|
||||
.DA #1 BIN Layout Version 1
|
||||
.DA #S.PS.F.EVENT S.PS.F
|
||||
.DA #0
|
||||
.DA CS.END-CS.START CS
|
||||
.DA DS.END-DS.START DS
|
||||
.DA #64 SS
|
||||
.DA #ZS.END-ZS.START Zero Page Size
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
* Relocation Table
|
||||
*--------------------------------------
|
||||
.1 .DA CS.INIT
|
||||
.DA CS.RUN
|
||||
.DA CS.DOEVENT
|
||||
.DA CS.QUIT
|
||||
L.MSG.USAGE .DA MSG.USAGE
|
||||
L.MSG.DIFF .DA MSG.DIFF
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
CS.INIT clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN
|
||||
.1 inc ArgIndex
|
||||
lda ArgIndex
|
||||
>SYSCALL ArgV
|
||||
bcs .7
|
||||
|
||||
>STYA ZPPtr1
|
||||
|
||||
lda (ZPPtr1)
|
||||
cmp #'-'
|
||||
bne .2
|
||||
|
||||
jsr CS.RUN.CheckOpt
|
||||
bcc .1
|
||||
|
||||
.99 >PUSHBI 0
|
||||
>LDYA L.MSG.USAGE
|
||||
>SYSCALL printf
|
||||
lda #E.SYN
|
||||
sec
|
||||
.9 rts
|
||||
|
||||
.2 lda hFile1
|
||||
bne .3
|
||||
|
||||
jsr CS.RUN.OPEN
|
||||
bcs .9
|
||||
sta hFile1
|
||||
|
||||
>LDYAI 256
|
||||
>SYSCALL GetMem
|
||||
bcs .9
|
||||
|
||||
>STYA ZPBufPtr1
|
||||
stx hBuf1
|
||||
bra .1
|
||||
|
||||
.3 lda hFile2
|
||||
bne .4
|
||||
|
||||
jsr CS.RUN.OPEN
|
||||
bcs .9
|
||||
sta hFile2
|
||||
|
||||
>LDYAI 256
|
||||
>SYSCALL GetMem
|
||||
bcs .9
|
||||
|
||||
>STYA ZPBufPtr2
|
||||
stx hBuf2
|
||||
bra .1
|
||||
|
||||
.4 lda #$ff
|
||||
|
||||
bit bSkip1
|
||||
bmi .5
|
||||
|
||||
sta bSkip1
|
||||
jsr CS.RUN.SEEK
|
||||
bcs .9
|
||||
bra .1
|
||||
|
||||
.5 bit bSkip2
|
||||
bmi .99
|
||||
|
||||
sta bSkip2
|
||||
jsr CS.RUN.SEEK
|
||||
bcs .9
|
||||
jmp .1
|
||||
|
||||
.7 lda hFile2
|
||||
beq .99
|
||||
lda hFile1
|
||||
beq .99
|
||||
*--------------------------------------
|
||||
CS.RUN.LOOP ldy #S.PS.hStdIn
|
||||
lda (pPS),y
|
||||
>SYSCALL feof
|
||||
bcs .9 IO error
|
||||
|
||||
tay
|
||||
bne .1 no char
|
||||
|
||||
>SYSCALL GetChar
|
||||
bcs .9 IO error
|
||||
|
||||
cmp #$03 Ctrl-C
|
||||
beq .9 Abort....
|
||||
|
||||
cmp #$13 Ctrl-S
|
||||
bne .1
|
||||
|
||||
lda bPause
|
||||
eor #$ff
|
||||
sta bPause
|
||||
bne CS.RUN.LOOP
|
||||
|
||||
.1 lda bPause
|
||||
bne CS.RUN.LOOP Pause...
|
||||
|
||||
jsr CS.RUN.READ1
|
||||
bcc .2
|
||||
cmp #MLI.E.EOF
|
||||
bne .9
|
||||
bra .99
|
||||
|
||||
.2 >STYA BufCnt
|
||||
jsr CS.RUN.READ2
|
||||
|
||||
bcc .20
|
||||
cmp #MLI.E.EOF
|
||||
bne .9
|
||||
bra .99
|
||||
|
||||
.20 cpy BufCnt
|
||||
pha
|
||||
sbc BufCnt+1
|
||||
pla
|
||||
bcc .3
|
||||
>STYA BufCnt
|
||||
|
||||
.3 ldy #0
|
||||
|
||||
.4 lda (ZPBufPtr1),y
|
||||
cmp (ZPBufPtr2),y
|
||||
beq .8
|
||||
|
||||
lda #1
|
||||
sta bDiff
|
||||
|
||||
bit bVerbose
|
||||
bpl .5
|
||||
|
||||
jsr CS.RUN.Print
|
||||
bcs .9
|
||||
|
||||
.5 bit bAll
|
||||
bpl .99
|
||||
|
||||
.8 iny
|
||||
cpy BufCnt
|
||||
bne .4
|
||||
inc Offset
|
||||
bne CS.RUN.LOOP
|
||||
inc Offset+1
|
||||
bra CS.RUN.LOOP
|
||||
|
||||
.99 lda bDiff
|
||||
.9 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.OPEN >PUSHWZ Aux type
|
||||
>PUSHBI 0 Type
|
||||
>PUSHBI O.RDONLY
|
||||
|
||||
>LDYA ZPPtr1
|
||||
>SYSCALL FOpen
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.SEEK clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.READ1 >PUSHWI 256
|
||||
>PUSHW ZPBufPtr1
|
||||
lda hFile1
|
||||
>SYSCALL FRead
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.READ2 >PUSHWI 256
|
||||
>PUSHW ZPBufPtr2
|
||||
lda hFile2
|
||||
>SYSCALL FRead
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.Print phy
|
||||
>PUSHB (ZPBufPtr2),y
|
||||
>PUSHB (ZPBufPtr1),y
|
||||
tya
|
||||
>PUSHA
|
||||
>PUSHW Offset
|
||||
>PUSHBI 5
|
||||
|
||||
>LDYA L.MSG.DIFF
|
||||
>SYSCALL printf
|
||||
ply
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.QUIT lda hFile2
|
||||
beq .1
|
||||
>SYSCALL FClose
|
||||
|
||||
.1 lda hFile1
|
||||
beq .2
|
||||
>SYSCALL FClose
|
||||
|
||||
.2 lda hBuf2
|
||||
beq .3
|
||||
>SYSCALL FreeMem
|
||||
|
||||
.3 lda hBuf1
|
||||
beq .8
|
||||
>SYSCALL FreeMem
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.DOEVENT sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.CheckOpt ldy #1
|
||||
lda (ZPPtr1),y
|
||||
|
||||
ldx #OptionVars-OptionList-1
|
||||
|
||||
.2 cmp OptionList,x
|
||||
beq .3
|
||||
dex
|
||||
bpl .2
|
||||
|
||||
sec
|
||||
rts
|
||||
|
||||
.3 ldy OptionVars,x
|
||||
lda #$ff
|
||||
sta 0,y
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
*--------------------------------------
|
||||
OptionList .AS "AaVv"
|
||||
OptionVars .DA #bAll,#bAll,#bVerbose,#bVerbose
|
||||
*--------------------------------------
|
||||
MSG.USAGE .AS "Usage : CMP File1 File2 [SKIP1 [SKIP1]]\r\n"
|
||||
.AS " -A : Shows All differences\r\n"
|
||||
.AZ " -V : Verbose Mode\r\n"
|
||||
MSG.DIFF .AZ "%H%h:%h %h\r\n"
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR 0
|
||||
DS.START
|
||||
DS.END
|
||||
.ED
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE USR/SRC/BIN/CMP.S
|
||||
ASM
|
@ -39,6 +39,7 @@ SETWND .EQ $FB4B SET NORMAL TEXT WINDOW
|
||||
TABV .EQ $FB5B
|
||||
SETPWRC .EQ $FB6F
|
||||
version .EQ $FBB3 monitor ROM id byte
|
||||
zidbyte .EQ $FBC0 monitor ROM id byte
|
||||
BASCALC .EQ $FBC1 CALCULATE TEXT BASE ADDRESS (NOT 2E!}
|
||||
BELL1 .EQ $FBD9 BEEP SPEAKER IF CTRL-G
|
||||
BELL2 .EQ $FBE4 BEEP SPEAKER ONCE
|
||||
|
@ -4,7 +4,6 @@ NEW
|
||||
* Cortland clock driver
|
||||
* $2F80-$2FFC moved to $D742
|
||||
|
||||
.OP 65816
|
||||
ofsC .EQ *-tclk_in offset to Cortland clock org
|
||||
|
||||
cclock_0
|
||||
@ -63,7 +62,6 @@ savestate .EQ *-ofsC
|
||||
cclk_end .EQ * end of obj cclock_0.
|
||||
.HS 000000 pad to page boundary
|
||||
* LONG I OFF
|
||||
.OP 65C02
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE USR/SRC/PRODOS.203/PRODOS.S.CCLK
|
||||
|
@ -1,19 +1,17 @@
|
||||
NEW
|
||||
AUTO 3,1
|
||||
.OP 65C02
|
||||
|
||||
H2000 jmp prostart
|
||||
jmp atalkset appletalk setup for network boot
|
||||
jmp p16start GQuit setup for gs/os
|
||||
|
||||
LDR.MSG.AppleII .AS "Apple II"
|
||||
LDR.MSG.ProDOS .AS "ProDOS 8 V2.0.3 "
|
||||
.AS "06-May-93"
|
||||
H202F .AS " "
|
||||
LDR.MSG.AppleII .AS -"Apple II"
|
||||
LDR.MSG.ProDOS .AS -"ProDOS 8 V2.0.3 "
|
||||
.AS -"06-May-93"
|
||||
H202F .AS -" "
|
||||
LDR.MSG.Copyright
|
||||
.AS "Copyright Apple Computer, Inc., 1983-93"
|
||||
.AS -"Copyright Apple Computer, Inc., 1983-93"
|
||||
LDR.MSG.Reserved
|
||||
.AS "All Rights Reserved."
|
||||
.AS -"All Rights Reserved."
|
||||
|
||||
p16start inc setuprts set = 2 for GQuit rts
|
||||
atalkset inc setuprts set = 1 for appletalk rts
|
||||
@ -227,7 +225,7 @@ isRROMBNK23 sta SETC3ROM enable slot 3 rom
|
||||
and #$C8
|
||||
cmp #$C0 is it a //+ ?
|
||||
beq docard yes
|
||||
lda slot3irq
|
||||
lda $C3FA
|
||||
cmp #$2C does card have an interrupt handler?
|
||||
beq docard yes
|
||||
|
||||
@ -343,7 +341,7 @@ relocerr sta RROMBNK2 read ROM
|
||||
|
||||
LDR.MSG.LdrErr .AS "Relocation/Configuration Error"
|
||||
|
||||
ldy #$23
|
||||
H22EB ldy #$23
|
||||
|
||||
.1 lda LDR.MSG.EnhErr,y
|
||||
sta vline14+2,y
|
||||
@ -385,8 +383,8 @@ H232B .DA #1 move interpreter loader code
|
||||
.DA dst
|
||||
.DA #$01 move 128k test to zero page
|
||||
.DA tst128 destination
|
||||
.DA H2622-H25DC length
|
||||
.DA H25DC source
|
||||
.DA LDR.Test128.Len
|
||||
.DA LDR.Test128
|
||||
.HS FF done
|
||||
|
||||
dsp64 .DA #$01 move p8 dispatcher code
|
||||
@ -731,7 +729,7 @@ H25D9 jmp tst128 jumps to page 0 routine below
|
||||
|
||||
* test for 128k. use page 0 for this routine
|
||||
|
||||
H25DC sta idapple H25DC-2621 was moved to location tst128
|
||||
LDR.Test128 sta idapple H25DC-2621 was moved to location tst128
|
||||
bpl not128 if already determined < 128k
|
||||
lda #$EE
|
||||
sta SETWRITEAUX write to aux mem while on main zp
|
||||
@ -764,7 +762,7 @@ not128 lda lookptr+1
|
||||
dec lookptr
|
||||
H2620 clc
|
||||
rts
|
||||
|
||||
LDR.Test128.len .EQ *-LDR.Test128
|
||||
MAN
|
||||
SAVE USR/SRC/PRODOS.203/PRODOS.S.LDR.A
|
||||
LOAD USR/SRC/PRODOS.203/PRODOS.S
|
||||
|
@ -838,8 +838,7 @@ ofset .HS 0000000000000000
|
||||
|
||||
* patch to gsos vectors so error is returned for os calls - rev note #101
|
||||
|
||||
patch101 .OP 65816
|
||||
php
|
||||
patch101 php
|
||||
sei disable interrupts
|
||||
clc
|
||||
xce full native mode
|
||||
|
@ -7,7 +7,7 @@ NEW
|
||||
|
||||
RAM_1 .BS $2C80-*
|
||||
|
||||
ldy #$99 move $9A bytesfrom lcsrc to lcdest.
|
||||
H2C80 ldy #$99 move $9A bytesfrom lcsrc to lcdest.
|
||||
|
||||
.1 lda lcsrc,y transfer main bank portion of driver
|
||||
sta lcdest,y
|
||||
|
@ -13,8 +13,6 @@ NEW
|
||||
* (as other replacement quit code is supposed to do) because GQuit checks
|
||||
* this to see if this version of quit code is available.
|
||||
|
||||
.OP 65816
|
||||
|
||||
ofsQ .EQ *-dispadr offset to GQuit dispatcher org
|
||||
|
||||
GQdisp lda RRAMWRAMBNK1 read/write LC bank 1
|
||||
@ -383,7 +381,7 @@ SEL2.ckfordrv clc native mode
|
||||
xce
|
||||
sec disk not found.
|
||||
.2 rts
|
||||
.OP 65C02
|
||||
|
||||
* Prodos 8 parameter lists
|
||||
|
||||
pfxparms .EQ *-ofsQ set prefix parms.
|
||||
@ -437,12 +435,12 @@ gfiparms .EQ *-ofsQ get file info parms.
|
||||
|
||||
quitstr1 .EQ *-ofsQ
|
||||
.DA #$1B
|
||||
.AS "Can't run next application."
|
||||
.AS 'Can't run next application.'
|
||||
quitstr2 .EQ *-ofsQ
|
||||
.DA #$14
|
||||
.AS "ProDOS Error = $"
|
||||
errval .EQ *-ofsQ hex error code gets stored here
|
||||
.AS " "
|
||||
.AS ' '
|
||||
quitbtn2 .EQ *-ofsQ null string (no 2nd button)
|
||||
.HS 00
|
||||
|
||||
|
@ -2,7 +2,7 @@ NEW
|
||||
AUTO 3,1
|
||||
* object code = mli_2
|
||||
* xdos mli system call processor
|
||||
.OP 65C02
|
||||
|
||||
ofsX .EQ *-xdosorg offset to xdos org
|
||||
|
||||
xdosmli .EQ *-ofsX xdos MLI in aux ram
|
||||
|
@ -1,7 +1,7 @@
|
||||
NEW
|
||||
AUTO 3,1
|
||||
.LIST OFF
|
||||
.OP 65C02
|
||||
.OP 65816
|
||||
.OR $0000
|
||||
.TF PRODOS203,TSYS
|
||||
*--------------------------------------
|
||||
@ -11,15 +11,15 @@ NEW
|
||||
.INB INC/MLI.I
|
||||
.INB INC/MLI.E.I
|
||||
*--------------------------------------
|
||||
MMStartUp .EQ 0000
|
||||
NewHandle .EQ 0000
|
||||
PtrToHand .EQ 0000
|
||||
MessageCenter .EQ 0000
|
||||
DisposeHandle .EQ 0000
|
||||
MMShutDown .EQ 0000
|
||||
ReadTimeHex .EQ 0000
|
||||
Int2Hex .EQ 0000
|
||||
TLTextMountVolume .EQ 0000
|
||||
MMStartUp .EQ $0202
|
||||
NewHandle .EQ $0902
|
||||
PtrToHand .EQ $2802
|
||||
MessageCenter .EQ $1501
|
||||
DisposeHandle .EQ $1002
|
||||
MMShutDown .EQ $0303
|
||||
ReadTimeHex .EQ $0D03
|
||||
Int2Hex .EQ $220B
|
||||
TLTextMountVolume .EQ $1201
|
||||
.MA IIGS
|
||||
ldx ##]1
|
||||
jsl $E10000
|
||||
|
Loading…
x
Reference in New Issue
Block a user