Kernel 0.93+

This commit is contained in:
Rémy GIBERT 2019-09-13 17:39:37 +02:00
parent e9beaf983c
commit 230fed8d88
18 changed files with 485 additions and 448 deletions

Binary file not shown.

View File

@ -31,8 +31,8 @@ ZPBufPtr2 .BS 2
bSkip2 .BS 1
Offset .BS 2
BufCnt .BS 2
SeekOfs .BS 4
ZS.END .ED
*--------------------------------------
* File Header (16 Bytes)
@ -114,14 +114,13 @@ CS.RUN
stx hBuf2
bra .1
.4 lda #$ff
bit bSkip1
.4 bit bSkip1
bmi .5
sta bSkip1
jsr CS.RUN.SEEK
bcs .9
sec
ror bSkip1
bra .1
.5 bit bSkip2
@ -130,6 +129,8 @@ CS.RUN
sta bSkip2
jsr CS.RUN.SEEK
bcs .9
sec
ror bSkip2
jmp .1
.7 lda hFile2
@ -221,8 +222,27 @@ CS.RUN.OPEN >PUSHWZ Aux type
>SYSCALL FOpen
rts
*--------------------------------------
CS.RUN.SEEK clc
rts
CS.RUN.SEEK >LDYA ZPPtr1
>SYSCALL atol
bcs .9
>PULLL SeekOfs
lda bSkip1
bmi .1
>PUSHBI SEEK.SET
>PUSHL SeekOfs
lda hFile1
>SYSCALL fseek
bcs .9
.1 >PUSHBI SEEK.SET
>PUSHL SeekOfs
lda hFile2
>SYSCALL fseek
.9 rts
*--------------------------------------
CS.RUN.READ1 >PUSHWI 256
>PUSHW ZPBufPtr1

View File

@ -77,7 +77,7 @@ LIST .EQ $FE5E DISASSEMBLE 20 INSTRUCTIONS
LIST2 .EQ $FE63 DISASSEMBLE •A• INSTRUCTIONS
SETINV .EQ $FE80 PRINT INVERSE TEXT TO SCREEN
SETNORM .EQ $FE84 PRINT NORMAL TEXT TO SCREEN
SETKBD .EQ $FE93 GRAB INPUT HOOKS FOR KEYBOARD
SETKBD .EQ $FE89 GRAB INPUT HOOKS FOR KEYBOARD
SETVID .EQ $FE93 GRAB OUTPUT HOOKS FOR SCREEN
XBASIC .EQ $FEB0 GO BASIC, DESTROYING OLD
BASCON .EQ $FEB3 GO BASIC, CONTINUING OLD

View File

@ -7,21 +7,21 @@ NEW
ofsC .EQ *-tclk_in offset to Cortland clock org
cclock_0
* SHORT I,M 8 bit mode.
>SHORTMX 8 bit mode.
lda statereg state register.
sta savestate save for restore after tool call.
and #$CF clear the read/write aux memory bits.
sta statereg make it real
clc set e = 0 to set native mode
xce
* LONG I,M 16 bit mode.
>LONGMX 16 bit mode.
lda ##$0000 zero out result space.
pha push 4 words for hex time result
pha
pha
pha
>IIGS ReadTimeHex
* SHORT M back to 8 bit to get results from stack
>SHORTM back to 8 bit to get results from stack
lda savestate restore state register
sta statereg
pla pull off seconds and ignore
@ -61,7 +61,6 @@ savestate .EQ *-ofsC
.HS 000000000000
cclk_end .EQ * end of obj cclock_0.
.HS 000000 pad to page boundary
* LONG I OFF
*--------------------------------------
MAN
SAVE USR/SRC/PRODOS.203/PRODOS.S.CCLK

View File

@ -748,7 +748,7 @@ wrefa6 .EQ *-ofsD
bcc L5881 (3-) branch if not the last.
bcs L58B1 (3) waste 3 cycles, branch always.
L58B1 bcs L58C0 (3) branch always.
L58B3 lda pch (4) absolute reference to zero page
L58B3 lda >pch (4) absolute reference to zero page
sta q6h,x (5)
lda q6l,x (4)
pha (3) waste 14 micro-seconds total

View File

@ -4,7 +4,7 @@ NEW
* global page
ofsG .EQ $2E00-MLI offset to global org
.BS $2E00-*
H2E00 jmp mlient1 $2E00-2EFF moved to $BF00
jspare .EQ *-ofsG
jmp jspare will be changed to point to dispatcher.

View File

@ -6,7 +6,7 @@ NEW
* address $FFCB (ROM rts opcode) for rom switching to function.
lanirq .EQ *-ofsR2
.BS $2D9B-*
H2D9B pha $2D9B-2DFF moved to $FF9B-FFFF
lda accsav
sta oldacc

View File

@ -164,7 +164,7 @@ H216E jsr reloc
sei no interrupts.
sta SETALTZP use alt zero page/stack
stx auxsp init aux sp to $FF
sta SETALTZP use main zero page/stack
sta CLRALTZP use main zero page/stack
pha restore interrupt status
plp
sta CLRC3ROM enable internal slot 3 ROM
@ -184,7 +184,7 @@ noramdsk lda RROMWRAMBNK2 read ROM/write RAM bank 2
sta auxsp
stx irqv+1 interrupt vector
sty irqv save irq vector in aux lc
sta SETALTZP use main zero page/stack
sta CLRALTZP use main zero page/stack
stx irqv+1 save irq vector in main lc
sty irqv
lda #$01

View File

@ -817,7 +817,7 @@ nxgroup dey is opcode len in lowest 2 bits of acc?
lsr (if length = 0 then error)
bne nxgroup
.LIST ON
.BS $2B89-*
H2B89 and #$03
rts if z-set then error
@ -845,7 +845,7 @@ patch101 php
sei disable interrupts
clc
xce full native mode
>LONGMX
phb save DBR
pha
pha
@ -869,9 +869,9 @@ patch101 php
>IIGS PtrToHand
plx low word of handle
plb set DBR to handle's bank
lda 1,x get upper 16 bits of 24 bit address
lda >1,x get upper 16 bits of 24 bit address
tay save in y
lda 0,x get low 8 bits of address
lda >0,x get low 8 bits of address
and ##$00FF clear high byte
xba put address in high byte
ora ##$005C include JML opcode
@ -904,6 +904,7 @@ L2C4D lda 1,s
rtl
.BS $2C80-*
MAN
SAVE USR/SRC/PRODOS.203/PRODOS.S.LDR.B
LOAD USR/SRC/PRODOS.203/PRODOS.S

View File

@ -19,7 +19,7 @@ H2C80 ldy #$99 move $9A bytesfrom lcsrc to lcdest.
stx A1L
dex
stx A2L
ldx ramsrc
ldx /ramsrc
stx A1L+1
inx
stx A2L+1

View File

@ -99,7 +99,7 @@ L5194 lda (A1L),y move A1,A2 to A4,A3
sta (A3L),y
dey
bne L5194
sta SETALTZP use main zero page/stack
sta CLRALTZP use main zero page/stack
L51A2 stx R2L
pla restore R2
sta R2H

View File

@ -260,22 +260,22 @@ L5C0B jsr prntmsg
dsp1msgs .EQ *-ofsS
dsp1msg0 .EQ *-ofsS
.AS "ENTER PREFIX (PRESS "RETURN" TO ACCEPT)"
.AS -"ENTER PREFIX (PRESS "RETURN" TO ACCEPT)"
.HS 00
disp1msg .EQ *-ofsS
.AS "ENTER PATHNAME OF NEXT APPLICATION"
.AS -"ENTER PATHNAME OF NEXT APPLICATION"
.HS 00
dsp1err1 .EQ *-ofsS
.DA #$87
.AS "NOT A TYPE "SYS" FILE"
.AS -'NOT A TYPE "SYS" FILE'
.HS 00
dsp1err2 .EQ *-ofsS
.DA #$87
.AS "I/O ERROR "
.AS -"I/O ERROR "
.HS 00
dsp1err3 .EQ *-ofsS
.DA #$87
.AS "FILE/PATH NOT FOUND "
.AS -"FILE/PATH NOT FOUND "
.HS 00
dsp1info .EQ *-ofsS get file info parms
.DA #$0A 10 parameters

View File

@ -381,13 +381,13 @@ doread .EQ *-ofsB
* data area
dsp2msg .EQ *-ofsB
.AS "RETURN: Select | TAB: Chg Vol | "
.AS "ESC: Back"
.AS -"RETURN: Select | TAB: Chg Vol | "
.AS -"ESC: Back"
.DA #$00
fldrmsg .EQ *-ofsB
.DA #$0F inverse control code
.HS 1B enable mousetext
.AS "XY" folder characters
.AS -"XY" folder characters
.HS 18 disable mousetext
.HS 0E normal control code
.HS 00

View File

@ -19,7 +19,7 @@ GQdisp lda RRAMWRAMBNK1 read/write LC bank 1
clc
xce 16 bit native mode.
jmp P8QUIT go to GQuit.
.DA #0000000000 offset to paragraph boundary.
.HS 0000000000 offset to paragraph boundary.
.AS "GQ" id bytes so GQuit can identify this
* load application
@ -39,10 +39,10 @@ GQdisp lda RRAMWRAMBNK1 read/write LC bank 1
* so in case of an error setting the P8 prefix, it can be displayed in the
* error message.
* SHORT M 8 bit accumulator
* LONG I ON
>SHORTM 8 bit accumulator
pha save the switch status.
ldx #inbuf point to passed prefix.
ldx ##inbuf point to passed prefix.
jsr copyvol copy the name into the buffer.
pla retrieve the switch status
@ -66,11 +66,11 @@ L6020 jsr MLI set prefix
* load application at $2000
L602D xce native mode (carry clear)
* LONG I 16 bit regs, 8 bit acc.
>LONGX 16 bit regs, 8 bit acc.
lda pbuf+1 is the application name
cmp #$2F a complete pathname ?
bne L603D no, use prefix as volume name
ldx #pbuf else use the application name.
ldx ##pbuf else use the application name.
jsr copyvol copy the volume name to buffer.
L603D sec back to emulation mode.
xce
@ -124,7 +124,7 @@ L6099 lda RROMBNK2 enable ROM
gqerror .EQ *-ofsQ
clc
xce 16 bit native mode
* LONG I,M
>LONGMX
jsr mountvol mount volume.
bcs L60AB if error.
sec back to emulation mode.
@ -136,8 +136,8 @@ gqerror .EQ *-ofsQ
L60AB clc native mode
xce
* LONG I,M
and #$00FF mask off high byte of error code.
>LONGMX
and ##$00FF mask off high byte of error code.
pha put on stack for IntMath tool call.
pea $0000 errval>>16
pea errval push address of string buffer.
@ -167,16 +167,16 @@ L60AB clc native mode
* carry set if no window displayed or if had window and 'esc' pressed.
mountvol .EQ *-ofsQ
ldy #$0000 volbuf>>16
ldx #volbuf set up pointer to volume name.
ldy ##$0000 volbuf>>16
ldx ##volbuf set up pointer to volume name.
* if error is 'volume not found' or 'no disk in drive' then display the
* Mount Volume window, otherwise return with carry set.
and #$00FF mask just in case.
cmp #$0045 volume not found ?
and ##$00FF mask just in case.
cmp ##$0045 volume not found ?
beq L6101 yes
cmp #$002F no disk in drive ?
cmp ##$002F no disk in drive ?
beq L6101 yes
sec indicate error not handled.
rts return with error code still in acc.
@ -210,7 +210,7 @@ L6101 pha save error code in case esc pressed.
pld restore D reg.
plx pull volume name pointer off stack
plx
cmp #$0001 which button was pressed ?
cmp ##$0001 which button was pressed ?
bne L613C if Escape pressed.
clc indicate Return was pressed.
pla pull original error code off stack.
@ -225,12 +225,11 @@ L613C sec indicate Escape was pressed.
* output: volume name is stored in volbuf.
copyvol .EQ *-ofsQ
lda 1,x get the first slash
lda >1,x get the first slash
sta volbuf+1
ldy #$0002 initialize the length count.
* LONGI OFF
* LONGA OFF
L6148 lda 2,x now copy the volume name up to
ldy ##$0002 initialize the length count.
L6148 lda >2,x now copy the volume name up to
cmp #$2F the separating slash.
beq L6156
sta volbuf,y
@ -263,7 +262,7 @@ L6170 lda #$FF put flag conditioning value on
pha the stack (assume error).
clc native 16-bit mode.
xce
* LONG I,M
>LONGMX
pha make room on stack for user id.
>IIGS MMStartUp start up the memory manager.
pla get the user id and
@ -296,21 +295,21 @@ L6170 lda #$FF put flag conditioning value on
tcd make a new direct page.
lda [$04] de-reference the handle.
sta $00
ldy #$0002
ldy ##$0002
lda [$04],y
sta $02
ldy #$0006 get the message command.
ldy ##$0006 get the message command.
lda [$00],y
bne bad_msg if print, then skip it.
lda $00 adjust pointer to filename string.
clc
adc #$0008
adc ##$0008
sta $00
bcc L61D1
inc $02
L61D1 lda [$00] get the length of the string.
and #$00FF mask off high (leaving just the length)
* SHORT M 8 bit accumulator
and ##$00FF mask off high (leaving just the length)
>SHORTM 8 bit accumulator
cmp sysentry+5 check against length of app buffer.
beq L61DF if equal then continue with move.
bcs bad_msg if too long then bad message.
@ -323,7 +322,7 @@ L61E0 lda [$00],y get a character.
lda #$00 change flag conditioning value on stack
sta $0D,s to indicate a filename is passed.
bad_msg
* LONG M 16-bit acc.
>LONGM 16-bit acc.
pld restore direct register.
pla fix stack because handle and userid
pla still on stack.
@ -336,7 +335,7 @@ L6203 >IIGS DisposeHandle throw away message (handle is on stack)
L620A >IIGS MMShutDown shutdown the memory manager (userid is
sec on stack).
xce back to emulation mode.
* LONGA OFF
pla condition z-flag with value on stack.
bne L6231 then done.
ldx inbuf get length of pathname.
@ -363,8 +362,8 @@ L6231 rts and go launch the app.
ckfordrv .EQ *-ofsQ
SEL2.ckfordrv clc native mode
xce
* LONG I 16-bit regs, 8-bit acc.
ldx #sysentry+6 point to pathname buffer.
>LONGX 16-bit regs, 8-bit acc.
ldx ##sysentry+6 point to pathname buffer.
jsr copyvol copy volume name to pathname buffer.
.1 sec emulation mode.
xce
@ -374,7 +373,7 @@ SEL2.ckfordrv clc native mode
bcc .2 branch if volume found,
clc (native mode)
xce
* LONG I,M
>LONGMX
jsr mountvol else ask user to mount the volume.
bcc .1 if <return> pressed, then try again.
sec emulation mode.
@ -435,12 +434,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

View File

@ -92,13 +92,13 @@ tdays .EQ *-ofsT
* the days of the week.
yradj .EQ *-ofsT
.DA #$60 Monday
.DA #$5F Sunday
.DA #$5E Saturday
.DA #$5D Friday
.DA #$62 Thursday
.DA #$61 Wednesday
.DA #$60 Tuesday
.DA #$07 Monday
.DA #$0C Sunday
.DA #$0B Saturday
.DA #$0A Friday
.DA #$09 Thursday
.DA #$08 Wednesday
.DA #$08 Tuesday
tclk_end .EQ * end of obj tclock_0.
.HS 000000 pad
*--------------------------------------

View File

@ -4,8 +4,8 @@ NEW
* xdos mli system call processor
ofsX .EQ *-xdosorg offset to xdos org
xdosmli .EQ *-ofsX xdos MLI in aux ram
xdosobj cld no decimal.
pla get processor status
sta spare1 save it temporarily
@ -109,7 +109,7 @@ devmgr .EQ *-ofsX
php do not allow interrupts.
sei the call spec for devices must
H30B9 lda (A3L),y be passed to drivers in page zero:
sta (A4L),y sta $0042,y
sta >$0042,y
dey
bne H30B9
ldx buf+1 buffer page

View File

@ -327,8 +327,7 @@ inftabl .EQ *-ofsX
.HS 22232418191A1B
deathmsg .EQ *-ofsX
.HS 20
.AS 'RESTART SYSTEM-$01'
.AS -"RESTART SYSTEM-$01"
.HS 20
*** work space ***
@ -395,11 +394,11 @@ d_moddt .EQ *-ofsX
d_dhdr .EQ *-ofsX file directory header block address
.HS 0000
scrtch .EQ *-ofsX scratch area for
.DA #00000000 allocation address conversion.
.HS 00000000 allocation address conversion.
oldeof .EQ *-ofsX temp used in r/w
.HS 000000
oldmark .EQ *-ofsX
.DA #000000
.HS 000000
xvcbptr .EQ *-ofsX used in 'cmpvcb' as a temp
.HS 00
vcbptr .EQ *-ofsX

View File

@ -20,6 +20,25 @@ MMShutDown .EQ $0303
ReadTimeHex .EQ $0D03
Int2Hex .EQ $220B
TLTextMountVolume .EQ $1201
*--------------------------------------
.MA SHORTMX
sep #$30
.EM
.MA SHORTM
sep #$20
.EM
.MA SHORTX
sep #$10
.EM
.MA LONGMX
rep #$30
.EM
.MA LONGM
rep #$20
.EM
.MA LONGX
rep #$10
.EM
*--------------------------------------
.MA IIGS
ldx ##]1