|
|
(2 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| <code>
| | #REDIRECT [[OS-9:REL]] |
| ;****************************************************
| |
| ;* Used Labels *
| |
| ;****************************************************
| |
| | |
| M0000 EQU $0000
| |
| M0001 EQU $0001
| |
| M0008 EQU $0008
| |
| M000C EQU $000C
| |
| M0012 EQU $0012
| |
| D.FMBM EQU $0020
| |
| M0022 EQU $0022
| |
| D.MLIM EQU $0024
| |
| D.ModDir EQU $0026
| |
| M0028 EQU $0028
| |
| M002A EQU $002A
| |
| D.NMI EQU $002C
| |
| M002E EQU $002E
| |
| M0036 EQU $0036
| |
| D.SvcIRQ EQU $0038
| |
| Z003A EQU $003A
| |
| M003C EQU $003C
| |
| M003E EQU $003E
| |
| M003F EQU $003F
| |
| M0040 EQU $0040
| |
| M0041 EQU $0041
| |
| M0042 EQU $0042
| |
| M0043 EQU $0043
| |
| D.UsrDis EQU $0044
| |
| D.SysDis EQU $0046
| |
| M0048 EQU $0048
| |
| M0049 EQU $0049
| |
| D.PROC EQU $004B
| |
| M004D EQU $004D
| |
| M004F EQU $004F
| |
| M0051 EQU $0051
| |
| M0053 EQU $0053
| |
| M0055 EQU $0055
| |
| M0057 EQU $0057
| |
| M005B EQU $005B
| |
| M0066 EQU $0066
| |
| M0068 EQU $0068
| |
| M0072 EQU $0072
| |
| M0081 EQU $0081
| |
| M00FF EQU $00FF
| |
| M0100 EQU $0100
| |
| M0109 EQU $0109
| |
| M010A EQU $010A
| |
| M016F_via_cvec_2e46 EQU $016F
| |
| M0175_via_cvec_2e48 EQU $0175
| |
| M017B_via_cvec_2e4a EQU $017B
| |
| M017C_via_cvec_2e4c EQU $017C
| |
| M0180_via_cvec_2e4e EQU $0180
| |
| M01CA_via_cvec_2e44 EQU $01CA
| |
| M01FF EQU $01FF
| |
| M0200 EQU $0200
| |
| M03E0 EQU $03E0
| |
| M0F00 EQU $0F00
| |
| M0FE3 EQU $0FE3
| |
| M222E EQU $222E
| |
| M8000 EQU $8000
| |
| M8021 EQU $8021
| |
| M810C EQU $810C
| |
| M87CD EQU $87CD
| |
| MC350 EQU $C350
| |
| MF000 EQU $F000
| |
| ZF056 EQU $F056 ; LOCATE OS9 MODULE START
| |
| PIA0AD EQU $FF00
| |
| PIA0BC EQU $FF03
| |
| DSKREG EQU $FF40
| |
| FDCREG EQU $FF48
| |
| FDCTRKREG EQU $FF49
| |
| FDCSECREG EQU $FF4A
| |
| FDCDATREG EQU $FF4B
| |
| SAMF0CLR EQU $FFC6
| |
| SAMTYSET EQU $FFDF
| |
| RESETV EQU $FFFE
| |
| RESETV EQU $FFFF
| |
| | |
| ;****************************************************
| |
| ;* Program Code / Data Areas *
| |
| ;****************************************************
| |
| | |
| ORG $2600
| |
| | |
| BOOTSIG FCC "OS" ;2600: 4F 53 'OS' DOS BOOTTRACK OS SIGNATURE
| |
| EXECADDR FDB REL ;2602: 26 0C '&.' EXECUTION START ADDRESS
| |
| OS9_BOOT FCC "OSy`BOOT" ;2604: 4F 53 79 60 42 4F 4F 54 'OSy`BOOT' OS-9 BOOT SCREEN STRING
| |
| ; START OF REL "MODULE"
| |
| REL CLR PIA0BC ;260C: 7F FF 03 '...' DISABLE VSYNC | |
| STA SAMTYSET ;260F: B7 FF DF '...' SAM MAP TYPE=1 "ALL RAM"
| |
| LDB #$06 ;2612: C6 06 '..' SET COUNTDOWN TO CLEAR 7 BITS (B=6)
| |
| LDX #SAMF0CLR ;2614: 8E FF C6 '...' START WITH SAM DISPLAY OFFSET F0 BIT
| |
| REL10 STA ,X++ ;2617: A7 81 '..' CLEAR THE DISPLAY OFFSET BIT THEN X=X+2
| |
| DECB ;2619: 5A 'Z' COUNT DOWN 1
| |
| BNE REL10 ;261A: 26 FB '&.' DID WE CLEAR OUR 7TH BIT (B=0)
| |
| STA $01,X ;261C: A7 01 '..' YES, SET DISPLAY OFFSET SCREEN AT $8000
| |
| ; CLEAR SCREEN WITH SPACES
| |
| LDX #M8000 ;261E: 8E 80 00 '...'
| |
| LDY #M0200 ;2621: 10 8E 02 00 '....'
| |
| LDA #$60 ;2625: 86 60 '.`'
| |
| REL20 STA ,X+ ;2627: A7 80 '..'
| |
| DEY ;2629: 31 3F '1?'
| |
| BNE REL20 ;262B: 26 FA '&.'
| |
| ; PUT BANNER ONTO SCREEN
| |
| LDX #M810C ;262D: 8E 81 0C '...'
| |
| LEAY OS9_BOOT,PCR ;2630: 31 8C D1 '1..'
| |
| LDB #$08 ;2633: C6 08 '..'
| |
| REL30 LDA ,Y+ ;2635: A6 A0 '..'
| |
| STA ,X+ ;2637: A7 80 '..'
| |
| DECB ;2639: 5A 'Z'
| |
| BNE REL30 ;263A: 26 F9 '&.'
| |
| ; FIXME WHAT IS THIS
| |
| TST M0072 ;263C: 0D 72 '.r' FIXME TEST ALREADY RELOCATED FLAG?
| |
| BEQ REL50 ;263E: 27 13 ''.'
| |
| ; START RELOCATING
| |
| LEAU >BOOTSIG,PCR ;2640: 33 8D FF BC '3...'
| |
| LDX #M0F00 ;2644: 8E 0F 00 '...'
| |
| LDY #MF000 ;2647: 10 8E F0 00 '....'
| |
| REL40 LDA ,U+ ;264B: A6 C0 '..'
| |
| STA ,Y+ ;264D: A7 A0 '..'
| |
| DEX ;264F: 30 1F '0.'
| |
| BNE REL40 ;2651: 26 F8 '&.'
| |
| ; RELOCATION COMPLETE, PREPARE FOR OS9 MODULE COLD START
| |
| REL50 JMP ZF056 ;2653: 7E F0 56 '~.V' JUMP TO RELOCATED MODULES
| |
| LEAX <M01SYNC,PCR ;2656: 30 8C 04 '0..' LOCATE OS9 MODULE START
| |
| LDD $09,X ;2659: EC 09 '..' LOCATE OS9 EXEC ADDRESS
| |
| JMP D,X ;265B: 6E 8B 'n.' JUMP INTO OS9 MODULE
| |
| </code>
| |