mirror of
https://github.com/A2osX/A2osX.git
synced 2024-12-25 19:30:44 +00:00
Kernel 0.9.1 : GUI, Font Engine (OSD) ok
This commit is contained in:
parent
e9793ad02b
commit
b93f1d2b3c
Binary file not shown.
Binary file not shown.
Binary file not shown.
127
.Tools/ShiftL7Tables.cmd
Normal file
127
.Tools/ShiftL7Tables.cmd
Normal file
@ -0,0 +1,127 @@
|
||||
@echo off
|
||||
title Kernel DOC generator
|
||||
COLOR 2A
|
||||
prompt ]
|
||||
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||
|
||||
mode con:cols=80 lines=24
|
||||
|
||||
cls
|
||||
echo Apple //e
|
||||
|
||||
(echo.)>SHIFT.TXT
|
||||
|
||||
SET S=1
|
||||
|
||||
:LOOP0
|
||||
set /a B=0
|
||||
set SHIFTL=
|
||||
echo Creating SHIFT.L%S%...
|
||||
|
||||
:LOOP1
|
||||
|
||||
call :ToBin %B%
|
||||
|
||||
if "%S%" EQU "1" set SHIFT=#%%0%Output:~1,6%%Output:~0,1%
|
||||
if "%S%" EQU "2" set SHIFT=#%%0%Output:~2,5%%Output:~0,2%
|
||||
if "%S%" EQU "3" set SHIFT=#%%0%Output:~3,4%%Output:~0,3%
|
||||
if "%S%" EQU "4" set SHIFT=#%%0%Output:~4,3%%Output:~0,4%
|
||||
if "%S%" EQU "5" set SHIFT=#%%0%Output:~5,2%%Output:~0,5%
|
||||
if "%S%" EQU "6" set SHIFT=#%%0%Output:~6,1%%Output:~0,6%
|
||||
|
||||
if not defined SHIFTL (
|
||||
if "%B%" EQU "0" (
|
||||
set SHIFTL=SHIFT.L%S% .DA %SHIFT%
|
||||
) ELSE (
|
||||
set SHIFTL= .DA %SHIFT%
|
||||
)
|
||||
) ELSE (
|
||||
set SHIFTL=%SHIFTL%,%SHIFT%
|
||||
)
|
||||
|
||||
set /a B+=1
|
||||
set /a MOD=B%%8
|
||||
|
||||
if "%MOD%" EQU "0" (
|
||||
(echo %SHIFTL%)>>SHIFT.TXT
|
||||
set SHIFTL=
|
||||
)
|
||||
|
||||
if "%B%" NEQ "128" goto LOOP1
|
||||
|
||||
set /a S+=1
|
||||
if "%S%" NEQ "7" goto LOOP0
|
||||
|
||||
(echo.)>TWIST.TXT
|
||||
|
||||
set /a B=0
|
||||
set TWISTL=
|
||||
echo Creating TWIST...
|
||||
:LOOP2
|
||||
|
||||
call :ToBin2 %B%
|
||||
|
||||
if not defined TWISTL (
|
||||
if "%B%" EQU "0" (
|
||||
set TWISTL=TWIST .DA #%%%Output%
|
||||
) ELSE (
|
||||
set TWISTL= .DA #%%%Output%
|
||||
)
|
||||
) ELSE (
|
||||
set TWISTL=%TWISTL%,#%%%Output%
|
||||
)
|
||||
|
||||
set /a B+=1
|
||||
set /a MOD=B%%8
|
||||
|
||||
if "%MOD%" EQU "0" (
|
||||
(echo %TWISTL%)>>TWIST.TXT
|
||||
set TWISTL=
|
||||
)
|
||||
|
||||
if "%B%" NEQ "256" goto LOOP2
|
||||
|
||||
echo.
|
||||
echo (I know, this other batch is also stupid ;-)
|
||||
echo.
|
||||
pause
|
||||
exit 0
|
||||
|
||||
|
||||
:ToBin
|
||||
|
||||
SET Output=
|
||||
SET CurrentValue=64
|
||||
SET InputValue=%1
|
||||
|
||||
:TopLoop
|
||||
IF !CurrentValue! LEQ !InputValue! (
|
||||
SET Output=!Output!1
|
||||
SET /A InputValue=!InputValue!-!CurrentValue!
|
||||
) ELSE (
|
||||
SET Output=!Output!0
|
||||
)
|
||||
|
||||
If !CurrentValue! EQU 1 GOTO :EOF
|
||||
SET /A CurrentValue=!CurrentValue!/2
|
||||
|
||||
Goto TopLoop
|
||||
|
||||
:ToBin2
|
||||
|
||||
SET Output=
|
||||
SET CurrentValue=128
|
||||
SET InputValue=%1
|
||||
|
||||
:TopLoop2
|
||||
IF !CurrentValue! LEQ !InputValue! (
|
||||
SET Output=1!Output!
|
||||
SET /A InputValue=!InputValue!-!CurrentValue!
|
||||
) ELSE (
|
||||
SET Output=0!Output!
|
||||
)
|
||||
|
||||
If !CurrentValue! EQU 1 GOTO :EOF
|
||||
SET /A CurrentValue=!CurrentValue!/2
|
||||
|
||||
Goto TopLoop2
|
81
.Tools/ShiftL8Tables.cmd
Normal file
81
.Tools/ShiftL8Tables.cmd
Normal file
@ -0,0 +1,81 @@
|
||||
@echo off
|
||||
title Shift table generator
|
||||
COLOR 2A
|
||||
prompt ]
|
||||
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||
|
||||
mode con:cols=80 lines=24
|
||||
|
||||
cls
|
||||
echo Apple //e
|
||||
|
||||
(echo.)>SHIFT.TXT
|
||||
|
||||
SET S=1
|
||||
|
||||
:LOOP0
|
||||
set /a B=0
|
||||
set SHIFTL=
|
||||
echo Creating SHIFT8.L%S%...
|
||||
|
||||
:LOOP1
|
||||
|
||||
call :ToBin %B%
|
||||
|
||||
if "%S%" EQU "1" set SHIFT=#%%%Output:~1,7%%Output:~0,1%
|
||||
if "%S%" EQU "2" set SHIFT=#%%%Output:~2,6%%Output:~0,2%
|
||||
if "%S%" EQU "3" set SHIFT=#%%%Output:~3,5%%Output:~0,3%
|
||||
if "%S%" EQU "4" set SHIFT=#%%%Output:~4,4%%Output:~0,4%
|
||||
if "%S%" EQU "5" set SHIFT=#%%%Output:~5,3%%Output:~0,5%
|
||||
if "%S%" EQU "6" set SHIFT=#%%%Output:~6,2%%Output:~0,6%
|
||||
if "%S%" EQU "7" set SHIFT=#%%%Output:~7,2%%Output:~0,7%
|
||||
|
||||
if not defined SHIFTL (
|
||||
if "%B%" EQU "0" (
|
||||
set SHIFTL=SHIFT8.L%S% .DA %SHIFT%
|
||||
) ELSE (
|
||||
set SHIFTL= .DA %SHIFT%
|
||||
)
|
||||
) ELSE (
|
||||
set SHIFTL=%SHIFTL%,%SHIFT%
|
||||
)
|
||||
|
||||
set /a B+=1
|
||||
set /a MOD=B%%8
|
||||
|
||||
if "%MOD%" EQU "0" (
|
||||
(echo %SHIFTL%)>>SHIFT.TXT
|
||||
set SHIFTL=
|
||||
)
|
||||
|
||||
if "%B%" NEQ "128" goto LOOP1
|
||||
|
||||
set /a S+=1
|
||||
if "%S%" NEQ "8" goto LOOP0
|
||||
|
||||
echo.
|
||||
echo (I know, this other batch is also stupid ;-)
|
||||
echo.
|
||||
pause
|
||||
exit 0
|
||||
|
||||
|
||||
:ToBin
|
||||
|
||||
SET Output=
|
||||
SET CurrentValue=128
|
||||
SET InputValue=%1
|
||||
|
||||
:TopLoop
|
||||
IF !CurrentValue! LEQ !InputValue! (
|
||||
SET Output=!Output!1
|
||||
SET /A InputValue=!InputValue!-!CurrentValue!
|
||||
) ELSE (
|
||||
SET Output=!Output!0
|
||||
)
|
||||
|
||||
If !CurrentValue! EQU 1 GOTO :EOF
|
||||
SET /A CurrentValue=!CurrentValue!/2
|
||||
|
||||
Goto TopLoop
|
||||
|
@ -4,7 +4,7 @@ AUTO 4,1
|
||||
.LIST OFF
|
||||
.OP 65C02
|
||||
.OR $2000
|
||||
.TF /A2OSX.BUILD/BIN/ATBROWSE
|
||||
.TF /A2OSX.BUILD/BIN/ATK/ATBROWSE
|
||||
*--------------------------------------
|
||||
.INB /A2OSX.BUILD/INC/MACROS.I
|
||||
.INB /A2OSX.BUILD/INC/A2OSX.I
|
||||
|
@ -4,7 +4,7 @@ AUTO 4,1
|
||||
.LIST OFF
|
||||
.OP 65C02
|
||||
.OR $2000
|
||||
.TF /A2OSX.BUILD/BIN/ATLOGON
|
||||
.TF /A2OSX.BUILD/BIN/ATK/ATLOGON
|
||||
*--------------------------------------
|
||||
.INB /A2OSX.BUILD/INC/MACROS.I
|
||||
.INB /A2OSX.BUILD/INC/A2OSX.I
|
||||
|
@ -1,8 +1,6 @@
|
||||
PR#3
|
||||
PREFIX /A2OSX.BUILD
|
||||
NEW
|
||||
INC 1
|
||||
AUTO 6
|
||||
PREFIX /A2OSX.BUILD
|
||||
AUTO 4,1
|
||||
.LIST OFF
|
||||
.OP 65C02
|
||||
.OR $2000
|
||||
@ -44,8 +42,8 @@ L.MSG.USAGE .DA MSG.USAGE
|
||||
CS.INIT clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN >SYSCALL GetArgC
|
||||
cmp #1
|
||||
CS.RUN ldy #S.PS.ARGC
|
||||
lda (pPs),y
|
||||
bne CS.RUN.SET
|
||||
|
||||
CS.RUN.READ jsr NSC.Init
|
||||
|
@ -8,6 +8,7 @@ AUTO 4,1
|
||||
*--------------------------------------
|
||||
.INB /A2OSX.BUILD/INC/MACROS.I
|
||||
.INB /A2OSX.BUILD/INC/A2OSX.I
|
||||
.INB /A2OSX.BUILD/INC/GUI.I
|
||||
.INB /A2OSX.BUILD/INC/LIBGUI.I
|
||||
*--------------------------------------
|
||||
ZPPTR1 .EQ ZPBIN
|
||||
@ -322,7 +323,7 @@ CS.QUIT >LDA.G hBuf
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
*--------------------------------------
|
||||
.INB /A2OSX.BUILD/X.TWIST.G
|
||||
.INB /A2OSX.BUILD/ROOT/X.TWIST.G
|
||||
*--------------------------------------
|
||||
OptionList >PSTR "Vv"
|
||||
OptionVars .DA #bVerbose,#bVerbose
|
||||
@ -345,5 +346,5 @@ DS.END
|
||||
.ED
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE /A2OSX.BUILD/BMP2PIX.S
|
||||
SAVE /A2OSX.BUILD/ROOT/BMP2PIX.S
|
||||
ASM
|
||||
|
@ -1,8 +1,6 @@
|
||||
PR#3
|
||||
NEW
|
||||
PREFIX /A2OSX.BUILD
|
||||
LOMEM $A00
|
||||
INC 1
|
||||
AUTO 6
|
||||
AUTO 4,1
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
pDrv .EQ $10
|
||||
@ -230,6 +228,9 @@ SYS.LoadStkObj .EQ $FA
|
||||
SYS.GetStkObj.A .EQ $FC
|
||||
SYS.FreeStkObj.A .EQ $FE
|
||||
*--------------------------------------
|
||||
SYS.Kernel.JMP .EQ $E000
|
||||
SYS.GuiOSD.JMP .EQ $E200
|
||||
*--------------------------------------
|
||||
* ProDOS ERROR CODES : $00->$5F
|
||||
* Lib ERROR CODES : $80->$BF
|
||||
* Kernel ERROR CODES : $C0->$FF
|
||||
|
@ -1,8 +1,6 @@
|
||||
PR#3
|
||||
PREFIX /A2OSX.BUILD
|
||||
NEW
|
||||
INC 1
|
||||
AUTO 6
|
||||
PREFIX /A2OSX.BUILD
|
||||
AUTO 4,1
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
* SSC/ACIA 6551 I/O
|
||||
|
76
INC/GUI.I.txt
Normal file
76
INC/GUI.I.txt
Normal file
@ -0,0 +1,76 @@
|
||||
NEW
|
||||
PREFIX /A2OSX.BUILD
|
||||
AUTO 4,1
|
||||
.LIST OFF
|
||||
.OP 65C02
|
||||
*--------------------------------------
|
||||
S.CB.CMD .EQ 0
|
||||
S.CB.CMD.SETPIXEL .EQ 0
|
||||
S.CB.CMD.GETPIXEL .EQ 2
|
||||
S.CB.CMD.HLINE .EQ 4
|
||||
S.CB.CMD.VLINE .EQ 6
|
||||
S.CB.CMD.FILLRECT .EQ 8
|
||||
S.CB.CMD.BITBLT .EQ 10
|
||||
S.CB.CMD.GETRECTBUFSIZE .EQ 12
|
||||
S.CB.CMD.DRAWLINE .EQ 14
|
||||
S.CB.CMD.DRAWTEXT .EQ 16
|
||||
S.CB.OP .EQ 1
|
||||
S.CB.OP.XOR .EQ 0 screen EOR bitmap -> Screen
|
||||
S.CB.OP.SET .EQ 2 replace screen with bitmap
|
||||
S.CB.OP.ORA .EQ 4 combine screen & bitmap -> Screen
|
||||
S.CB.OP.MASK .EQ %00001000 Apply BitMap mask before painting
|
||||
S.CB.OP.SAVE .EQ %00010000 Save Screen to DstPtr before painting
|
||||
S.CB.OP.RESTORE .EQ %00100000 Restore Screen From DstPtr
|
||||
S.CB.OP.COLOR .EQ %01000000 Assume BitMap is COLOR
|
||||
|
||||
S.CB.OP.F.B .EQ %00010000
|
||||
S.CB.OP.F.I .EQ %00100000
|
||||
S.CB.OP.F.U .EQ %01000000
|
||||
S.CB.OP.F.G .EQ %10000000
|
||||
S.CB.M .EQ 2
|
||||
S.CB.M.MONO .EQ %00000001 b/w (1 bit/pixel)
|
||||
*S.CB.M.C4 .EQ %00000010
|
||||
*S.CB.M.C8 .EQ %00000100
|
||||
S.CB.M.C16 .EQ %00001000 16 colors (4 bits/pixel)
|
||||
*S.CB.M.C256 .EQ %00010000 256 colors (8 bits/pixel)
|
||||
S.CB.COLOR .EQ 3 xPIXEL,xLINE,FILLRECT
|
||||
S.CB.hFont .EQ 3 DRAWTEXT
|
||||
S.CB.X1 .EQ 4 xPIXEL,xLINE,FILLRECT,BITBLT,GETRECTBUFSIZE,DRAWLINE
|
||||
S.CB.Y1 .EQ 6 xPIXEL,xLINE,FILLRECT,BITBLT,GETRECTBUFSIZE,DRAWLINE
|
||||
S.CB.X2 .EQ 8 VLINE,FILLRECT,DRAWLINE
|
||||
S.CB.Y2 .EQ 10 HLINE,FILLRECT,DRAWLINE
|
||||
S.CB.SrcW .EQ 8 BITBLT,GETRECTBUFSIZE
|
||||
S.CB.SrcH .EQ 10 BITBLT,GETRECTBUFSIZE
|
||||
S.CB.DstX .EQ 12 BITBLT,DRAWTEXT
|
||||
S.CB.DstY .EQ 14 BITBLT,DRAWTEXT
|
||||
S.CB.SrcPtr .EQ 16 BITBLT
|
||||
S.CB.TxtPtr .EQ 16 DRAWTEXT
|
||||
S.CB.DstPtr .EQ 18 BITBLT
|
||||
*
|
||||
S.CB .EQ 20
|
||||
*--------------------------------------
|
||||
S.BM.F .EQ 0
|
||||
S.BM.F.BBP1 .EQ %00000001
|
||||
S.BM.F.BBP2 .EQ %00000010
|
||||
S.BM.F.BBP4 .EQ %00000100
|
||||
S.BM.F.BBP8 .EQ %00001000
|
||||
S.BM.RowBytes .EQ 1
|
||||
S.BM.W .EQ 2
|
||||
S.BM.H .EQ 4
|
||||
S.BM.MASK.OFS .EQ 6
|
||||
*
|
||||
S.BM .EQ 8
|
||||
*--------------------------------------
|
||||
S.FON.F .EQ 0
|
||||
S.FON.Ascent .EQ 1
|
||||
S.FON.PixW .EQ 2 if 0, variable W
|
||||
S.FON.PixH .EQ 3
|
||||
S.FON.First .EQ 4
|
||||
S.FON.Last .EQ 5
|
||||
S.FON.Default .EQ 6
|
||||
S.FON.Break .EQ 7
|
||||
*
|
||||
S.FON .EQ 8
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE /A2OSX.BUILD/INC/GUI.I
|
@ -1,8 +1,6 @@
|
||||
PR#3
|
||||
PREFIX /A2OSX.BUILD
|
||||
NEW
|
||||
INC 1
|
||||
AUTO 6
|
||||
PREFIX /A2OSX.BUILD
|
||||
AUTO 4,1
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
* Software Switches
|
||||
|
@ -1,8 +1,6 @@
|
||||
PR#3
|
||||
PREFIX /A2OSX.BUILD
|
||||
NEW
|
||||
INC 1
|
||||
AUTO 6
|
||||
PREFIX /A2OSX.BUILD
|
||||
AUTO 4,1
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
.MA DEBUG
|
||||
|
@ -1,8 +1,6 @@
|
||||
PR#3
|
||||
PREFIX /A2OSX.BUILD
|
||||
NEW
|
||||
INC 1
|
||||
AUTO 6
|
||||
PREFIX /A2OSX.BUILD
|
||||
AUTO 4,1
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
* NIC Devices
|
||||
|
@ -22,7 +22,7 @@ CLIP.HLine
|
||||
CLIP.VLine
|
||||
|
||||
CLIP.Rect
|
||||
|
||||
CLIP.Text
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
@ -318,8 +318,18 @@ DrawLine.IncX lda DX
|
||||
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
DrawText
|
||||
rts
|
||||
DrawText >LDYA L.CB.Cache
|
||||
ldx #0
|
||||
|
||||
jsr SYS.GuiOSD.JMP
|
||||
bcs .9
|
||||
|
||||
jsr GoDevGfx
|
||||
|
||||
lda CB.Cache+S.CB.SrcPtr
|
||||
>SYSCALL FreeStkObj.A
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE /A2OSX.SRC/LIB/LIBGUI.S.DRAW
|
||||
|
@ -101,6 +101,7 @@ J.Clip .DA CLIP.Point SETPIXEL
|
||||
.DA CLIP.BitBlt
|
||||
.DA CLIP.Rect GETRECTBUFSIZE
|
||||
.DA CLIP.Line
|
||||
.DA CLIP.Text
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
LIB.LOAD
|
||||
@ -286,6 +287,7 @@ CB.CmdLen .DA S.CB.Y1+1 SETPIXEL
|
||||
.DA S.CB.DstPtr+1 BITBLT
|
||||
.DA S.CB.DstPtr+1 GETRECTBUFSIZE
|
||||
.DA S.CB.Y2+1 DRAWLINE
|
||||
.DA S.CB.TxtPtr+1 DRAWTEXT
|
||||
*--------------------------------------
|
||||
MouseClamp .BS 8
|
||||
*--------------------------------------
|
||||
@ -295,6 +297,7 @@ GC.TaskBar .BS S.GC
|
||||
*--------------------------------------
|
||||
GC.Cache .BS S.GC
|
||||
CB.Cache .BS S.CB
|
||||
BM.Cache .BS S.BM
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE /A2OSX.SRC/LIB/LIBGUI.S
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
+ **A2OSX.BOOT.po** : **(0.9.1)** 140k BOOT disk image with all binaries
|
||||
+ **A2OSX.DEV.po** : **(0.9.1)** 140k disk image with ASM binaries, Debug Tools & INClude files
|
||||
+ **A2OSX.BUILD.po** : **(0.9.1)** 800k BOOT disk image with S-C MASM 2.0 and all binaries (BOOT+DEV)
|
||||
+ **A2OSX.BUILD.po** : **(0.9.1)** 800k BOOT disk image with S-C MASM 3.0 and all binaries (BOOT+DEV)
|
||||
+ **A2OSX.SRC.po** : **(0.9.1)** 800k disk image with all sources
|
||||
|
||||
## Latest News 2017-11-08
|
||||
|
@ -38,8 +38,9 @@ L.LIBGUI .DA LIBGUI
|
||||
L.SYSFONT .DA SYSFONT
|
||||
L.Filename .DA Filename
|
||||
L.MouseData .DA MouseData
|
||||
L.CB.Rect .DA CB.Rect
|
||||
L.CB.Paint .DA CB.Paint
|
||||
L.BM.Apple .DA BM.Apple
|
||||
L.TXT.Sample .DA TXT.Sample
|
||||
L.CB.Marylin .DA CB.Marylin
|
||||
L.CB.DrawLine .DA CB.DrawLine
|
||||
L.GC.Clip .DA GC.Clip
|
||||
@ -63,6 +64,7 @@ CS.INIT >LDYA L.MSG.INIT
|
||||
>SYSCALL LoadStkObj
|
||||
bcs .99
|
||||
sta hSYSFONT
|
||||
sta CB.DrawText+S.CB.hFont
|
||||
|
||||
>PUSHWI 0 Aux type
|
||||
>PUSHBI $CB Type
|
||||
@ -73,6 +75,12 @@ CS.INIT >LDYA L.MSG.INIT
|
||||
|
||||
sta CB.Marylin+S.CB.SrcPtr
|
||||
|
||||
>LDYA L.TXT.Sample
|
||||
>STYA CB.DrawText+S.CB.TxtPtr
|
||||
|
||||
>LDYA L.BM.Apple
|
||||
>STYA CB.Apple+S.CB.SrcPtr
|
||||
|
||||
jsr Destop.Paint
|
||||
|
||||
lda #CUR.T.ARROW
|
||||
@ -153,10 +161,7 @@ Destop.Paint >LIBCALL hLIBGUI,LIBGUI.HideCursor
|
||||
|
||||
>LIBCALL hLIBGUI,LIBGUI.GetScreenGC
|
||||
>PUSHYA
|
||||
|
||||
>LDYA L.BM.Apple
|
||||
>STYA CB.Apple+S.CB.SrcPtr
|
||||
>PUSHW L.CB.Rect
|
||||
>PUSHW L.CB.Paint
|
||||
>LIBCALL hLIBGUI,LIBGUI.Draw
|
||||
|
||||
* >LIBCALL hLIBGUI,LIBGUI.GetScreenGC
|
||||
@ -182,7 +187,7 @@ SYSFONT >CSTR "/A2OSX.BUILD/SBIN/GUI/SYSTEM"
|
||||
*--------------------------------------
|
||||
MouseData .BS S.MOUSE
|
||||
*--------------------------------------
|
||||
CB.Rect .DA #S.CB.CMD.FILLRECT
|
||||
CB.Paint .DA #S.CB.CMD.FILLRECT
|
||||
.DA #S.CB.OP.SET
|
||||
.DA #S.CB.M.MONO
|
||||
.DA #1
|
||||
@ -199,7 +204,6 @@ CB.Rect .DA #S.CB.CMD.FILLRECT
|
||||
.DA 20 Y1
|
||||
.DA 519 X2
|
||||
.DA 171 Y2
|
||||
|
||||
*--------------------------------------
|
||||
CB.Apple .DA #S.CB.CMD.BITBLT
|
||||
.DA #S.CB.OP.SET
|
||||
@ -208,30 +212,42 @@ CB.Apple .DA #S.CB.CMD.BITBLT
|
||||
.DA 0 X1
|
||||
.DA 0 Y1
|
||||
.DA 16 W
|
||||
.DA 9 H
|
||||
.DA 7 H
|
||||
.DA 28 DestX
|
||||
.DA 180 DestY
|
||||
.BS 2 SrcPtr
|
||||
.DA 0
|
||||
|
||||
.DA 0 DstPtr
|
||||
*--------------------------------------
|
||||
CB.DrawText .DA #S.CB.CMD.DRAWTEXT
|
||||
.DA #S.CB.OP.SET OP
|
||||
.DA #S.CB.M.MONO M
|
||||
.BS 1 hFont
|
||||
.DA 0 X1
|
||||
.DA 0 Y1
|
||||
.DA 0 SrcW
|
||||
.DA 0 SrcH
|
||||
.DA 4 DstX
|
||||
.DA 7 DstY
|
||||
.BS 2 TxtPtr
|
||||
*--------------------------------------
|
||||
.DA #0
|
||||
*--------------------------------------
|
||||
BM.Apple .DA #S.BM.F.BBP4
|
||||
.DA #2 RowBytes
|
||||
.DA 16 W
|
||||
.DA 9 H
|
||||
.DA 7 H
|
||||
.DA 0
|
||||
|
||||
.HS FFF6 green (8)
|
||||
.HS 6FF6 green (8)
|
||||
.HS 6666 green (8)
|
||||
.HS EEEE yellow (15)
|
||||
.HS CCFC orange (14)
|
||||
.HS 88F8 magenta (10)
|
||||
.HS 9999 violet (11)
|
||||
.HS 1111 Dark blue (4)
|
||||
.HS 1FF1 Dark blue (4)
|
||||
*--------------------------------------
|
||||
TXT.Sample >CSTR "@@@@@@@@@ This Is A Sample Text with System Font Height=7px, Variable Width {}[] #0123456789$ @@@@@@@@@"
|
||||
*--------------------------------------
|
||||
CB.Marylin .DA #S.CB.CMD.BITBLT
|
||||
.DA #S.CB.OP.SET
|
||||
.DA #S.CB.M.MONO
|
||||
@ -241,9 +257,9 @@ CB.Marylin .DA #S.CB.CMD.BITBLT
|
||||
.DA 141 W
|
||||
.DA 150 H
|
||||
.DA 200 DestX
|
||||
.DA 35 DestY
|
||||
.DA 21 DestY
|
||||
.BS 2 SrcPtr
|
||||
.DA 0
|
||||
.DA 0 DstPtr
|
||||
|
||||
.DA #0
|
||||
*--------------------------------------
|
||||
|
@ -6,8 +6,8 @@ AUTO 4,1
|
||||
.LIST ON
|
||||
*--------------------------------------
|
||||
A2osX.MAIN.S .EQ A2osX.AUX-A2osX.MAIN
|
||||
A2osX.AUX.S .EQ A2osX.GP-A2osX.AUX
|
||||
A2osX.GP.S .EQ A2osX.D1-A2osX.GP
|
||||
A2osX.AUX.S .EQ A2osX.GP-A2osX.AUX
|
||||
A2osX.GP.S .EQ A2osX.D1-A2osX.GP
|
||||
A2osX.D1.S .EQ A2osX.D2-A2osX.D1
|
||||
A2osX.D2.S .EQ A2osX.E0-A2osX.D2
|
||||
A2osX.E0.S .EQ A2osX.E0.E-A2osX.E0
|
||||
|
@ -405,15 +405,6 @@ K.SYSCALL.BANK .DA #RRAMWRAMBNK1 $00
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA 0
|
||||
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
.DA 0 $F0
|
||||
.DA 0
|
||||
@ -423,15 +414,22 @@ K.SYSCALL.BANK .DA #RRAMWRAMBNK1 $00
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA 0
|
||||
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
K.GUIOSD.JMP sta SETREADAUX
|
||||
sta SETWRITEAUX
|
||||
jsr X.GUIOSD
|
||||
sta CLRREADAUX
|
||||
sta CLRWRITEAUX
|
||||
rts
|
||||
*--------------------------------------
|
||||
TXTPTR.GetNext sta CLRREADAUX
|
||||
lda (TXTPTR)
|
||||
sta SETREADAUX
|
||||
beq .9
|
||||
inc TXTPTR
|
||||
bne .9
|
||||
inc TXTPTR+1
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
PullP1P2P3 sec
|
||||
.HS 90 bcc
|
||||
|
778
SYS/KERNEL.S.OSD.txt
Normal file
778
SYS/KERNEL.S.OSD.txt
Normal file
@ -0,0 +1,778 @@
|
||||
NEW
|
||||
PREFIX /A2OSX.BUILD
|
||||
AUTO 4,1
|
||||
*--------------------------------------
|
||||
ZPCmdPtr .EQ ZPDRV
|
||||
ZPDstBMPtr .EQ ZPDRV+2
|
||||
ZPFontPtr .EQ ZPDRV+4
|
||||
ZPTablePtr .EQ ZPDRV+6
|
||||
ZPCharPtr .EQ ZPDRV+8
|
||||
ZPSrcBMPtr .EQ ZPDRV+10
|
||||
ZPTmpPtr .EQ ZPDRV+14
|
||||
*--------------------------------------
|
||||
* YA =Ptr to S.CB in MAIN
|
||||
* X = DstBM hMem
|
||||
*--------------------------------------
|
||||
X.GUIOSD >STYA ZPCmdPtr
|
||||
|
||||
>STYA A1L Src Start Address (MAIN)
|
||||
pha
|
||||
|
||||
tya
|
||||
clc
|
||||
adc #S.CB-1
|
||||
sta A2L Src End Address (MAIN)
|
||||
pla
|
||||
adc /S.CB-1
|
||||
sta A2L+1
|
||||
|
||||
>LDYAI CB.Cache
|
||||
>STYA A4L Dst Address (AUX)
|
||||
|
||||
sec Main To Aux
|
||||
jsr AuxMove
|
||||
|
||||
txa
|
||||
beq .3
|
||||
|
||||
jsr GO.GetMemPtr.A
|
||||
|
||||
>STYA ZPDstBMPtr
|
||||
|
||||
ldx #0
|
||||
|
||||
.1 lda (ZPDstBMPtr)
|
||||
sta DstBM.Cache,x
|
||||
inc ZPDstBMPtr
|
||||
bne .2
|
||||
inc ZPDstBMPtr+1
|
||||
.2 inx
|
||||
cpx #S.BM
|
||||
bne .1
|
||||
|
||||
.3 ldx CB.Cache+S.CB.CMD
|
||||
|
||||
jmp (J.Cmds,x)
|
||||
*--------------------------------------
|
||||
J.Cmds .DA SETPIXEL
|
||||
.DA GETPIXEL
|
||||
.DA HLINE
|
||||
.DA VLINE
|
||||
.DA FILLRECT
|
||||
.DA BITBLT
|
||||
.DA GETRECTBUFSIZE
|
||||
.DA $ffff DRAWLINE
|
||||
.DA DRAWTEXT
|
||||
*--------------------------------------
|
||||
SETPIXEL >LDYA CB.Cache+S.CB.Y1
|
||||
ldx DstBM.Cache+S.BM.RowBytes
|
||||
jsr YAMultX
|
||||
|
||||
pha
|
||||
tya
|
||||
|
||||
clc
|
||||
adc ZPDstBMPtr
|
||||
sta ZPDstBMPtr
|
||||
pla
|
||||
adc ZPDstBMPtr+1
|
||||
sta ZPDstBMPtr+1
|
||||
|
||||
lda CB.Cache+S.CB.M
|
||||
bit #S.CB.M.C16
|
||||
bne SETPIXEL.C16
|
||||
|
||||
SETPIXEL.MONO lda CB.Cache+S.CB.X1
|
||||
pha
|
||||
and #$7 MOD 7
|
||||
tax
|
||||
pla
|
||||
lsr CB.Cache+S.CB.X1
|
||||
ror
|
||||
lsr CB.Cache+S.CB.X1
|
||||
ror
|
||||
lsr CB.Cache+S.CB.X1
|
||||
ror
|
||||
clc
|
||||
adc ZPDstBMPtr
|
||||
sta ZPDstBMPtr
|
||||
|
||||
lda CB.Cache+S.CB.X1
|
||||
adc ZPDstBMPtr+1
|
||||
sta ZPDstBMPtr+1
|
||||
|
||||
lda CB.Cache+S.CB.OP
|
||||
* cmp #S.CB.OP.XOR
|
||||
beq .2
|
||||
|
||||
lda CB.Cache+S.CB.COLOR
|
||||
bne .1
|
||||
|
||||
lda (ZPDstBMPtr)
|
||||
and Mono.NMasks,x
|
||||
sta (ZPDstBMPtr)
|
||||
rts
|
||||
|
||||
.1 lda (ZPDstBMPtr)
|
||||
ora Mono.Masks,x
|
||||
sta (ZPDstBMPtr)
|
||||
rts
|
||||
|
||||
.2 lda (ZPDstBMPtr)
|
||||
eor Mono.Masks,x
|
||||
sta (ZPDstBMPtr)
|
||||
rts
|
||||
SETPIXEL.C16
|
||||
*--------------------------------------
|
||||
GETPIXEL
|
||||
*--------------------------------------
|
||||
HLINE
|
||||
*--------------------------------------
|
||||
VLINE
|
||||
*--------------------------------------
|
||||
FILLRECT
|
||||
*--------------------------------------
|
||||
* BitBlt
|
||||
* S.CB.X1 : SrcX1 in bitmap/mask
|
||||
* S.CB.Y1 : SrcY1
|
||||
* S.CB.SrcW : width
|
||||
* S.CB.SrcH : height
|
||||
|
||||
* S.CB.DstX : Destination X (screen)
|
||||
* S.CB.DstY : Destination Y (screen)
|
||||
|
||||
* S.CB.SrcPtr : pointer to S.BM
|
||||
* S.CB.SrcPtr+1 = 0, hMem in S.CB.SrcPtr
|
||||
* S.CB.DstPtr : pointer to Save Buffer
|
||||
*--------------------------------------
|
||||
BITBLT >LDYA CB.CACHE+S.CB.SrcPtr
|
||||
bne BITBLT.1
|
||||
|
||||
tya
|
||||
jsr GO.GetMemPtr.A
|
||||
|
||||
BITBLT.1 >STYA ZPSrcBMPtr
|
||||
|
||||
|
||||
*--------------------------------------
|
||||
* In:
|
||||
* S.CB.SrcW
|
||||
* S.CB.SrcH
|
||||
* Out:
|
||||
* S.CB.DstPtr : Buffer Size (in bytes)
|
||||
*--------------------------------------
|
||||
GETRECTBUFSIZE
|
||||
|
||||
GETRECTBUFSIZE.RTS
|
||||
rts
|
||||
*--------------------------------------
|
||||
* In:
|
||||
* S.CB.S.CB.FONT : hFont
|
||||
* S.CB.SrcPtr : Ptr to Text
|
||||
* S.CB.DstPtr : Buffer Size (in bytes)
|
||||
* Out:
|
||||
* A=hBM
|
||||
*--------------------------------------
|
||||
DRAWTEXT lda CB.Cache+S.CB.hFONT
|
||||
jsr GO.GetMemPtr.A
|
||||
>STYA ZPFontPtr
|
||||
|
||||
ldy #S.FON-1
|
||||
|
||||
.1 lda (ZPFontPtr),y
|
||||
sta FON.Cache,y
|
||||
dey
|
||||
bpl .1
|
||||
|
||||
lda ZPFontPtr
|
||||
clc
|
||||
adc #S.FON
|
||||
sta ZPTablePtr
|
||||
lda ZPFontPtr+1
|
||||
adc /S.FON
|
||||
sta ZPTablePtr+1
|
||||
|
||||
.2 >LDYA CB.Cache+S.CB.TxtPtr
|
||||
>STYA TXTPTR
|
||||
|
||||
lda #S.BM.F.BBP1
|
||||
sta DstBM.Cache+S.BM.F
|
||||
|
||||
stz DstBM.Cache+S.BM.W
|
||||
stz DstBM.Cache+S.BM.W+1
|
||||
|
||||
lda FON.Cache+S.FON.PixH
|
||||
sta DstBM.Cache+S.BM.H
|
||||
stz DstBM.Cache+S.BM.H+1
|
||||
|
||||
sta CB.Cache+S.CB.SrcH
|
||||
stz CB.Cache+S.CB.SrcH+1
|
||||
|
||||
.3 jsr TXTPTR.GetNext
|
||||
beq .4
|
||||
|
||||
jsr FON.GetChar
|
||||
lda (ZPCharPtr) Get Char PixelW
|
||||
sec
|
||||
adc DstBM.Cache+S.BM.W
|
||||
sta DstBM.Cache+S.BM.W
|
||||
bcc .3
|
||||
|
||||
inc DstBM.Cache+S.BM.W+1
|
||||
bra .3
|
||||
|
||||
.4 >LDYA DstBM.Cache+S.BM.W
|
||||
>STYA CB.Cache+S.CB.SrcW
|
||||
|
||||
jsr BM.Create
|
||||
bcs GETRECTBUFSIZE.RTS
|
||||
|
||||
sta DRAWTEXT.END+1 save hBM, ZPDstBMPtr=BMData
|
||||
|
||||
>LDYA CB.Cache+S.CB.TxtPtr
|
||||
>STYA TXTPTR
|
||||
|
||||
stz GWORD reset Col index in BM
|
||||
stz GWORD+1 reset Bit index in Col
|
||||
|
||||
DRAWTEXT.LOOP jsr TXTPTR.GetNext
|
||||
beq DRAWTEXT.END
|
||||
|
||||
jsr FON.GetChar
|
||||
|
||||
lda (ZPCharPtr) Char PixW
|
||||
sta GBYTE
|
||||
|
||||
jsr CHAR.GetNext Char ByteW
|
||||
sta GBYTE2
|
||||
|
||||
>LDYA ZPDstBMPtr
|
||||
>STYA ZPTmpPtr
|
||||
|
||||
lda GWORD+1 Get Bit Index for shifting
|
||||
jsr DRAWTEXT.JMP
|
||||
|
||||
lda GBYTE Get Char PixW
|
||||
sec +1 for char spacing
|
||||
adc GWORD+1 Add Bit index in Col
|
||||
pha
|
||||
and #7 mod 7
|
||||
sta GWORD+1 Update Bit index in Col
|
||||
|
||||
pla
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
clc
|
||||
adc GWORD Update Col Index in BM
|
||||
sta GWORD
|
||||
bra DRAWTEXT.LOOP
|
||||
|
||||
DRAWTEXT.END lda #$FF SELF MODIFIED
|
||||
sta CB.Cache+S.CB.SrcPtr Save hBM in Src CB
|
||||
stz CB.Cache+S.CB.SrcPtr+1
|
||||
|
||||
lda #S.CB.CMD.BITBLT
|
||||
sta CB.Cache+S.CB.CMD
|
||||
|
||||
jsr CB.Update
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
DRAWTEXT.JMP asl
|
||||
tax
|
||||
jmp (.1,x)
|
||||
.1 .DA DRAWTEXT.SHIFT0
|
||||
.DA DRAWTEXT.SHIFT1
|
||||
.DA DRAWTEXT.SHIFT26
|
||||
.DA DRAWTEXT.SHIFT26
|
||||
.DA DRAWTEXT.SHIFT26
|
||||
.DA DRAWTEXT.SHIFT26
|
||||
.DA DRAWTEXT.SHIFT26
|
||||
.DA DRAWTEXT.SHIFT7
|
||||
*--------------------------------------
|
||||
DRAWTEXT.SHIFT0 lda FON.Cache+S.FON.PixH
|
||||
|
||||
.6 pha save Height counter
|
||||
|
||||
ldx GBYTE2 init Width counter
|
||||
ldy GWORD get col index in BM
|
||||
|
||||
.7 jsr CHAR.GetNext
|
||||
|
||||
sta (ZPTmpPtr),y
|
||||
iny
|
||||
|
||||
dex
|
||||
bne .7
|
||||
|
||||
lda ZPTmpPtr
|
||||
clc
|
||||
adc DstBM.Cache+S.BM.RowBytes
|
||||
sta ZPTmpPtr
|
||||
bcc .10
|
||||
|
||||
inc ZPTmpPtr+1
|
||||
|
||||
.10 pla get back Height counter
|
||||
dec
|
||||
bne .6
|
||||
rts
|
||||
*--------------------------------------
|
||||
DRAWTEXT.SHIFT1 lda FON.Cache+S.FON.PixH
|
||||
|
||||
.1 pha save Height counter
|
||||
|
||||
clc make sure reset first bit in line for initial ORA
|
||||
|
||||
ldx GBYTE2 init Width counter
|
||||
ldy GWORD get col index in BM
|
||||
|
||||
.2 jsr CHAR.GetNext
|
||||
|
||||
rol 8th bit in ->carry, 1st bit from carry
|
||||
|
||||
sta (ZPTmpPtr),y
|
||||
iny
|
||||
|
||||
dex
|
||||
bne .2
|
||||
|
||||
lda ZPTmpPtr Next line...
|
||||
clc
|
||||
adc DstBM.Cache+S.BM.RowBytes
|
||||
sta ZPTmpPtr
|
||||
bcc .3
|
||||
|
||||
inc ZPTmpPtr+1
|
||||
|
||||
.3 pla get back Height counter
|
||||
dec
|
||||
bne .1
|
||||
rts
|
||||
*--------------------------------------
|
||||
DRAWTEXT.SHIFT26
|
||||
ldx GWORD+1 Get Bit Index for shifting
|
||||
lda SHIFT8.LL-1,x
|
||||
sta .3+1
|
||||
lda SHIFT8.LH-1,x
|
||||
sta .3+2
|
||||
|
||||
lda SHIFT8.LL,x
|
||||
sta .4+1
|
||||
lda SHIFT8.LH,x
|
||||
sta .4+2
|
||||
|
||||
lda FON.Cache+S.FON.PixH
|
||||
|
||||
.1 pha save Height counter
|
||||
|
||||
lda GWORD
|
||||
sta ColIndex
|
||||
lda GBYTE2
|
||||
|
||||
.2 pha save Width counter
|
||||
|
||||
jsr CHAR.GetNext
|
||||
|
||||
and First.Masks,x x = 2->6, for X=3 : A=000xxxxx
|
||||
tay Range 0..127
|
||||
|
||||
.3 lda $FFFF,y SELF MODIFIED ShiftL3 A=xxxxx000
|
||||
|
||||
ldy ColIndex get col index in BM
|
||||
ora (ZPTmpPtr),y
|
||||
sta (ZPTmpPtr),y
|
||||
inc ColIndex
|
||||
|
||||
lda (ZPCharPtr)
|
||||
and Last.Masks,x x = 2->6, for X=3 : A=xxx00000
|
||||
lsr Range 0..127 !! A=0xxx0000
|
||||
|
||||
tay but SHIFTL(x+1) A=00000xxx
|
||||
|
||||
.4 lda $FFFF,y SELF MODIFIED
|
||||
|
||||
ldy ColIndex get col index in BM
|
||||
sta (ZPTmpPtr),y
|
||||
|
||||
pla get back Witdh counter
|
||||
dec
|
||||
bne .2
|
||||
|
||||
lda ZPTmpPtr
|
||||
clc
|
||||
adc DstBM.Cache+S.BM.RowBytes
|
||||
sta ZPTmpPtr
|
||||
bcc .5
|
||||
|
||||
inc ZPTmpPtr+1
|
||||
|
||||
.5 pla get back Height counter
|
||||
dec
|
||||
bne .1
|
||||
rts
|
||||
*--------------------------------------
|
||||
DRAWTEXT.SHIFT7 lda FON.Cache+S.FON.PixH
|
||||
|
||||
.1 pha save Height counter
|
||||
|
||||
ldx GBYTE2 init Width counter
|
||||
ldy GWORD get col index in BM
|
||||
|
||||
.2 jsr CHAR.GetNext
|
||||
|
||||
lsr 1st bit in carry, for COL 1
|
||||
pha Other 7 bits for COL 2
|
||||
|
||||
lda #0
|
||||
ror get back 1st bit, -> for bit 8
|
||||
|
||||
ora (ZPTmpPtr),y
|
||||
sta (ZPTmpPtr),y
|
||||
iny
|
||||
|
||||
pla get back bit 1->8 already shifted Left 7 (= Shift right 1)
|
||||
sta (ZPTmpPtr),y
|
||||
|
||||
dex
|
||||
bne .2
|
||||
|
||||
lda ZPTmpPtr
|
||||
clc
|
||||
adc DstBM.Cache+S.BM.RowBytes
|
||||
sta ZPTmpPtr
|
||||
bcc .3
|
||||
|
||||
inc ZPTmpPtr+1
|
||||
|
||||
.3 pla get back Height counter
|
||||
dec
|
||||
bne .1
|
||||
rts
|
||||
*--------------------------------------
|
||||
CHAR.GetNext inc ZPCharPtr
|
||||
bne .8
|
||||
inc ZPCharPtr+1
|
||||
.8 lda (ZPCharPtr)
|
||||
rts
|
||||
*--------------------------------------
|
||||
FON.GetChar cmp FON.Cache+S.FON.Last
|
||||
bcc .1
|
||||
bne .2
|
||||
|
||||
.1 sec
|
||||
sbc FON.Cache+S.FON.First
|
||||
bcs .3
|
||||
|
||||
.2 lda FON.Cache+S.FON.Default
|
||||
|
||||
.3 asl
|
||||
php
|
||||
clc
|
||||
adc ZPTablePtr
|
||||
sta ZPCharPtr
|
||||
|
||||
lda #0
|
||||
adc ZPTablePtr+1
|
||||
sta ZPCharPtr+1
|
||||
|
||||
plp
|
||||
bcc .4
|
||||
inc ZPCharPtr+1
|
||||
|
||||
.4 lda (ZPCharPtr)
|
||||
clc
|
||||
adc ZPFontPtr
|
||||
pha
|
||||
ldy #1
|
||||
lda (ZPCharPtr),y
|
||||
adc ZPFontPtr+1
|
||||
sta ZPCharPtr+1
|
||||
pla
|
||||
sta ZPCharPtr
|
||||
rts
|
||||
*--------------------------------------
|
||||
BM.Create lda DstBM.Cache+S.BM.W
|
||||
ldx DstBM.Cache+S.BM.W+1
|
||||
bit #7
|
||||
beq .1
|
||||
and #$F8
|
||||
clc
|
||||
adc #8
|
||||
bcc .1
|
||||
inx
|
||||
|
||||
.1 sta DstBM.Cache+S.BM.RowBytes
|
||||
txa
|
||||
|
||||
lsr
|
||||
ror DstBM.Cache+S.BM.RowBytes
|
||||
lsr
|
||||
ror DstBM.Cache+S.BM.RowBytes
|
||||
lsr
|
||||
ror DstBM.Cache+S.BM.RowBytes
|
||||
|
||||
>LDYA DstBM.Cache+S.BM.H
|
||||
ldx DstBM.Cache+S.BM.RowBytes
|
||||
|
||||
jsr YAMultX
|
||||
|
||||
pha
|
||||
tya
|
||||
clc
|
||||
adc #S.BM
|
||||
tay
|
||||
pla
|
||||
adc /S.BM
|
||||
jsr GO.GetMem.YA
|
||||
bcs .9
|
||||
|
||||
>STYA ZPDstBMPtr
|
||||
|
||||
ldy #S.BM-1
|
||||
|
||||
.2 lda DstBM.Cache,y
|
||||
sta (ZPDstBMPtr),y
|
||||
dey
|
||||
bpl .2
|
||||
|
||||
lda ZPDstBMPtr
|
||||
* clc
|
||||
adc #S.BM
|
||||
sta ZPDstBMPtr
|
||||
bcc .8
|
||||
|
||||
inc ZPDstBMPtr+1
|
||||
|
||||
.8 txa hBM
|
||||
|
||||
clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
* IN:
|
||||
* Y,A = num1 (16)
|
||||
* X = num2 (8)
|
||||
* OUT:
|
||||
* Y,A = (Y,A) * X
|
||||
*--------------------------------------
|
||||
YAMultX stx GBYTE
|
||||
|
||||
sty GWORD
|
||||
sta GWORD+1
|
||||
|
||||
ldy #0 Result LO
|
||||
tya Result HI
|
||||
|
||||
bra .3
|
||||
|
||||
.1 pha
|
||||
tya
|
||||
clc
|
||||
adc GWORD
|
||||
tay
|
||||
pla
|
||||
adc GWORD+1
|
||||
|
||||
.2 asl GWORD
|
||||
rol GWORD+1
|
||||
|
||||
.3 lsr GBYTE
|
||||
bcs .1
|
||||
bne .2
|
||||
rts
|
||||
*--------------------------------------
|
||||
CB.Update >LDYA ZPCmdPtr
|
||||
>STYA A4L Dst Start Address (MAIN)
|
||||
|
||||
>LDYAI CB.Cache
|
||||
>STYA A1L Src Start Address (AUX)
|
||||
|
||||
>LDYAI CB.Cache+S.CB-1
|
||||
>STYA A2L Src End Address (AUX)
|
||||
|
||||
clc Aux To Main
|
||||
jmp AuxMove
|
||||
*--------------------------------------
|
||||
GO.GetMem.YA ldx #SYS.GetMem.YA
|
||||
.HS 2C BIT ABS
|
||||
GO.GetMemPtr.A ldx #SYS.GetMemPtr.A
|
||||
jmp (K.SYSCALL.JMP,x)
|
||||
*--------------------------------------
|
||||
CB.Cache .BS S.CB
|
||||
FON.Cache .BS S.FON
|
||||
SrcBM.Cache .BS S.BM
|
||||
DstBM.Cache .BS S.BM
|
||||
ColIndex .BS 1
|
||||
GBYTE .BS 1
|
||||
GBYTE2 .BS 1
|
||||
GWORD .BS 2
|
||||
*--------------------------------------
|
||||
Mono.NMasks .DA #%11111110
|
||||
.DA #%11111101
|
||||
.DA #%11111011
|
||||
.DA #%11110111
|
||||
.DA #%11101111
|
||||
.DA #%11011111
|
||||
.DA #%10111111
|
||||
.DA #%01111111
|
||||
*--------------------------------------
|
||||
Mono.Masks .DA #%00000001
|
||||
.DA #%00000010
|
||||
.DA #%00000100
|
||||
.DA #%00001000
|
||||
.DA #%00010000
|
||||
.DA #%00100000
|
||||
.DA #%01000000
|
||||
.DA #%10000000
|
||||
*--------------------------------------
|
||||
First.Masks .DA #%11111111 Useless
|
||||
.DA #%01111111
|
||||
.DA #%00111111
|
||||
.DA #%00011111
|
||||
.DA #%00001111
|
||||
.DA #%00000111
|
||||
.DA #%00000011
|
||||
.DA #%00000001
|
||||
*--------------------------------------
|
||||
Last.Masks .DA #%00000000 Useless
|
||||
.DA #%10000000
|
||||
.DA #%11000000
|
||||
.DA #%11100000
|
||||
.DA #%11110000
|
||||
.DA #%11111000
|
||||
.DA #%11111100
|
||||
.DA #%11111110
|
||||
*--------------------------------------
|
||||
SHIFT8.LL .DA #SHIFT8.L1
|
||||
.DA #SHIFT8.L2
|
||||
.DA #SHIFT8.L3
|
||||
.DA #SHIFT8.L4
|
||||
.DA #SHIFT8.L5
|
||||
.DA #SHIFT8.L6
|
||||
.DA #SHIFT8.L7
|
||||
SHIFT8.LH .DA /SHIFT8.L1
|
||||
.DA /SHIFT8.L2
|
||||
.DA /SHIFT8.L3
|
||||
.DA /SHIFT8.L4
|
||||
.DA /SHIFT8.L5
|
||||
.DA /SHIFT8.L6
|
||||
.DA /SHIFT8.L7
|
||||
*--------------------------------------
|
||||
SHIFT8.L1 .DA #%00000000,#%00000010,#%00000100,#%00000110,#%00001000,#%00001010,#%00001100,#%00001110
|
||||
.DA #%00010000,#%00010010,#%00010100,#%00010110,#%00011000,#%00011010,#%00011100,#%00011110
|
||||
.DA #%00100000,#%00100010,#%00100100,#%00100110,#%00101000,#%00101010,#%00101100,#%00101110
|
||||
.DA #%00110000,#%00110010,#%00110100,#%00110110,#%00111000,#%00111010,#%00111100,#%00111110
|
||||
.DA #%01000000,#%01000010,#%01000100,#%01000110,#%01001000,#%01001010,#%01001100,#%01001110
|
||||
.DA #%01010000,#%01010010,#%01010100,#%01010110,#%01011000,#%01011010,#%01011100,#%01011110
|
||||
.DA #%01100000,#%01100010,#%01100100,#%01100110,#%01101000,#%01101010,#%01101100,#%01101110
|
||||
.DA #%01110000,#%01110010,#%01110100,#%01110110,#%01111000,#%01111010,#%01111100,#%01111110
|
||||
.DA #%10000000,#%10000010,#%10000100,#%10000110,#%10001000,#%10001010,#%10001100,#%10001110
|
||||
.DA #%10010000,#%10010010,#%10010100,#%10010110,#%10011000,#%10011010,#%10011100,#%10011110
|
||||
.DA #%10100000,#%10100010,#%10100100,#%10100110,#%10101000,#%10101010,#%10101100,#%10101110
|
||||
.DA #%10110000,#%10110010,#%10110100,#%10110110,#%10111000,#%10111010,#%10111100,#%10111110
|
||||
.DA #%11000000,#%11000010,#%11000100,#%11000110,#%11001000,#%11001010,#%11001100,#%11001110
|
||||
.DA #%11010000,#%11010010,#%11010100,#%11010110,#%11011000,#%11011010,#%11011100,#%11011110
|
||||
.DA #%11100000,#%11100010,#%11100100,#%11100110,#%11101000,#%11101010,#%11101100,#%11101110
|
||||
.DA #%11110000,#%11110010,#%11110100,#%11110110,#%11111000,#%11111010,#%11111100,#%11111110
|
||||
SHIFT8.L2 .DA #%00000000,#%00000100,#%00001000,#%00001100,#%00010000,#%00010100,#%00011000,#%00011100
|
||||
.DA #%00100000,#%00100100,#%00101000,#%00101100,#%00110000,#%00110100,#%00111000,#%00111100
|
||||
.DA #%01000000,#%01000100,#%01001000,#%01001100,#%01010000,#%01010100,#%01011000,#%01011100
|
||||
.DA #%01100000,#%01100100,#%01101000,#%01101100,#%01110000,#%01110100,#%01111000,#%01111100
|
||||
.DA #%10000000,#%10000100,#%10001000,#%10001100,#%10010000,#%10010100,#%10011000,#%10011100
|
||||
.DA #%10100000,#%10100100,#%10101000,#%10101100,#%10110000,#%10110100,#%10111000,#%10111100
|
||||
.DA #%11000000,#%11000100,#%11001000,#%11001100,#%11010000,#%11010100,#%11011000,#%11011100
|
||||
.DA #%11100000,#%11100100,#%11101000,#%11101100,#%11110000,#%11110100,#%11111000,#%11111100
|
||||
.DA #%00000001,#%00000101,#%00001001,#%00001101,#%00010001,#%00010101,#%00011001,#%00011101
|
||||
.DA #%00100001,#%00100101,#%00101001,#%00101101,#%00110001,#%00110101,#%00111001,#%00111101
|
||||
.DA #%01000001,#%01000101,#%01001001,#%01001101,#%01010001,#%01010101,#%01011001,#%01011101
|
||||
.DA #%01100001,#%01100101,#%01101001,#%01101101,#%01110001,#%01110101,#%01111001,#%01111101
|
||||
.DA #%10000001,#%10000101,#%10001001,#%10001101,#%10010001,#%10010101,#%10011001,#%10011101
|
||||
.DA #%10100001,#%10100101,#%10101001,#%10101101,#%10110001,#%10110101,#%10111001,#%10111101
|
||||
.DA #%11000001,#%11000101,#%11001001,#%11001101,#%11010001,#%11010101,#%11011001,#%11011101
|
||||
.DA #%11100001,#%11100101,#%11101001,#%11101101,#%11110001,#%11110101,#%11111001,#%11111101
|
||||
SHIFT8.L3 .DA #%00000000,#%00001000,#%00010000,#%00011000,#%00100000,#%00101000,#%00110000,#%00111000
|
||||
.DA #%01000000,#%01001000,#%01010000,#%01011000,#%01100000,#%01101000,#%01110000,#%01111000
|
||||
.DA #%10000000,#%10001000,#%10010000,#%10011000,#%10100000,#%10101000,#%10110000,#%10111000
|
||||
.DA #%11000000,#%11001000,#%11010000,#%11011000,#%11100000,#%11101000,#%11110000,#%11111000
|
||||
.DA #%00000001,#%00001001,#%00010001,#%00011001,#%00100001,#%00101001,#%00110001,#%00111001
|
||||
.DA #%01000001,#%01001001,#%01010001,#%01011001,#%01100001,#%01101001,#%01110001,#%01111001
|
||||
.DA #%10000001,#%10001001,#%10010001,#%10011001,#%10100001,#%10101001,#%10110001,#%10111001
|
||||
.DA #%11000001,#%11001001,#%11010001,#%11011001,#%11100001,#%11101001,#%11110001,#%11111001
|
||||
.DA #%00000010,#%00001010,#%00010010,#%00011010,#%00100010,#%00101010,#%00110010,#%00111010
|
||||
.DA #%01000010,#%01001010,#%01010010,#%01011010,#%01100010,#%01101010,#%01110010,#%01111010
|
||||
.DA #%10000010,#%10001010,#%10010010,#%10011010,#%10100010,#%10101010,#%10110010,#%10111010
|
||||
.DA #%11000010,#%11001010,#%11010010,#%11011010,#%11100010,#%11101010,#%11110010,#%11111010
|
||||
.DA #%00000011,#%00001011,#%00010011,#%00011011,#%00100011,#%00101011,#%00110011,#%00111011
|
||||
.DA #%01000011,#%01001011,#%01010011,#%01011011,#%01100011,#%01101011,#%01110011,#%01111011
|
||||
.DA #%10000011,#%10001011,#%10010011,#%10011011,#%10100011,#%10101011,#%10110011,#%10111011
|
||||
.DA #%11000011,#%11001011,#%11010011,#%11011011,#%11100011,#%11101011,#%11110011,#%11111011
|
||||
SHIFT8.L4 .DA #%00000000,#%00010000,#%00100000,#%00110000,#%01000000,#%01010000,#%01100000,#%01110000
|
||||
.DA #%10000000,#%10010000,#%10100000,#%10110000,#%11000000,#%11010000,#%11100000,#%11110000
|
||||
.DA #%00000001,#%00010001,#%00100001,#%00110001,#%01000001,#%01010001,#%01100001,#%01110001
|
||||
.DA #%10000001,#%10010001,#%10100001,#%10110001,#%11000001,#%11010001,#%11100001,#%11110001
|
||||
.DA #%00000010,#%00010010,#%00100010,#%00110010,#%01000010,#%01010010,#%01100010,#%01110010
|
||||
.DA #%10000010,#%10010010,#%10100010,#%10110010,#%11000010,#%11010010,#%11100010,#%11110010
|
||||
.DA #%00000011,#%00010011,#%00100011,#%00110011,#%01000011,#%01010011,#%01100011,#%01110011
|
||||
.DA #%10000011,#%10010011,#%10100011,#%10110011,#%11000011,#%11010011,#%11100011,#%11110011
|
||||
.DA #%00000100,#%00010100,#%00100100,#%00110100,#%01000100,#%01010100,#%01100100,#%01110100
|
||||
.DA #%10000100,#%10010100,#%10100100,#%10110100,#%11000100,#%11010100,#%11100100,#%11110100
|
||||
.DA #%00000101,#%00010101,#%00100101,#%00110101,#%01000101,#%01010101,#%01100101,#%01110101
|
||||
.DA #%10000101,#%10010101,#%10100101,#%10110101,#%11000101,#%11010101,#%11100101,#%11110101
|
||||
.DA #%00000110,#%00010110,#%00100110,#%00110110,#%01000110,#%01010110,#%01100110,#%01110110
|
||||
.DA #%10000110,#%10010110,#%10100110,#%10110110,#%11000110,#%11010110,#%11100110,#%11110110
|
||||
.DA #%00000111,#%00010111,#%00100111,#%00110111,#%01000111,#%01010111,#%01100111,#%01110111
|
||||
.DA #%10000111,#%10010111,#%10100111,#%10110111,#%11000111,#%11010111,#%11100111,#%11110111
|
||||
SHIFT8.L5 .DA #%00000000,#%00100000,#%01000000,#%01100000,#%10000000,#%10100000,#%11000000,#%11100000
|
||||
.DA #%00000001,#%00100001,#%01000001,#%01100001,#%10000001,#%10100001,#%11000001,#%11100001
|
||||
.DA #%00000010,#%00100010,#%01000010,#%01100010,#%10000010,#%10100010,#%11000010,#%11100010
|
||||
.DA #%00000011,#%00100011,#%01000011,#%01100011,#%10000011,#%10100011,#%11000011,#%11100011
|
||||
.DA #%00000100,#%00100100,#%01000100,#%01100100,#%10000100,#%10100100,#%11000100,#%11100100
|
||||
.DA #%00000101,#%00100101,#%01000101,#%01100101,#%10000101,#%10100101,#%11000101,#%11100101
|
||||
.DA #%00000110,#%00100110,#%01000110,#%01100110,#%10000110,#%10100110,#%11000110,#%11100110
|
||||
.DA #%00000111,#%00100111,#%01000111,#%01100111,#%10000111,#%10100111,#%11000111,#%11100111
|
||||
.DA #%00001000,#%00101000,#%01001000,#%01101000,#%10001000,#%10101000,#%11001000,#%11101000
|
||||
.DA #%00001001,#%00101001,#%01001001,#%01101001,#%10001001,#%10101001,#%11001001,#%11101001
|
||||
.DA #%00001010,#%00101010,#%01001010,#%01101010,#%10001010,#%10101010,#%11001010,#%11101010
|
||||
.DA #%00001011,#%00101011,#%01001011,#%01101011,#%10001011,#%10101011,#%11001011,#%11101011
|
||||
.DA #%00001100,#%00101100,#%01001100,#%01101100,#%10001100,#%10101100,#%11001100,#%11101100
|
||||
.DA #%00001101,#%00101101,#%01001101,#%01101101,#%10001101,#%10101101,#%11001101,#%11101101
|
||||
.DA #%00001110,#%00101110,#%01001110,#%01101110,#%10001110,#%10101110,#%11001110,#%11101110
|
||||
.DA #%00001111,#%00101111,#%01001111,#%01101111,#%10001111,#%10101111,#%11001111,#%11101111
|
||||
SHIFT8.L6 .DA #%00000000,#%01000000,#%10000000,#%11000000,#%00000001,#%01000001,#%10000001,#%11000001
|
||||
.DA #%00000010,#%01000010,#%10000010,#%11000010,#%00000011,#%01000011,#%10000011,#%11000011
|
||||
.DA #%00000100,#%01000100,#%10000100,#%11000100,#%00000101,#%01000101,#%10000101,#%11000101
|
||||
.DA #%00000110,#%01000110,#%10000110,#%11000110,#%00000111,#%01000111,#%10000111,#%11000111
|
||||
.DA #%00001000,#%01001000,#%10001000,#%11001000,#%00001001,#%01001001,#%10001001,#%11001001
|
||||
.DA #%00001010,#%01001010,#%10001010,#%11001010,#%00001011,#%01001011,#%10001011,#%11001011
|
||||
.DA #%00001100,#%01001100,#%10001100,#%11001100,#%00001101,#%01001101,#%10001101,#%11001101
|
||||
.DA #%00001110,#%01001110,#%10001110,#%11001110,#%00001111,#%01001111,#%10001111,#%11001111
|
||||
.DA #%00010000,#%01010000,#%10010000,#%11010000,#%00010001,#%01010001,#%10010001,#%11010001
|
||||
.DA #%00010010,#%01010010,#%10010010,#%11010010,#%00010011,#%01010011,#%10010011,#%11010011
|
||||
.DA #%00010100,#%01010100,#%10010100,#%11010100,#%00010101,#%01010101,#%10010101,#%11010101
|
||||
.DA #%00010110,#%01010110,#%10010110,#%11010110,#%00010111,#%01010111,#%10010111,#%11010111
|
||||
.DA #%00011000,#%01011000,#%10011000,#%11011000,#%00011001,#%01011001,#%10011001,#%11011001
|
||||
.DA #%00011010,#%01011010,#%10011010,#%11011010,#%00011011,#%01011011,#%10011011,#%11011011
|
||||
.DA #%00011100,#%01011100,#%10011100,#%11011100,#%00011101,#%01011101,#%10011101,#%11011101
|
||||
.DA #%00011110,#%01011110,#%10011110,#%11011110,#%00011111,#%01011111,#%10011111,#%11011111
|
||||
SHIFT8.L7 .DA #%00000000,#%10000000,#%00000001,#%10000001,#%00000010,#%10000010,#%00000011,#%10000011
|
||||
.DA #%00000100,#%10000100,#%00000101,#%10000101,#%00000110,#%10000110,#%00000111,#%10000111
|
||||
.DA #%00001000,#%10001000,#%00001001,#%10001001,#%00001010,#%10001010,#%00001011,#%10001011
|
||||
.DA #%00001100,#%10001100,#%00001101,#%10001101,#%00001110,#%10001110,#%00001111,#%10001111
|
||||
.DA #%00010000,#%10010000,#%00010001,#%10010001,#%00010010,#%10010010,#%00010011,#%10010011
|
||||
.DA #%00010100,#%10010100,#%00010101,#%10010101,#%00010110,#%10010110,#%00010111,#%10010111
|
||||
.DA #%00011000,#%10011000,#%00011001,#%10011001,#%00011010,#%10011010,#%00011011,#%10011011
|
||||
.DA #%00011100,#%10011100,#%00011101,#%10011101,#%00011110,#%10011110,#%00011111,#%10011111
|
||||
.DA #%00100000,#%10100000,#%00100001,#%10100001,#%00100010,#%10100010,#%00100011,#%10100011
|
||||
.DA #%00100100,#%10100100,#%00100101,#%10100101,#%00100110,#%10100110,#%00100111,#%10100111
|
||||
.DA #%00101000,#%10101000,#%00101001,#%10101001,#%00101010,#%10101010,#%00101011,#%10101011
|
||||
.DA #%00101100,#%10101100,#%00101101,#%10101101,#%00101110,#%10101110,#%00101111,#%10101111
|
||||
.DA #%00110000,#%10110000,#%00110001,#%10110001,#%00110010,#%10110010,#%00110011,#%10110011
|
||||
.DA #%00110100,#%10110100,#%00110101,#%10110101,#%00110110,#%10110110,#%00110111,#%10110111
|
||||
.DA #%00111000,#%10111000,#%00111001,#%10111001,#%00111010,#%10111010,#%00111011,#%10111011
|
||||
.DA #%00111100,#%10111100,#%00111101,#%10111101,#%00111110,#%10111110,#%00111111,#%10111111
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE /A2OSX.SRC/SYS/KERNEL.S.OSD
|
||||
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
||||
ASM
|
@ -1,8 +1,6 @@
|
||||
PR#3
|
||||
PREFIX /A2OSX.BUILD
|
||||
NEW
|
||||
INC 1
|
||||
AUTO 6
|
||||
PREFIX /A2OSX.BUILD
|
||||
AUTO 4,1
|
||||
.LIST OFF
|
||||
.OP 65C02
|
||||
.OR $2000
|
||||
|
@ -1,8 +1,6 @@
|
||||
PR#3
|
||||
PREFIX /A2OSX.BUILD
|
||||
NEW
|
||||
INC 1
|
||||
AUTO 6
|
||||
PREFIX /A2OSX.BUILD
|
||||
AUTO 4,1
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
S.FNT.dfVersion .EQ 0
|
||||
|
@ -1,8 +1,6 @@
|
||||
PR#3
|
||||
PREFIX /A2OSX.BUILD
|
||||
NEW
|
||||
INC 1
|
||||
AUTO 6
|
||||
PREFIX /A2OSX.BUILD
|
||||
AUTO 4,1
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
PrintFAX sta PrintFAX.Next+1
|
||||
|
Loading…
Reference in New Issue
Block a user