Files
Shawn Quick dfcaae62dd Add qlink, the disk tools, and a bootable ProDOS 8 image.
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.
2026-10-16 14:41:55 -07:00

1 line
5.0 KiB
NASM

****************************************************************
* *
* Common Strip Routines *
* Version 1.0 *
* August 13, 1986 *
* *
****************************************************************
*
* 19-Sep-90 Dave Lyons
*
* Changed to use ToStrip and ToBusyStrip vectors ($e10180 and
* $e10184). Looks like this will save 46 bytes.
*
****************************************************************
****************************************************************
* *
* Copyright (C) 1985-1988 *
* All Rights Reserved *
* Apple Computer, Inc. *
* *
****************************************************************
****************************************************************
*
* EndCall Routines.
*
* Functions exit through the EndCall routines. These routines
* fix the stack by moving the RTL addresses up and stripping
* off any input parameters.
*
* The number of bytes to strip off the stack is passed in the
* y-register.
*
* There are 8 end call routines
*
* EndCall Pulls D off stack before cleaning up. Sets
* a-reg to zero and clears carry.
* oEndCall Does not pull D off the stack before
* cleaning up. Sets a-reg to zero and clears
* carry.
* ErrOut Pulls D off stack, cleans up and returns
* error code passed in x-register, setting
* carry if x is not zero.
* oErrOut Does not pull D off stack before cleaning up.
* returns error code passed in x-register,
* setting carry if x is not zero.
*
* BusyEC Decrements the busy flag, pulls D off stack
* and cleans up.
* oBusyEC Decrements the busy flag, does not pull D off stack
* and cleans up.
* BusyErr Decrements the busy flag, pulls D off stack,
* cleans up and returns error code passed in
* x-register, setting the carry if x is not zero.
* oBusyErr Decrements the busy flag, does not pull D off
* the stack, cleans up and returns error code passed
* in x-register.
*
****************************************************************
Strip PROC
IncBusyFlg equ $E10064
DecBusyFlg equ $E10068
EXPORT BusyEC
BusyEC
ldx #0
EXPORT BusyErr
BusyErr
jsl DecBusyFlg
bra ErrOut
EXPORT EndCall
EndCall
ldx #0
EXPORT ErrOut
ErrOut
pld ; restore direct register
EXPORT oErrOut
oErrOut jml $e10184 ;19-Sep-90 DAL
; phy ; save amount to strip on stack
; tsc ; get stack pointer
; clc ; add to it the amount to strip
; adc 1,s
; tay ; put this result in Y
; tsc ; get back orig stack pointer
; phx ; save error on stack
; tax ; put orig stack in X
; phb ; now save the data bank reg
; pea $0000 ; set data bank reg to 0
; plb
; plb
; lda |3+4,x ; now use x and y to move 6 bytes
; sta |3+4,y ; of rtl info from current pos
; lda |3+2,x ; to final pos.
; sta |3+2,y
; lda |3+0,x
; sta |3+0,y
; plb ; restore data bank register
; plx ; restore x register with error
;
; tsc ; get stack again
; clc ; bump it by amount to strip Plus 2
; adc 1,s ; to make up for amount to strip
; adc #2 ; still on stack
; tcs ; reset stack pointer
; txa ; error into a-reg
; cmp #1 ; set carry correctly
; rtl ; fini
EXPORT oBusyEC
oBusyEC
ldx #0
EXPORT oBusyErr
oBusyErr jml $e10180 ;19-Sep-90 DAL (ToBusyStrip)
; jsl DecBusyFlg
; bra oErrOut
EXPORT oEndCall
oEndCall
ldx #0
bra oErrOut
ENDP
END