mirror of
https://github.com/marketideas/qasm.git
synced 2026-10-25 13:02:45 +00:00
Move the assembler to src/qasm. qlink links OMF 1.0 and 2.0 from a script. makeBin flattens a load file, qomf dumps OMF, and qpro builds ProDOS volumes. APW and MPW assemble through the ORCA front end. Relocatable modules emit OMF objects. Listings stay off unless -l is set. make boot assembles the GS/OS 6.0.1 ProDOS 8 kernel and BASIC.SYSTEM into an 800K volume. BASIC.SYSTEM accepts ls and pfx, and its splash reports PRODOS BASIC 2.0, copyright 1983-2026. IIGS.601.SRC is the source and the BASIC.SYSTEM oracle that image is built from.
1 line
5.0 KiB
Plaintext
1 line
5.0 KiB
Plaintext
;============================================================
|
|
;
|
|
; NetPrefs -- A ProDOS 8 application to set the same BRAM
|
|
; locations set by the Network CDEV. This is for those users
|
|
; who can't get to the Network CDEV for some reason (such as
|
|
; starting up over the network with ProDOS 8).
|
|
;
|
|
; Written by Mark Day.
|
|
; Copyright © 1992 Apple Computer, Inc. All rights reserved.
|
|
;
|
|
; 12-Aug-92 MSD Now uses Return instead of ESC to quit.
|
|
;
|
|
; 21-Oct-92 DAL Fixed CR's high bit in "only on a GS" message
|
|
; (was showing up as an inverse M).
|
|
;
|
|
; 17-Feb-93 DAL Change NetPrefs to Network Preferences.
|
|
;
|
|
; 24-Feb-93 SS Changed "LocalTalk" to "Built-In"
|
|
;
|
|
; 2-Apr-93 DAL Changed ETherTalk to Ethernet.
|
|
;
|
|
;============================================================
|
|
|
|
machine m6502
|
|
|
|
CR equ $8D
|
|
ESC equ $9B
|
|
uparrow equ $8B
|
|
downarrow equ $8A
|
|
leftarrow equ $88
|
|
rightarrow equ $95
|
|
TAB equ $89
|
|
BELL equ $87
|
|
|
|
|
|
ptr equ 0
|
|
which equ 2 ; which BRAM are we setting here?
|
|
ch equ $24
|
|
cv equ $25
|
|
InvMask equ $32
|
|
|
|
KBD equ $C000 ; (r)
|
|
KCLR equ $C010 ; (w)
|
|
ClrAltChar equ $C00E ; (w) disable inverse lower case
|
|
SetAltChar equ $C00F ; (w) enable inverse lower case
|
|
|
|
Home equ $FC58
|
|
SetVid equ $FE93
|
|
SetNorm equ $FE84
|
|
SetPort equ $FE95
|
|
COUT equ $FDED
|
|
VTab equ $FB5B
|
|
ClrEOL equ $FC9C
|
|
|
|
IDRoutine equ $FE1F
|
|
|
|
MLI equ $BF00
|
|
|
|
|
|
NetPrefs proc org $2000
|
|
|
|
;
|
|
; Set up and erase the text screen
|
|
;
|
|
jsr SetVid
|
|
jsr SetNorm
|
|
jsr Home
|
|
|
|
sec
|
|
jsr IDRoutine ; carry cleared if this is a GS
|
|
bcc IsAGS
|
|
|
|
jsr Print
|
|
dc.b 'THIS PROGRAM CAN ONLY BE USED ON AN',$0D
|
|
dc.b 'APPLE IIGS. PLEASE PRESS A KEY TO QUIT.',0
|
|
jsr WaitKey
|
|
jmp Quit
|
|
IsAGS
|
|
;
|
|
; Print the main menu.
|
|
;
|
|
lda #3
|
|
jsr SetPort
|
|
lda #$91 ; control-Q sets 40 column mode
|
|
jsr cout
|
|
|
|
lda #16-6
|
|
sta ch
|
|
jsr print
|
|
dc.b 'Network Preferences',$0D,0
|
|
lda #16-6
|
|
sta ch
|
|
jsr print
|
|
dc.b $1B,$0F
|
|
dc.b 'LLLLLLLLLLLLLLLLLLL',$0E,$18,0
|
|
|
|
lda #4
|
|
jsr VTab
|
|
lda #5
|
|
sta ch
|
|
jsr print
|
|
dc.b 'Select a network connection:',0
|
|
|
|
lda #10
|
|
jsr VTab
|
|
lda #5
|
|
sta ch
|
|
jsr print
|
|
dc.b 'Start up over the network with:',0
|
|
|
|
lda #18
|
|
jsr vtab
|
|
lda #0
|
|
sta ch
|
|
jsr print
|
|
dc.b $1B,'Use the ',$0F,'K',$0E,' and ',$0F,'J',$0E
|
|
dc.b ' keys to move the ==>',$0D
|
|
dc.b 'symbol up or down. Use the ',$0F,'H',$0E,','
|
|
dc.b $0F,'U',$0E,' or TAB',$0D
|
|
dc.b 'keys to change the selection.',$0D,$0D
|
|
dc.b 'Press the RETURN key to quit.',$18,0
|
|
|
|
jsr ShowSettings ; show the current settings
|
|
|
|
lda #$62 ; start with P8 vs. GS/OS
|
|
jsr DrawArrow
|
|
|
|
;
|
|
; Get a key press and decide what to do
|
|
;
|
|
Loop
|
|
jsr WaitKey
|
|
cmp #CR
|
|
bne NotQuit
|
|
jmp Quit
|
|
NotQuit
|
|
cmp #uparrow
|
|
bne NotUp
|
|
lda #$61 ; select Built-In/EtherTalk
|
|
jsr DrawArrow
|
|
jmp Loop
|
|
NotUp
|
|
cmp #downarrow
|
|
bne NotDown
|
|
lda #$62
|
|
jsr DrawArrow
|
|
jmp Loop
|
|
NotDown
|
|
cmp #leftarrow
|
|
bne NotLeft
|
|
lda #1 ; force setting to 1
|
|
jsr SetSetting
|
|
jmp Loop
|
|
NotLeft
|
|
cmp #rightarrow
|
|
bne NotRight
|
|
lda #2 ; force setting to 2
|
|
jsr SetSetting
|
|
jmp Loop
|
|
NotRight
|
|
cmp #TAB ; toggle setting
|
|
bne NotTAB
|
|
lda which
|
|
jsr GetSetting
|
|
eor #$03 ; toggle between 1 and 2
|
|
jsr SetSetting
|
|
jmp Loop
|
|
NotTAB
|
|
lda #BELL
|
|
jsr cout
|
|
jmp Loop
|
|
|
|
|
|
DrawArrow
|
|
pha ; save new setting
|
|
lda which
|
|
and #1
|
|
tax
|
|
lda @vline,x
|
|
jsr vtab
|
|
lda #0
|
|
sta ch
|
|
jsr print
|
|
dc.b ' ',0
|
|
|
|
pla
|
|
sta which
|
|
and #1
|
|
tax
|
|
lda @vline,x
|
|
jsr vtab
|
|
lda #0
|
|
sta ch
|
|
jsr print
|
|
dc.b '==>',0
|
|
|
|
rts
|
|
@vline dc.b 12,6
|
|
|
|
|
|
|
|
ShowSettings
|
|
lda #6 ; line for Built-In/EtherTalk
|
|
jsr vtab
|
|
lda #5
|
|
sta ch
|
|
lda #$61
|
|
jsr GetSetting
|
|
pha ; save result of setting
|
|
jsr @setmode
|
|
jsr print
|
|
dc.b 'Built-In',0
|
|
lda #20
|
|
sta ch
|
|
pla
|
|
eor #3 ; change to opposite setting
|
|
jsr @setmode
|
|
jsr print
|
|
dc.b 'Ethernet',0 ;was EtherTalk, 2-Apr-93 DAL
|
|
|
|
lda #12 ; line for ProDOS 8/GSOS
|
|
jsr vtab
|
|
lda #5
|
|
sta ch
|
|
lda #$62
|
|
jsr GetSetting
|
|
pha
|
|
jsr @setmode
|
|
jsr print
|
|
dc.b 'GS/OS',0
|
|
lda #20
|
|
sta ch
|
|
pla
|
|
eor #3
|
|
jsr @setmode
|
|
jsr print
|
|
dc.b 'ProDOS 8',0
|
|
|
|
jsr SetNorm
|
|
|
|
rts
|
|
|
|
@setmode
|
|
and #1
|
|
bne SetInv
|
|
jmp SetNorm
|
|
SetInv
|
|
lda #$7F
|
|
sta InvMask
|
|
rts
|
|
|
|
|
|
WaitKey
|
|
lda KBD
|
|
bpl WaitKey
|
|
sta KCLR
|
|
rts
|
|
|
|
Print
|
|
pla
|
|
sta ptr
|
|
pla
|
|
sta ptr+1
|
|
@loop
|
|
inc ptr
|
|
bne @skip
|
|
inc ptr+1
|
|
@skip
|
|
ldy #0
|
|
lda (ptr),y
|
|
beq @done
|
|
eor #$80 ; set high bit so it displays in Normal mode
|
|
jsr cout
|
|
jmp @loop
|
|
@done
|
|
lda ptr+1
|
|
pha
|
|
lda ptr
|
|
pha
|
|
|
|
rts
|
|
|
|
Quit
|
|
jsr Home
|
|
jsr SetVid
|
|
|
|
jsr MLI
|
|
dc.b $65 ; Quit call
|
|
dc.w QuitPB
|
|
brk 0 ; should NEVER get here!
|
|
QuitPB
|
|
dc.b 4
|
|
ds.b 6
|
|
|
|
|
|
machine m65816
|
|
|
|
GetSetting
|
|
clc
|
|
xce
|
|
rep #$30
|
|
|
|
and #$00FF ; BRAM location is just a byte
|
|
pha ; room for result
|
|
pha ; BRAM location
|
|
ldx #$0C03 ; ReadBParam
|
|
jsl $E10000
|
|
pla ; get current setting
|
|
cmp #2
|
|
beq @gotit
|
|
lda #1 ; settings other than 2 are forced to 1
|
|
@gotit
|
|
sec
|
|
xce
|
|
rts
|
|
|
|
|
|
SetSetting
|
|
clc
|
|
xce
|
|
rep #$30
|
|
|
|
and #$00FF ; setting is only a byte
|
|
pha
|
|
lda which
|
|
and #$00FF ; BRAM location is only a byte
|
|
pha
|
|
ldx #$0B03 ; WriteBParam
|
|
jsl $E10000
|
|
|
|
sec
|
|
xce
|
|
|
|
jmp ShowSettings
|
|
|
|
endp
|
|
end
|