home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CBM Funet Archive
/
cbm-funet-archive-2003.iso
/
cbm
/
maps
/
C128rom.doc
< prev
next >
Wrap
Text File
|
1995-03-08
|
29KB
|
1,270 lines
;cOMMODORE 128 rom mEMORY mAP
;WITH ram sUBROUTINES
;
;cONTAINS 1986 bASIC AND vdc PATCH INFORMATION.
;
;v1.41 mAR 1995
;
; dATA TYPES IN HEADERS (FOR REASSEMBLER):
;
;datamISC DATA
;textsTRING TERMINATED WITH 00
;wordvECTORS IN lo/hi BYTE PAIRS
;chipi/o aREA
;emptyrom CONTAINING ff'S OR aa'S
;
;
; c128 ram sUBROUTINES
;
0002bANK nUMBER, jUMP TO sys ADDRESS
0056jUMP VECTOR FOR FUNCTIONS
02A2bANK pEEK sUBROUTINE
02AFbANK pOKE sUBROUTINE
02BEbANK cOMPARE sUBROUTINE
02CDjsr TO ANOTHER BANK
02E3jmp TO ANOTHER BANK
0380chrget
0386chrgot ENTRY
0390?
039FfETCH fROM bANK 0
03ABfETCH fROM bANK 1
03B7fETCH fROM bANK 1
03C0fETCH fROM bANK 0
03C9fETCH fROM bANK 0
03F0dma lINK cODE
;
; basic 7.0 INTERPRETER rom ($4000 - $afff)
;
; basic rom lo
;
4000bASIC eNTRY jUMPS
;4000cOLD eNTRY
;4003wARM eNTRY
;4006irq eNTRY
4009bASIC rESTART
4023bASIC cOLD sTART
4045sET-uP bASIC cONSTANTS
4112cHIME
417AsET pRECONFIG rEGISTERS
4189rEGISTERS fOR $d501data
418DiNIT sPRITE mOVEMENT tABS
419BpRINT sTARTUP mESSAGE
41BBsTARTUP mESSAGEdata
4251sET bASIC lINKS
4267bASIC lINKS FOR $0300word
4279cHRGET fOR $0380
42CEgET fROM ($50) bANK1
42D3gET fROM ($3F) bANK1
42D8gET fROM ($52) bANK1
42DDgET fROM ($5C) bANK0
42E2gET fROM ($5C) bANK1
42E7gET fROM ($66) bANK1
42ECgET fROM ($61) bANK0
42F1gET fROM ($70) bANK0
42F6gET fROM ($70) bANK1
42FBgET fROM ($50) bANK1
4300gET fROM ($61) bANK1
4305gET fROM ($24) bANK0
430AcRUNCH tOKENS
43CCmOVE dOWN iNPUT bUFFER
43E2cHECK kEYWORD mATCH
4417kEYWORDS - nON PREFIXEDdata
4609kEYWORDS - pREFIX fedata
46C9kEYWORDS - pREFIX cedata
46FCaCTION vECTORSword
47D8fUNCTION vECTORSword
4828dEFUNCT vECTORSdata
; eACH dEFUNCT vECTOR IS PRECEDED BY A PRIORITY CODE.
4846uNIMPLEMENTED cOMMANDS
484BeRROR mESSAGESdata
4A82fIND mESSAGE
4A9FsTART nEW bASIC cODE
4B34uPDATE cONTINUE pOINTER
4B3FeXECUTE/tRACE sTATEMENT
4BB5?
4BCBpERFORM [STOP]
4BCDpERFORM [END]
4BF7sETUP fn rEFERENCE
4C86eVALUATE <OR>
4C89eVALUATE <AND>
4CB6eVALUATE <COMPARE>
4D2ApRINT 'READY'
4D2D'READY.'text
4D37eRROR OR rEADY
4D3ApRINT 'OUT OF MEMORY'
4D3CeRROR
4DAFbREAK eNTRY
4DC3rEADY fOR bASIC
4DE2hANDLE nEW lINE
4F4FrECHAIN lINES
4F82rESET eND-OF-bASIC
4F93rECEIVE iNPUT lINE
4FAAsEARCH b-sTACK fOR mATCH
4FFEmOVE b-sTACK dOWN
5017cHECK mEMORY sPACE
5047cOPY b-sTACK pOINTER
5050sET b-sTACK pOINTER
5059mOVE b-sTACK uP
5064fIND bASIC lINE
50A0gET fIXED pT nUMBER
50E2pERFORM [LIST]
5123lIST sUBROUTINE
51D6pERFORM [NEW]
51F3sET uP rUN
51F8pERFORM [CLR]
5238cLEAR sTACK & wORK aREA
5250pUDEF cHARACTERSdata
5254bACK uP tEXT pOINTER
5262pERFORM [RETURN]
528FpERFORM [DATA/BEND]
529DpERFORM [REM]
52A2sCAN tO nEXT sTATEMENT
52A5sCAN tO nEXT lINE
52C5pERFORM [IF]
5320sEARCH/sKIP bEGIN/bEND
537CsKIP sTRING cONSTANT
5391pERFORM [ELSE]
53A3pERFORM [ON]
53C6pERFORM [LET]
54F6cHECK sTRING lOCATION
553ApERFORM [PRINT#]
5540pERFORM [CMD]
555ApERFORM [PRINT]
5600pRINT fORMAT cHAR
5607-PRINT '<CURSOR RIGHT>'-
5604-PRINT SPACE-
560A-PRINT '?'-
5612pERFORM [GET]
5635gETKEY
5648pERFORM [INPUT#]
5662pERFORM [INPUT]
569CpROMPT & iNPUT
56A9pERFORM [READ]
57F4pERFORM [NEXT]
587BpERFORM [DIM]
5885pERFORM [SYS]
58B4pERFORM [TRON]
58B7pERFORM [TROFF]
58BDpERFORM [RREG]
5901aSSIGN <MID$>
5975pERFORM [AUTO]
5986pERFORM [HELP]
59ACiNSERT hELP mARKER
59CFpERFORM [GOSUB]
59DBpERFORM [GOTO]
5A15uNDEF'D sTATEMENT
5A1DpUT sUB tO b-sTACK
5A3DpERFORM [GO]
5A60pERFORM [CONT]
5A9BpERFORM [RUN]
5ACApERFORM [RESTORE]
5AF0kEYWORDS tO rENUMBERdata
5AF8pERFORM [RENUMBER]
5BAErENUMBER-cONTINUED
5BFBrENUMBER sCAN
5D19cONVERT lINE nUMBER
5D68gET rENUMBER sTART
5D75cOUNT oFF lINES
5D89aDD rENUMBER iNC
5D99sCAN aHEAD
5DA7sET uP bLOCK mOVE
5DC6bLOCK mOVE dOWN
5DDFbLOCK mOVE uP
5DEEcHECK bLOCK lIMIT
5DF9pERFORM [FOR]
5E87pERFORM [DELETE]
5EFBgET lINE nUMBER rANGE
5F34pERFORM [PUDEF]
5F4DpERFORM [TRAP]
5F62pERFORM [RESUME]
5FB7rEINSTATE tRAP pOINT
5FD8sYNTAX eXIT
5FDBpRINT 'CAN'T RESUME'
5FE0pERFORM [DO]
6039pERFORM [EXIT]
608ApERFORM [LOOP]
60B4pRINT 'LOOP NOT FOUND'
60B7pRINT 'LOOP WITHOUT DO'
60DBeVAL wHILE/uNTIL aRGUMENT
60E1dEFINE pROGRAMMED kEY
610ApERFORM [KEY]
619D'+CHR$('data
61A8pERFORM [PAINT]
627CcHECK pAINTING sPLIT
62B7pERFORM [BOX]
63EDdata
63F5aUTHORSdata
640B?
642BpERFORM [SSHAPE]
658DpERFORM [GSHAPE]
668EpERFORM [CIRCLE]
6750dRAW cIRCLE
6797pERFORM [DRAW]
67D7pERFORM [CHAR]
68DB?
6955pERFORM [LOCATE]
6960pERFORM [SCALE]
69D8sCALE fACTOR cONSTANTSdata
;69D8
;69DD
69E2pERFORM [COLOR]
6A4CcOLOR cODESdata
6A5ClOG cURRENT cOLORS
6A79pERFORM [SCNCLR]
6B06fILL mEMORY pAGE
6B17sET sCREEN cOLOR
6B5ApERFORM [GRAPHIC]
6BC9pERFORM [BANK]
6BD7pERFORM [SLEEP]
6C09mULTIPLY sLEEP tIME
6C2DpERFORM [WAIT]
6C4FpERFORM [SPRITE]
6C9B?
6CB3bIT mASKSdata
6CBB?
6CC6pERFORM [MOVSPR]
6D9E?
6DC6?
6DD9sPRITE mOTION tABLE oFFSETSdata
6DE1pERFORM [PLAY]
6E02aNALYZE pLAY cHARACTER
6E66-fILTER
6E9D-vOICE
6EA8-oCTAVE
6EB2sET sid sOUND
6EDD-vOLUME
6EFDpLAY eRROR
6F03dOTTED nOTE
6F07nOTE lENGTH cHAR
6F1EnOTE a-g
6F52...VOTXUM...
6F69sHARP
6F6CfLAT
6F78rEST
6FD7pERFORM [TEMPO]
6FE4vOICE tIMES tWOdata
6FE7lENGTH cHARACTERSdata
6FECcOMMAND cHARACTERSdata
6FF2iNDEXES FOR nOTE sYMBOLSdata
6FF9pITCH lo -- ntscdata
7005pITCH hi -- ntscdata
7011eNVELOPE a/d pATTERNSdata
702FcHIME sEQdata
7039sid vOICE oFFSETSdata
703Csid vOLUME sCALEdata
7046pERFORM [FILTER]
70C1pERFORM [ENVELOPE]
7164pERFORM [COLLISION]
7190pERFORM [SPRCOLOR]
71B6pERFORM [WIDTH]
71C5pERFORM [VOL]
71ECpERFORM [SOUND]
72CCpERFORM [WINDOW]
7335pERFORM [BOOT]
7372pERFORM [SPRDEF]
7452-pERFORM [HOME]
7497-pERFORM [1234]
74F4-pERFORM []
74FE-pERFORM [SHIFT-RETURN]
7506-pERFORM [M]
751C-pERFORM [Y]
751F-pERFORM [X]
7530-pERFORM [CLR]
753F-pERFORM [RIGHT]
7542-pERFORM [LEFT]
7564-pERFORM [UP]
7567-pERFORM [DOWN]
7576-pERFORM [A]
7581-pERFORM [RETURN]
7588-pERFORM [C]
75D1-?
7610-?
763F-?
764A-?
7663?data
767Fsprdef cOMMANDSdata
7691sprdef cOMMAND vECTORS hi/lodata
76B5sprdef cOLOR cOMMANDSdata
76C5?
76D4?
76ECpERFORM [SPRSAV]
77B3pERFORM [FAST]
77C4pERFORM [SLOW]
77D7tYPE mATCH cHECK
77DAcONFIRM nUMERIC
77DDcONFIRM sTRING
77E7pRINT 'TYPE MISMATCH'
77EApRINT 'FORMULA TOO COMPLEX'
77EFeVALUATE eXPRESSION
78D7eVALUATE iTEM
78FEcONSTANT pidata
7903cONTINUE eXPRESSION
7930eVALUATE <EQUAL>
793CfIXED-fLOAT
7942?
7950eVAL wITHIN pARENS
7956-cHECK rIGHT pARENTHESIS
7959-cHECK lEFT pARENTHESIS
795C-cHECK cOMMA
796CsYNTAX eRROR
7978sEARCH fOR vARIABLE
7A85uNPACK ram1 TO fac#1
7AAFlOCATE vARIABLE
7B3CcHECK aLPHABETIC
7B46cREATE vARIABLE
7CABsET uP aRRAY
7D25pRINT 'BAD SUBSCRIPT'
7D28pRINT 'ILLEGAL QUANTITY'
7D2D?
7D46?
7E3EcOMPUTE aRRAY sIZE
7E71aRRAY pOINTER sUBROUTINE
7E82rESERVED fOR fUTURE pATCHES
; pATCHES ADDED IN THE 1986 RELEASE:
;
7E82sET bANK PATCH FOR [CHAR]
7E88sET bANK PATCH FOR sCREEN pRINT lINK
7E8EpATCH FOR rENUMBER sCAN
7E94pATCH FOR [DELETE]
7EA6pATCH FOR nOTE a-g
7EB9pITCH lo -- paldata
7EC5pITCH hi -- paldata
7ED1sTRING sTACK PATCH FOR eRROR
7ED9uNUSEDempty
7FC0cOPYRIGHT bANNERdata
7FFCcHECKSUM (?)data
;
; basic rom hi
;
8000eVALUATE <FRE>
8020dECRYPT mESSAGE
803A-fREE IN bANK 1
804AeVALUATE <VAL>
8052sTRING TO fLOAT
8076eVALUATE <DEC>
80C5eVALUATE <PEEK>
80E5pERFORM [POKE]
80F6eVALUATE <ERR$>
8139sWAP X wITH Y
8142eVALUATE <HEX$>
816BbYTE TO hEX
8182eVALUATE <RGR>
818CgET gRAPHICS mODE
819BeVALUATE <RCLR>
81F3crtc cOLOR cODESdata
8203eVALUATE <JOY>
8242jOYSTICK vALUESdata
824DeVALUATE <POT>
82AEeVALUATE <PEN>
82FAeVALUATE <POINTER>
831EeVALUATE <RSPRITE>
835Bvic sPRITE rEGISTER nUMBERSdata
8361eVALUATE <RSPCOLOR>
837CeVALUATE <BUMP>
8397eVALUATE <RSPOS>
83E1eVALUATE <XOR>
8407eVALUATE <RWINDOW>
8434eVALUATE <RND>
8490rND mULTIPLIERdata
849AvALUE 32768data
849FfLOAT-fIXED uNSIGNED
84A7eVALUATE fIXED nUMBER
84ADfLOAT-fIXED sIGNED
84C9fLOAT (.Y, .A)
84D0eVALUATE <POS>
84D4bYTE tO fLOAT
84D9cHECK dIRECT
84DDpRINT 'ILLEGAL DIRECT'
84E0pRINT 'UNDEF'D FUNCTION'
84E5sET uP 16 bIT fIX-fLOAT
84F0cHECK dIRECT
84F5pRINT 'DIRECT MODE ONLY'
84FApERFORM [DEF]
8528cHECK fn sYNTAX
853BpERFORM [FN]
85AEeVALUATE <STR$>
85BFeVALUATE <CHR$>
85D6eVALUATE <LEFT$>
860AeVALUATE <RIGHT$>
861CeVALUATE <MID$>
864DpULL sTRING pARAMETERS
8668eVALUATE <LEN>
866EeXIT sTRING mODE
8677eVALUATE <ASC>
8688cALC sTRING vECTOR
869AsET uP sTRING
874EbUILD sTRING TO mEMORY
877BeVALUATE sTRING
87E0cLEAN dESCRIPTOR sTACK
87F1iNPUT bYTE pARAMETER
87F4-eVAL bYTE pARAMETER
8803pARAMS fOR pOKE/wAIT
880FiNPUT nEXT fLOAT/fIXED vALUE
8812-iNPUT fLOAT/fIXED vALUE
8815fLOAT/fIXED
882EsUBTRACT fROM mEMORY
8831eVALUATE <SUBTRACT>
8845aDD mEMORY
8848eVALUATE <ADD>
88D6zERO bOTH aCCUYMULATORS
8917tRIM fac#1 lEFT
8926nEGATE fac#1
894ErOUND uP fac#1
895DpRINT 'OVERFLOW'
8962?
899ClOG sERIESdata
;899C1.00
;89A1#03(COUNTER)
;89A20.434255942
;89A70.57658454
;89AC0.961800759
;89B12.885390073
;89B60.707106781sqr(0.5)
;89BB1.41421356srq(2)
;89C0-0.5
;89C50.693147181log(2)
;
89CAeVALUATE <LOG>
8A0EaDD 0.5
8A12aDD mEMORY aT a/y
8A18sUBTRACT mEMORY aT a/y
8A1EdIVIDE bY mEMORY
8A24mULTIPLY bY mEMORY
8A27eVALUATE <MULTIPLY>
8A89uNPACK rom TO fac#2
8AB4uNPACK ram1 TO fac#2
8AECtEST bOTH aCCUMULATORS
8B09oVERFLOW/uNDERFLOW
8B17mULTIPLY bY 10
8B2E+10data
8B33pRINT 'DIVISION BY ZERO'
8B38dIVIDE bY 10
8B49dIVIDE iNTO mEMORY
8B4CeVALUATE <DIVIDE>
8BD4uNPACK rom TO fac#1
8BF9pACK fac#1 TO $5E
8BFCpACK fac#1 TO $59
8C00pACK fac#1 TO ram1
8C28fac#2 TO fac#1
8C38fac#1 TO fac#2
8C47rOUND fac#1
8C57gET sIGN
8C65eVALUATE <SGN>
8C68bYTE fIXED-fLOAT
8C75fIXED-fLOAT
8C84eVALUATE <ABS>
8C87cOMPARE fac#1 TO mEMORY
8CC7fLOAT-fIXED
8CFBeVALUATE <INT>
8D22sTRING TO fac#1
8DB0gET aSCII dIGIT
8E17sTRING cONVERSION cONSTANTSdata
;8E17 99999999.9
;8E1C 999999999
;8E211000000000
;
8E26pRINT 'IN...'
8E32pRINT iNTEGER
8E42fLOAT TO aSCII
8F76+0.5data
8F7BdECIMAL cONSTANTSdata
; tHIS TABLE CONTAINS 4-BYTE POWERS OF 10
; USED AT 8ED2 IN CONVERTING NUMERIC VALUES TO ASCII.
;
8F9Fti cONSTANTSdata
8FB7eVALUATE <SQR>
8FBErAISE TO mEMORY pOWER
8FC1eVALUATE <POWER>
8FFAeVALUATE <NEGATE>
9005eXP sERIESdata
;90051.44269504(1/log TO BASE 2 E)
;900A#07(COUNTER)
;900B2.149875 e-5
;90101.435231 e-4
;90151.342263 e-3
;901A9.6414017 e-3
;901F5.550513 e-2
;90242.402263 e-4
;90296.931471 e-1
;902E1.00
;
9033eVALUATE <EXP>
90D0i/o eRROR mESSAGE
90D8bASIC 'OPEN'
90DFbASIC 'CHROUT'
90E5bASIC 'INPUT'
90EBrEDIRECT oUTPUT
90FDrEDIRECT iNPUT
9112pERFORM [SAVE]
9129pERFORM [VERIFY]
912CpERFORM [LOAD]
918DpERFORM [OPEN]
919ApERFORM [CLOSE]
91AEgET lOAD/sAVE pARAMETERS
91DDgET nEXT bYTE vALUE
91E3gET cHARACTER OR aBORT
91EBmOVE TO nEXT pARAMETER
91F6gET oPEN/cLOSE pARAMETERS
9243rELEASE i/o sTRING
9251cALL 'STATUS'
9257cALL 'SETLFS'
925DcALL 'SETNAM'
9263cALL 'GETIN'
9269cALL 'CHROUT'
926FcALL 'CLRCHN'
9275cALL 'CLOSE'
927BcALL 'CLALL'
9281pRINT fOLLOWING tEXT
9287sET lOAD/sAVE bANK
928DcALL 'PLOT'
9293cALL 'TEST STOP'
9299mAKE rOOM fOR sTRING
92EAgARBAGE cOLLECTION
9409eVALUATE <COS>
9410eVALUATE <SIN>
9459eVALUATE <TAN>
9485tRIG sERIESdata
;94851.570796327PI/2
;948A6.28318531PI*2
948F0.25data
;
;9494#05(COUNTER)
;9495-14.3813907
;949A 42.0077971
;949F-76.7041703
;94A4 81.6052237
;94A9-41.3417021
;94AE 6.28318531
;
94B3eVALUATE <ATN>
94E3atn sERIESdata
;94E3#0B(COUNTER)
;94E4-0.000684793912
;94E9 0.00485094216
;94EE-0.161117018
;94F3 0.034209638
;94F8-0.0542791328
;94FD 0.0724571965
;9502-0.0898023954
;9507 0.110932413
;950C-0.142839808
;9511 0.19999912
;9516-0.333333316
;951B 1.00
;
9520pRINT uSING
96EE?
97B9?
97FB?
981C?
98EB?
98F2?
99C1eVALUATE <INSTR>
9A74?
9ACE?
9AF3?
9B0CeVALUATE <RDOT>
9B30dRAW lINE
9BFBpLOT pIXEL
9C49eXAMINE pIXEL
9C70sET hI-rES cOLOR cELL
9CCAvIDEO mATRIX lINES hIdata
9CE3pOSITION pIXEL
9D1CbIT mASKSdata
9D24cALC hI-rES rOW/cOLUMN
9D4A?
9D67cALCULATE gRAPHICS cOORDINATES
9D6DaDD gRAPHICS cOORDINATE
9D7CsUBTRACT gRAPHICS cOORDINATE
9D8FrEAD cURRENT x pOSITION TO a/y
9D99?
9DAE?
9DF2rESTORE pIXEL cURSOR
9E06cHECK oPTIONAL fLOAT/fIXED pARAMETER
9E1CiNPUT oPTIONAL bYTE pARAMETER
9E1C-cHECK bYTE pARAMETER IN lIST
9E2FpARSE gRAPHICS cOMMAND
9E32gET cOLOR sOURCE pARAM
9F25mULTICOLOR pIXEL mASKSdata
9F29cONV wORDS hIdata
9F3DcONV wORDS lOdata
9F4FaLLOCATE 9k gRAPHICS aREA FOR GRAPHIC/SPRDEF
A022mOVE bASIC TO $1C01
A07EpERFORM [CATALOG/DIRECTORY]
A11DpERFORM [DOPEN]
A134pERFORM [APPEND]
A157fIND sPARE sa
A16FpERFORM [DCLOSE]
A18CpERFORM [DSAVE]
A1A4pERFORM [DVERIFY]
A1A7pERFORM [DLOAD]
A1C8pERFORM [BSAVE]
A218pERFORM [BLOAD]
A267pERFORM [HEADER]
A2A1pERFORM [SCRATCH]
A2D7pERFORM [RECORD]
A322pERFORM [DCLEAR]
A32FpERFORM [COLLECT]
A346pERFORM [COPY]
A362pERFORM [CONCAT]
A36EpERFORM [RENAME]
A37CpERFORM [BACKUP]
A3B8dEFAULT dos dISK uNIT (u8 d0)data
;A3BCdos lOGICAL aDDRESS
;A3BDdos pHYSICAL aDDRESS
;A3BEdos sECONDARY aDDRESS
;
A3BFpARSE dos cOMMANDS
A4B4?
A5E7pRINT 'MISSING FILE NAME'
A5EApRINT 'ILLEGAL DEVICE NUMBER'
A5EDpRINT 'STRING TOO LONG'
A627dos cOMMAND mASKSdata
A667sET dos pARAMETERS
A6D6?
A778?
A7E1pRINT 'ARE YOU SURE'
A7E8'ARE YOU SURE?'text
A80DrELEASE sTRING
A82A'KEY 0,'data
A830?
A83B?
A845sET bANK 15
A84Dirq wORK
AA1FpERFORM [STASH]
AA24pERFORM [FETCH]
AA29pERFORM [SWAP]
AA6ErESERVED fOR fUTURE pATCHES
; pATCH ADDED IN THE 1986 RELEASE:
AA6EpATCH FOR pRINT uSING
;
AA81uNUSEDempty
AE64eNCRYPTED mESSAGEdata
AF00bASIC vECTORS
;AF00jmp $84b4; cONVERT f.p. TO iNTEGER
;AF03jmp $793c; cONVERT iNTEGER TO f.p.
;AF06jmp $8e42; fLOAT TO aSCII
;AF09jmp $8052; sTRING TO fLOAT
;AF0Cjmp $8815; fLOAT/fIXED
;AF0Fjmp $8c75; fIXED-fLOAT
;AF12jmp $882e; sUBTRACT fROM mEMORY
;AF15jmp $8831; eVALUATE <SUBTRACT>
;AF18jmp $8845; aDD mEMORY
;AF1Bjmp $8848; eVALUATE <ADD>
;AF1Ejmp $8a24; mULTIPLY bY mEMORY
;AF21jmp $8a27; eVALUATE <MULTIPLY>
;AF24jmp $8b49; dIVIDE iNTO mEMORY
;AF27jmp $8b4c; eVALUATE <DIVIDE>
;AF2Ajmp $89ca; eVALUATE <LOG>
;AF2Djmp $8cfb; eVALUATE <INT>
;AF30jmp $8fb7; eVALUATE <SQR>
;AF33jmp $8ffa; eVALUATE <NEGATE>
;AF36jmp $8fbe; rAISE TO mEMORY pOWER
;AF39jmp $8fc1; eVALUATE <POWER>
;AF3Cjmp $9033; eVALUATE <EXP>
;AF3Fjmp $9409; eVALUATE <COS>
;AF42jmp $9410; eVALUATE <SIN>
;AF45jmp $9459; eVALUATE <TAN>
;AF48jmp $94b3; eVALUATE <ATN>
;AF4Bjmp $8c47; rOUND fac#1
;AF4Ejmp $8c84; eVALUATE <ABS>
;AF51jmp $8c57; gET sIGN
;AF54jmp $8c87; cOMPARE fac#1 TO mEMORY
;AF57jmp $8437; gENERATE rANDOM f.p. nUMBER
;AF5Ajmp $8ab4; uNPACK ram1 TO fac#2
;AF5Djmp $8a89; uNPACK rom TO fac#2
;AF60jmp $7a85; uNPACK ram1 TO fac#1
;AF63jmp $8bd4; uNPACK rom TO fac#1
;AF66jmp $8c00; pACK fac#1 TO ram1
;AF69jmp $8c28; fac#2 TO fac#1
;AF6Cjmp $8c38; fac#1 TO fac#2
;AF6Fjmp $4828; dEFUNCT vECTORS
;AF72jmp $9b30; dRAW lINE
;AF75jmp $9bfb; pLOT pIXEL
;AF78jmp $6750; dRAW cIRCLE
;AF7Bjmp $5a9b; pERFORM [RUN]
;AF7Ejmp $51f3; sET uP rUN
;AF81jmp $51f8; pERFORM [CLR]
;AF84jmp $51d6; pERFORM [NEW]
;AF87jmp $4f4f; rECHAIN lINES
;AF8Ajmp $430a; cRUNCH tOKENS
;AF8Djmp $5064; fIND bASIC lINE
;AF90jmp $4af6
;AF93jmp $78d7; eVALUATE iTEM
;AF96jmp $77ef; eVALUATE eXPRESSION
;AF99jmp $5aa6
;AF9Cjmp $5a81
;AF9Fjmp $50a0; gET fIXED pT nUMBER
;AFA2jmp $92ea; gARBAGE cOLLECTION
;AFA5jmp $4dcd
;
AFA8uNUSEDempty
;
; c128 mACHINE lANGUAGE mONITOR
; b000 - bfff
;
B000pERFORM [MONITOR]
B009bREAK eNTRY
B009pRINT 'BREAK'
B00C'BREAK'text
B021pRINT 'CALL' ENTRY
B03ApRINT 'MONITOR'
B03D'MONITOR'text
B050pERFORM [R]
B050pRINT ' PC SR AC XR YR SP'
B053' PC SR AC XR YR SP'text
B08BgET cOMMAND
B0BCeRROR
B0BF'?'text
B0E3pERFORM [X]
B0E6cOMMANDSdata
B0FCvECTORSword
B11ArEAD bANKED mEMORY
B12AwRITE bANKED mEMORY
B13DcOMPARE bANKED mEMORY
B152pERFORM [M]
B194pERFORM [:]
B1ABpERFORM [>]
B1C9pRINT 'ESC-O-UP'
B1CC'ESC-O-UP'text
B1D6pERFORM [G]
B1DFpERFORM [J]
B1E8dISPLAY mEMORY
B20BpRINT ':<RVS-ON>'
B20E':<RVS-ON>'text
B231pERFORM [C]
B234pERFORM [T]
B2C3aDD 1 TO oP 3
B2C6dO nEXT aDDRESS
B2CEpERFORM [H]
B337pERFORM [LSV]
B3C4pRINT 'ERROR'
B3DBpERFORM [F]
B406pERFORM [A]
B533pRINT 'SPACE<ESC-Q>'
B57CcHECK 2 a-mATCHES
B57FcHECK a-mATCH
B58BtRY nEXT oP cODE
B599pERFORM [D]
B5AEpRINT '<CR><ESC-Q>'
B5B1'<CR><ESC-Q>'text
B5D4dISPLAY iNSTRUCTION
B5F2pRINT '<3 SPACES>'
B5F5'<3 SPACES>'text
B64D?
B659cLASSIFY oP cODE
B6A1gET mNEMONIC cHAR
B6C3mODE tABLESdata
B715mODE cHARACTERSdata
B721cOMPACTED mNEMONICSdata
B7A5iNPUT pARAMETER
B7CErEAD vALUE
B88AnUMBER bASESdata
B88EbASE bITSdata
B892dISPLAY 5-dIGIT aDDRESS
B8A5dISPLAY 2-DIGIT bYTE
B8A8pRINT sPACE
B8ADpRINT cURSOR-uP
B8B4nEW lINE
B8B9bLANK nEW lINE
B8C2oUTPUT 2-dIGIT bYTE
B8D2bYTE TO 2 aSCII
B8E7gET iNPUT cHAR
B8E9gET cHARACTER
B901cOPY aDD0 TO aDD2
B90EcALCULATE aDD2 - aDD0
B922sUBTRACT aDD0
B93CsUBTRACT aDD1
B950iNCREMENT pOINTER
B960dECREMENT pOINTER
B974cOPY TO rEGISTER aREA
B983cALCULATE sTEP/aREA
B9B1pERFORM [$+&%]
BA07cONVERT TO dECIMAL
BA47tRANSFER aDDRESS
BA5DoUTPUT aDDRESS
BA90pERFORM [@]
BB72rESERVED fOR fUTURE pATCHES
; pATCHES ADDED IN THE 1986 RELEASE:
BB72uNUSEDempty
BFC0cOPYRIGHT bANNERdata
BFFCcHECKSUM (?)data
;
;
; c128 kernel rEV 1 rom ($c000 - $ffff)
;
; eDITOR
;
; eDITOR jUMP tABLE
;
C000-CINT-iNITIALIZE eDITOR & sCREEN
C003dISPLAY cHARACTER IN .a, cOLOR
C006gET FROM kEYBOARD
C009sCREEN iNPUT lINK
C00CsCREEN pRINT lINK
C00F-SCREEN-gET # OF sCRN rOWS, cOLS iNTO x & y
C012-SCNKEY-sCAN kEYBOARD sUBROUTINE
C015hANDLE rEPEAT kEY & sTORE dECODED kEY
C018-PLOT-rEAD oR sET crsr pOSITION iN x, y
C01BmOVE 8563 cURSOR sUBROUTINE
C01EeXECUTE esc fUNCTION USING CHR IN .a
C021dEFINE fn kEY
C024irq lINK
C027uPLOAD 80 cOL [CE0C]
C02AsWAP 40/80 cOL [CD2E]
C02DsET wINDOW
C033sCREEN aDDRESS lOWdata
C04CsCREEN aDDRESS hIGHdata
C065i/o lINK vECTORSword
C06FkEYBOARD sHIFT vECTORSword
C07BiNITIALIZE sCREEN
C142rESET wINDOW
C150hOME cURSOR
C156gOTO lEFT bORDER
C15CsET uP nEW lINE
C17CdO sCREEN cOLOR
C194(irq) sPLIT sCREEN
C234gET A kEY
C258sCREEN lINE eDITOR
C29BiNPUT fROM sCREEN
C2BCrEAD sCREEN cHAR
C2FFcHECK fOR qUOTES
C30CwRAP uP sCREEN pRINT
C320aSCII TO sCREEN cODE
C33EcHECK cURSOR rANGE
C363dO nEW lINE
C37CiNSERT A lINE
C3A6sCROLL sCREEN
C3DCdELETE A lINE
C40DmOVE sCREEN lINE
C4A5cLEAR A lINE
C53CsET 80-cOLUMN cOUNTER TO 1
C53EsET 80-cOLUMN cOUNTER
C55DkEYBOARD sCAN sUBROUTINE
C651kEY pICKUP & rEPEAT
C6DDkEYCODES FOR pROGRAMMED kEYSdata
C6E7fLASH 40 cOLUMN cURSOR
C72DpRINT TO sCREEN
C77DeSC-O (ESCAPE)
C78CcONTROL cHARACTERSdata
C79AcONTROL cHARACTER vECTORSword
C7B6pRINT cONTROL cHAR
C802pRINT hI-bIT cHAR
C854cHR$(29) cURSOR rIGHT
C85AcHR$(17) cURSOR dOWN
C875cHR$(157) cURSOR lEFT
C880cHR$(14) tEXT mODE
C8A6cHR$(11) lOCK
C8ACcHR$(12) uNLOCK
C8B3cHR$(19) hOME
C8BFcHR$(146) cLEAR rVS mODE
C8C2cHR$(18) rEVERSE
C8C7cHR$(2) uNDERLINE oN
C8CEcHR$(130) uNDERLINE oFF
C8D5cHR$(15) fLASH oN
C8DCcHR$(143) fLASH oFF
C8E3oPEN sCREEN sPACE
C91BcHR$(20) dELETE
C932rESTORE cURSOR
C94FcHR$(9) tAB
C961cHR$(24) tAB tOGGLE
C96CfIND tAB cOLUMN
C980eSC-Z cLEAR aLL tABS
C983eSC-Y sET dEFAULT tABS
C98EcHR$(7) bELL
C9B1cHR$(10) lINEFEED
C9BEaNALYZE eSC sEQUENCE
C9DEeSC sEQUENCE vECTORSword
CA14eSC-TtOP
CA16eSC-BbOTTOM
CA1BsET wINDOW pART
CA24eXIT wINDOW
CA3DeSC-IiNSERT lINE
CA52eSC-DdELETE lINE
CA76eSC-QeRASE eND
CA8BeSC-PeRASE bEGIN
CA9FeSC-@cLEAR rEMAINDER OF sCREEN
CABCeSC-VsCROLL uP
CACAeSC-WsCROLL dOWN
CAE2eSC-LsCROLL oN
CAE5eSC-MsCROLL oFF
CAEAeSC-CcANCEL aUTO iNSERT
CAEDeSC-AaUTO iNSERT
CAF2eSC-SbLOCK cURSOR
CAFEeSC-UuNDERLINE cURSOR
CB0BeSC-EcURSOR nON fLASH
CB21eSC-FcURSOR fLASH
CB37eSC-GbELL eNABLE
CB3AeSC-HbELL dISABLE
CB3FeSC-RsCREEN rEVERSE
CB48eSC-NsCREEN nORMAL
CB52eSC-KeND-OF-lINE
CB58gET sCREEN cHAR/cOLOR
CB74cHECK sCREEN lINE OF lOCATION
CB81eXTEND/tRIM sCREEN lINE
CB9FsET uP lINE mASKS
CBB1eSC-JsTART-OF-lINE
CBC3fIND eND-OF-lINE
CBEDmOVE cURSOR rIGHT
CC00mOVE cURSOR lEFT
CC1EsAVE cURSOR
CC27pRINT sPACE
CC2FpRINT cHARACTER
CC32pRINT fILL cOLOR
CC34pUT cHAR TO sCREEN
CC5BgET rOWS/cOLUMNS
CC6ArEAD/sET cURSOR
CCA2dEFINE fUNCTION kEY
CD2CeSC-XsWITCH 40/80 cOL
CD57pOSITION 80-COL cURSOR
CD6FsET sCREEN cOLOR
CD9FtURN cURSOR oN
CDCAsET crtc rEGISTER 31
CDCCsET crtc rEGISTER
CDD8rEAD crtc rEGISTER 31
CDDArEAD crtc rEGISTER
CDE6sET crtc TO sCREEN aDDRESS
CDF9sET crtc TO cOLOR aDDRESS
CE0CsET uP 80 cOLUMN cHAR sET
CE4CaSCII cOLOR cODESdata
CE5CsYSTEM cOLOR cODESdata
CE6CbIT mASKSdata
CE7440-COL iNIT vALUES ($E0)data
CE8E80-COL iNIT vALUES ($0A40)data
CEA8pROG kEY lENGTHSdata
CEB2pROG kEY dEFINITIONSdata
CEF5uNUSEDempty
;
D000i/o OR cHARGENdata
;
; c128 kERNEL REVISION 1
; e000 - ffff
;
E000rESET cODE
E04Bmmu sET uP bYTESdata
E056-RESTOR-
E05B-VECTOR-
E073vECTORS TO $0314word
E093-RAMTAS-
E0CDmOVE cODE fOR hIGH ram bANKS
E105ram bANK mASKSdata
E109-INIT-
E1DCsET uP crtc rEGISTERS
E1F0cHECK sPECIAL rESET
E242rESET TO 64/128
E24BsWITCH TO 64 mODE
E263cODE TO $02
E26BsCAN aLL romS
E2BCrom aDDRESSES hIGHdata
E2C0rom bANKSdata
E2C4pRINT 'CBM' mASKdata
E2C7vic 8564 sET uPdata
E2F8crtc 8563 sET uP pAIRSdata
E33B-TALK-
E33E-LISTEN-
E38CsEND dATA oN sERIAL bUS
E43E-ACPTR-
E4D2-SECOND-
E4E0-TKSA-
E503-CIOUT- pRINT sERIAL
E515-UNTLK-
E526-UNLSN-
E535rESET atn
E545sET cLOCK hIGH
E54EsET cLOCK lOW
E557sET dATA hIGH
E560sET dATA lOW
E569rEAD sERIAL lINES
E573sTABILIZE tIMING
E59FrESTORE tIMING
E5BCpREPARE fOR rESPONSE
E5C3fAST dISK oFF
E5D6fAST dISK oN
E5FBfAST dISK oN/oFF
E5FF(nmi) tRANSMIT rs-232
E64Ars-232 hANDSHAKE
E68EsET rs-232 bIT cOUNT
E69D(nmi) rs-232 rECEIVE
E75FsEND tO rs-232
E795cONNECT rs-232 iNPUT
E7CEgET fROM rs-232
E7ECiNTERLOCK rs-232/sERIAL
E805(nmi) rs-232 cONTROL i/o
E850rs-232 tIMING tABLE -- ntscdata
E864rs-232 tIMING tABLE -- paldata
E878(nmi) rs-232 rECEIVE tIMING
E8A9(nmi) rs-232 tRANSMIT tIMING
E8D0fIND aNY tAPE hEADER
E919wRITE tAPE hEADER
E980gET bUFFER aDDRESS
E987gET tAPE bUFFER sTART & eND aDDRS
E99AfIND sPECIFIC hEADER
E9BEbUMP tAPE pOINTER
E9C8pRINT 'PRESS PLAY ON TAPE'
E9DFcHECK tAPE sTATUS
E9E9pRINT 'PRESS RECORD ...'
E9F2iNITIATE tAPE rEAD
EA15iNITIATE tAPE wRITE
EA26cOMMON tAPE cODE
EA7DwAIT fOR tAPE
EA8FcHECK tAPE sTOP
EAA1sET rEAD tIMING
EAEB(irq) rEAD tAPE bITS
EC1FsTORE tAPE cHARS
ED51rESET pOINTER
ED5AnEW cHAR sET uP
ED69wRITE tRANSITION TO tAPE
ED8BwRITE dATA TO tAPE
ED90(irq) tAPE wRITE
EE2E(irq) tAPE lEADER
EE57wIND uP tAPE i/o
EE9BsWITCH irq vECTOR
EEA8irq vECTORSword
EEB0kILL tAPE mOTOR
EEB7cHECK eND aDDRESS
EEC1bUMP aDDRESS
EEC8(irq) cLEAR bREAK
EED0cONTROL tAPE mOTOR
EEEB-GETIN-
EF06-CHRIN-
EF48gET cHAR fROM tAPE
EF79-CHROUT-
EFBD-OPEN-
F0B0sET cia TO rs-232
F0CBcHECK sERIAL oPEN
F106-CHKIN-
F14C-CHKOUT-
F188-CLOSE-
F1E4dELETE fILE
F202sEARCH fOR fILE
F212sET fILE pARAMETERS
F222-CLALL-
F226-CLRCHN-
F23DcLEAR i/o pATH
F265-LOAD-
F27BsERIAL lOAD
F32AtAPE lOAD
F3A1dISK lOAD
F3EAbURST lOAD
F48CcLOSE oFF sERIAL
F4BAgET sERIAL bYTE
F4C5rECEIVE sERIAL bYTE
F503tOGGLE cLOCK lINE
F50CpRINT 'U0' dISK rESETdata
F50FpRINT 'SEARCHING'
F521sEND fILE nAME
F533pRINT 'LOADING'
F53E-SAVE-
F5B5tERMINATE sERIAL iNPUT
F5BCpRINT 'SAVING'
F5C8sAVE TO tAPE
F5F8-UDTIM-
F63DwATCH fOR run OR sHIFT
F65E-RDTIM-
F665-SETTIM-
F66E-STOP-
F67CpRINT 'TOO MANY FILES'
F67FpRINT 'FILE OPEN'
F682pRINT 'FILE NOT OPEN'
F685pRINT 'FILE NOT FOUND'
F688pRINT 'DEVICE NOT PRESENT'
F68BpRINT 'NOT INPUT FILE'
F68EpRINT 'NOT OUTPUT FILE'
F691pRINT 'MISSING FILE NAME'
F694pRINT 'ILLEGAL DEVICE NO'
F697eRROR #0
F6B0mESSAGESdata
F71EpRINT iF dIRECT
F722pRINT i/o mESSAGE
F731-SETNAM-
F738-SETLFS-
F73FsET lOAD/sAVE bANK
F744-RDST-
F757sET sTATUS bIT
F75C-SETMSG-
F75FsET sERIAL tIMEOUT
F763-MEMTOP-
F772-MEMBOT-
F781-IOBASE-
F786sEARCH fOR sa
F79DsEARCH & sET uP fILE
F7A5tRIGGER dma
F7AEgET cHAR fROM mEMORY
F7BCsTORE lOADED bYTE
F7C9rEAD bYTE TO BE sAVED
F7D0gET cHAR fROM mEMORY bANK
F7DAsTORE cHAR TO mEMORY bANK
F7E3cOMPARE cHAR wITH mEMORY bANK
F7EClOAD mEMORY cONTROL mASK
F7F0mmu bANK cONFIGURATION vALUESdata
F800sUBROUTINES TO $02A2-$02FB
F85Adma cODE TO $03F0
F867cHECK aUTO sTART rom
F890cHECK fOR bOOT dISK
F908pRINT 'BOOTING'
F92CpRINT '...'
F98BwIND uP dISK bOOT
F9B3rEAD nEXT bOOT bLOCK
F9FBtO 2-dIGIT dECIMAL
FA08bLOCK rEAD cOMMAND sTRINGdata
FA17pRINT A mESSAGE
FA40nmi sEQUENCE
FA65(irq) nORMAL eNTRY
FA80kEYBOARD mATRIX uN-sHIFTEDdata
FAD9kEYBOARD mATRIX sHIFTEDdata
FB32kEYBOARD mATRIX c-kEYdata
FB8BkEYBOARD mATRIX cONTROLdata
FBE4kEYBOARD mATRIX cAPS-lOCKdata
FC40?
FC45?
FC50?
; pATCH FOR THE c128 d
FC62pATCH FOR sET uP crtc rEGISTERS
;
FC6FuNUSEDempty
FC80?
FC87iNIT kbd tRANSLATION tABLES
; tHIS IS PATCH FOR sCAN kEYBOARD sUBROUTINE
; TO HANDLE din kEYBOARD.
FCC6din kEYBOARD PATCH FOR kEY pICKUP
FD29din kEYBOARD mATRIX uN-sHIFTEDdata
FD82din kEYBOARD mATRIX sHIFTEDdata
FDDBdin kEYBOARD mATRIX c-kEYdata
FE34din kEYBOARD sHIFT vECTORSdata
FE81?
FE8CuNUSEDempty
FEFFpATCH BYTEdata
FF00mmu cONFIGURATION rEGISTERchip
FF01mmu lcr: bANK 0chip
FF02mmu lcr: bANK 1chip
FF03mmu lcr: bANK 14chip
FF04mmu lcr: bANK 14 oVER ram 1chip
FF05nmi tRANSFER eNTRY
FF17irq tRANSFER eNTRY
FF33rETURN fROM iNTERRUPT
FF3DrESET tRANSFER eNTRY
FF47jUMBO jUMP tABLE
;
; c128 kERNAL jUMP tABLE
;
FF47JMP $E5FBSPINSPOUT(FAST SERIAL)
FF4AJMP $F23DCLOSE ALL
FF4DJMP $E24B64MODE
FF50JMP $F7A5DMA CALL
FF53JMP $F890BOOT CALL
FF56JMP $F867FOENIX
FF59JMP $F79DLKUPLA(LOGICAL ADDR)
FF5CJMP $F786LKUPSA(SECOND ADDR)
FF5FJMP $C02ASWAPPER40/80 SWAP
FF62JMP $C027DLCHRiNIT 80COL CHARAM
FF65JMP $C021PFKEYpROG fUNCTION kEY
FF68JMP $F73FSETBNK
FF6BJMP $F7ECSETCFG
FF6EJMP $02CDJSRFAR
FF71JMP $02E3JMPFAR
FF74JMP $F7D0INDFETbANK lda (FETCHVEC),Y
FF77JMP $F7DAINDSTAbANK sta (STAVEC),Y
FF7AJMP $F7E3INDCMPbANK cmp (CMPVEC),Y
FF7DJMP $FA17PRIMMpRINT iMMEDIATE
FF80[01]kERNAL vERSION nUMBERdata
FF81JMP $C000CINTiNIT eDITOR & vIDEO cHIPS
FF84JMP $E109IOINITiNIT i/o dEVICES, pORTS & tIMERS
FF87JMP $E093RAMTASiNIT rAM & bUFFERS
FF8AJMP $E056RESTORrESTORE vECTORS
FF8DJMP $E05BVECTORcHANGE vECTORS fOR uSER
FF90JMP $F75CSETMSGcONTROL os mESSAGES
FF93JMP $E4D2SECNDsEND sa aFTER lISTEN
FF96JMP $E4E0TKSAsEND sa aFTER tALK
FF99JMP $F763MEMTOPsET/rEAD sYSTEM ram tOP
FF9CJMP $F772MEMBOTsET/rEAD sYSTEM ram bOTTOM
FF9FJMP $C012KEYsCAN kEYBOARD
FFA2JMP $F75FSETTMOsET tIMEOUT iN ieee
FFA5JMP $E43EACPTRhANDSHAKE sERIAL bYTE iN
FFA8JMP $E503CIOUThANDSHAKE sERIAL bYTE oUT
FFABJMP $E515UNTLKcOMMAND sERIAL bUS untalk
FFAEJMP $E526UNLSNcOMMAND sERIAL bUS unlisten
FFB1JMP $E33ELISTNcOMMAND sERIAL bUS listen
FFB4JMP $E33BTALKcOMMAND sERIAL bUS talk
FFB7JMP $F744READSSrEAD i/o sTATUS wORD
FFBAJMP $F738SETLFSsET lOGICAL fILE pARAMETERS
FFBDJMP $F731SETNAMsET fILENAME
FFC0JMP ($031A)(IOPEN)oPEN vECTOR [EFBD]
FFC3JMP ($031C)(ICLOSE)cLOSE vECTOR [F188]
FFC6JMP ($031E)(ICHKIN)sET iNPUT [F106]
FFC9JMP ($0320)(ICHKOUT)sET oUTPUT [F14C]
FFCCJMP ($0322)(ICLRCH)rESTORE i/o vECTOR [F226]
FFCFJMP ($0324)(IBASIN)iNPUT vECTOR, CHRIN [EF06]
FFD2JMP ($0326)(IBSOUT)oUTPUT vECTOR, CHROUT [EF79]
FFD5JMP $F265LOADSPlOAD ram fROM dEVICE
FFD8JMP $F53ESAVESPsAVE ram tO dEVICE
FFDBJMP $F665SETTIMsET rEAL-tIME cLOCK
FFDEJMP $F65ERDTIMrEAD rEAL-tIME cLOCK
FFE1JMP ($0328)(ISTOP)tEST-sTOP vECTOR [F66E]
FFE4JMP ($032A)(IGETIN)gET vECTOR [EEEB]
FFE7JMP ($032C)(ICLALL)cLOSE aLL cHANNELS aND fILES [F222]
FFEAJMP $F5F8UDTIMiNCREMENT rEAL-tIME cLOCK
FFEDJMP $C00FSCRORGrETURN sCREEN oRGANIZATION
FFF0JMP $C018PLOTrEAD / sET cURSOR x/y pOSITION
FFF3JMP $F781IOBASErETURN i/o bASE aDDRESS
FFF6sYSTEM vECTORS
FFF6[FFFF]word
FFF8system [E224]word
FFFAtRANSFER vECTORS
FFFAnmi [FF05]word
FFFCreset [FF3D]word
FFFEirq [FF17]word