Delete 689 undead files.
These files "magically reappeared" after the conversion from CVS to Mercurial. The old CVS repository deleted these files but did not record *when* it deleted these files. The conversion resurrected these files because they have no history of deletion. These files were probably deleted before year 1995. The CVS repository begins to record deletions around 1995. These files may still appear in older revisions of this Mercurial repository, when they should already be deleted. There is no way to fix this, because the CVS repository provides no dates of deletion. See http://sourceforge.net/mailarchive/message.php?msg_id=29823032
This commit is contained in:
@@ -1,67 +0,0 @@
|
||||
# $Header$
|
||||
EMHOME = ../../..
|
||||
h = $(EMHOME)/h
|
||||
LIBOBJ = $(EMHOME)/modules/lib/libobject.a
|
||||
CDIR = $(EMHOME)/mach/proto/as
|
||||
CPP = $(EMHOME)/lib/cpp
|
||||
DEF =
|
||||
|
||||
FFLAG =
|
||||
INCL = -I. -I$h $(DEF)
|
||||
CFLAGS = $(FFLAG) -O $(INCL)
|
||||
YFLAGS = -d
|
||||
LDFLAGS = $(FFLAG)
|
||||
|
||||
CSRC = $(CDIR)/comm3.c $(CDIR)/comm4.c $(CDIR)/comm5.c \
|
||||
$(CDIR)/comm6.c $(CDIR)/comm7.c $(CDIR)/comm8.c
|
||||
COBJ = comm3.o comm4.o comm5.o \
|
||||
comm6.o comm7.o comm8.o
|
||||
MACH = mach0.c mach1.c mach2.c mach3.c mach4.c mach5.c
|
||||
COMM = $(CDIR)/comm0.h $(CDIR)/comm1.h $(CDIR)/comm2.y $(CSRC)
|
||||
|
||||
all: as
|
||||
|
||||
install:all
|
||||
../../install as
|
||||
|
||||
cmp:
|
||||
-../../compare as
|
||||
|
||||
clean:
|
||||
rm -f *.o as as.[cy] y.tab.h
|
||||
|
||||
pr: $(MACH)
|
||||
@pr -n $(MACH)
|
||||
|
||||
opr:
|
||||
make pr | opr
|
||||
as: $(COBJ) as.o
|
||||
$(CC) $(LDFLAGS) $(COBJ) as.o $(LIBOBJ) -o as
|
||||
|
||||
as.y: $(CDIR)/comm2.y
|
||||
$(CPP) -P -I. -I$h $(DEF) $(CDIR)/comm2.y >as.y
|
||||
-@if test -f Expect ; then cat Expect ; else echo "expect 1 shift/reduce conflict"; fi
|
||||
|
||||
lint: $(CSRC) as.c
|
||||
lint $(INCL) $(CSRC) as.c
|
||||
|
||||
y.tab.h: as.c
|
||||
$(COBJ): y.tab.h
|
||||
$(COBJ) as.y: $(CDIR)/comm0.h mach0.c
|
||||
$(COBJ) as.y: $(CDIR)/comm1.h mach1.c
|
||||
as.y: mach2.c
|
||||
comm3.o: mach3.c
|
||||
as.y: mach4.c
|
||||
comm8.o: mach5.c
|
||||
comm3.o: $(CDIR)/comm3.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/comm3.c
|
||||
comm4.o: $(CDIR)/comm4.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/comm4.c
|
||||
comm5.o: $(CDIR)/comm5.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/comm5.c
|
||||
comm6.o: $(CDIR)/comm6.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/comm6.c
|
||||
comm7.o: $(CDIR)/comm7.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/comm7.c
|
||||
comm8.o: $(CDIR)/comm8.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/comm8.c
|
||||
@@ -1,184 +0,0 @@
|
||||
# $Header$
|
||||
|
||||
EMHOME=../../..
|
||||
PREFLAGS=-I$(EMHOME)/h -I. -I$(EMHOME)/mach -I$(EMHOME)/modules/h -DNDEBUG
|
||||
PFLAGS=
|
||||
CFLAGS=$(PREFLAGS) $(PFLAGS) -O
|
||||
LDFLAGS=$(PFLAGS)
|
||||
LINTOPTS=-hbxac
|
||||
LIBS=$(EMHOME)/lib/em_data.a $(EMHOME)/modules/lib/libflt.a
|
||||
CDIR=$(EMHOME)/mach/proto/cg
|
||||
CFILES=$(CDIR)/codegen.c $(CDIR)/compute.c $(CDIR)/equiv.c $(CDIR)/fillem.c \
|
||||
$(CDIR)/gencode.c $(CDIR)/glosym.c $(CDIR)/main.c $(CDIR)/move.c \
|
||||
$(CDIR)/nextem.c $(CDIR)/reg.c $(CDIR)/regvar.c $(CDIR)/salloc.c \
|
||||
$(CDIR)/state.c $(CDIR)/subr.c $(CDIR)/var.c
|
||||
OFILES=codegen.o compute.o equiv.o fillem.o gencode.o glosym.o main.o\
|
||||
move.o nextem.o reg.o regvar.o salloc.o state.o subr.o var.o
|
||||
|
||||
all: tables.c
|
||||
make "EMHOME="$(EMHOME) cg
|
||||
|
||||
cg: tables.o $(OFILES)
|
||||
$(CC) $(LDFLAGS) $(OFILES) tables.o $(LIBS) -o cg
|
||||
|
||||
tables.o: tables.c
|
||||
$(CC) -c $(PREFLAGS) -I$(CDIR) tables.c
|
||||
|
||||
codegen.o: $(CDIR)/codegen.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/codegen.c
|
||||
compute.o: $(CDIR)/compute.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/compute.c
|
||||
equiv.o: $(CDIR)/equiv.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/equiv.c
|
||||
fillem.o: $(CDIR)/fillem.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/fillem.c
|
||||
gencode.o: $(CDIR)/gencode.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/gencode.c
|
||||
glosym.o: $(CDIR)/glosym.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/glosym.c
|
||||
main.o: $(CDIR)/main.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/main.c
|
||||
move.o: $(CDIR)/move.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/move.c
|
||||
nextem.o: $(CDIR)/nextem.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/nextem.c
|
||||
reg.o: $(CDIR)/reg.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/reg.c
|
||||
regvar.o: $(CDIR)/regvar.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/regvar.c
|
||||
salloc.o: $(CDIR)/salloc.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/salloc.c
|
||||
state.o: $(CDIR)/state.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/state.c
|
||||
subr.o: $(CDIR)/subr.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/subr.c
|
||||
var.o: $(CDIR)/var.c
|
||||
$(CC) -c $(CFLAGS) $(CDIR)/var.c
|
||||
|
||||
install: all
|
||||
../../install cg
|
||||
|
||||
cmp: all
|
||||
-../../compare cg
|
||||
|
||||
distr: tables.c
|
||||
rm -f tables1.[ch]
|
||||
cp tables.c tables1.c
|
||||
cp tables.h tables1.h
|
||||
chmod -w tables1.[ch]
|
||||
|
||||
|
||||
tables.c: table
|
||||
-mv tables.h tables.h.save
|
||||
$(EMHOME)/lib/cpp -P table | $(EMHOME)/lib/cgg > debug.out
|
||||
-if cmp -s tables.h.save tables.h; then mv tables.h.save tables.h; else exit 0; fi
|
||||
-if cmp -s /dev/null tables.h; then mv tables.h.save tables.h; else exit 0; fi
|
||||
|
||||
lint: $(CFILES)
|
||||
lint $(LINTOPTS) $(PREFLAGS) $(CFILES)
|
||||
clean:
|
||||
rm -f *.o tables.c tables.h debug.out cg tables.h.save
|
||||
|
||||
codegen.o: $(CDIR)/assert.h
|
||||
codegen.o: $(CDIR)/data.h
|
||||
codegen.o: $(CDIR)/equiv.h
|
||||
codegen.o: $(CDIR)/extern.h
|
||||
codegen.o: $(CDIR)/param.h
|
||||
codegen.o: $(CDIR)/result.h
|
||||
codegen.o: $(CDIR)/state.h
|
||||
codegen.o: tables.h
|
||||
codegen.o: $(CDIR)/types.h
|
||||
compute.o: $(CDIR)/assert.h
|
||||
compute.o: $(CDIR)/data.h
|
||||
compute.o: $(CDIR)/extern.h
|
||||
compute.o: $(CDIR)/glosym.h
|
||||
compute.o: $(CDIR)/param.h
|
||||
compute.o: $(CDIR)/result.h
|
||||
compute.o: tables.h
|
||||
compute.o: $(CDIR)/types.h
|
||||
equiv.o: $(CDIR)/assert.h
|
||||
equiv.o: $(CDIR)/data.h
|
||||
equiv.o: $(CDIR)/equiv.h
|
||||
equiv.o: $(CDIR)/extern.h
|
||||
equiv.o: $(CDIR)/param.h
|
||||
equiv.o: $(CDIR)/result.h
|
||||
equiv.o: tables.h
|
||||
equiv.o: $(CDIR)/types.h
|
||||
fillem.o: $(CDIR)/assert.h
|
||||
fillem.o: $(CDIR)/data.h
|
||||
fillem.o: $(CDIR)/extern.h
|
||||
fillem.o: mach.c
|
||||
fillem.o: mach.h
|
||||
fillem.o: $(CDIR)/param.h
|
||||
fillem.o: $(CDIR)/regvar.h
|
||||
fillem.o: $(CDIR)/result.h
|
||||
fillem.o: tables.h
|
||||
fillem.o: $(CDIR)/types.h
|
||||
gencode.o: $(CDIR)/assert.h
|
||||
gencode.o: $(CDIR)/data.h
|
||||
gencode.o: $(CDIR)/extern.h
|
||||
gencode.o: $(CDIR)/param.h
|
||||
gencode.o: $(CDIR)/result.h
|
||||
gencode.o: tables.h
|
||||
gencode.o: $(CDIR)/types.h
|
||||
glosym.o: $(CDIR)/glosym.h
|
||||
glosym.o: $(CDIR)/param.h
|
||||
glosym.o: tables.h
|
||||
glosym.o: $(CDIR)/types.h
|
||||
main.o: $(CDIR)/param.h
|
||||
move.o: $(CDIR)/assert.h
|
||||
move.o: $(CDIR)/data.h
|
||||
move.o: $(CDIR)/extern.h
|
||||
move.o: $(CDIR)/param.h
|
||||
move.o: $(CDIR)/result.h
|
||||
move.o: tables.h
|
||||
move.o: $(CDIR)/types.h
|
||||
nextem.o: $(CDIR)/assert.h
|
||||
nextem.o: $(CDIR)/data.h
|
||||
nextem.o: $(CDIR)/extern.h
|
||||
nextem.o: $(CDIR)/param.h
|
||||
nextem.o: $(CDIR)/result.h
|
||||
nextem.o: tables.h
|
||||
nextem.o: $(CDIR)/types.h
|
||||
reg.o: $(CDIR)/assert.h
|
||||
reg.o: $(CDIR)/data.h
|
||||
reg.o: $(CDIR)/extern.h
|
||||
reg.o: $(CDIR)/param.h
|
||||
reg.o: $(CDIR)/result.h
|
||||
reg.o: tables.h
|
||||
reg.o: $(CDIR)/types.h
|
||||
regvar.o: $(CDIR)/assert.h
|
||||
regvar.o: $(CDIR)/data.h
|
||||
regvar.o: $(CDIR)/extern.h
|
||||
regvar.o: $(CDIR)/param.h
|
||||
regvar.o: $(CDIR)/regvar.h
|
||||
regvar.o: $(CDIR)/result.h
|
||||
regvar.o: tables.h
|
||||
regvar.o: $(CDIR)/types.h
|
||||
salloc.o: $(CDIR)/assert.h
|
||||
salloc.o: $(CDIR)/data.h
|
||||
salloc.o: $(CDIR)/extern.h
|
||||
salloc.o: $(CDIR)/param.h
|
||||
salloc.o: $(CDIR)/result.h
|
||||
salloc.o: tables.h
|
||||
salloc.o: $(CDIR)/types.h
|
||||
state.o: $(CDIR)/assert.h
|
||||
state.o: $(CDIR)/data.h
|
||||
state.o: $(CDIR)/extern.h
|
||||
state.o: $(CDIR)/param.h
|
||||
state.o: $(CDIR)/result.h
|
||||
state.o: $(CDIR)/state.h
|
||||
state.o: tables.h
|
||||
state.o: $(CDIR)/types.h
|
||||
subr.o: $(CDIR)/assert.h
|
||||
subr.o: $(CDIR)/data.h
|
||||
subr.o: $(CDIR)/extern.h
|
||||
subr.o: $(CDIR)/param.h
|
||||
subr.o: $(CDIR)/result.h
|
||||
subr.o: tables.h
|
||||
subr.o: $(CDIR)/types.h
|
||||
var.o: $(CDIR)/data.h
|
||||
var.o: $(CDIR)/param.h
|
||||
var.o: $(CDIR)/result.h
|
||||
var.o: tables.h
|
||||
var.o: $(CDIR)/types.h
|
||||
@@ -1,20 +0,0 @@
|
||||
EMHOME=../../..
|
||||
CFLAGS=-O -I$(EMHOME)/h
|
||||
|
||||
dl: dl.o
|
||||
$(CC) -o dl dl.o $(EMHOME)/modules/lib/libobject.a
|
||||
|
||||
install: dl
|
||||
../../install dl
|
||||
|
||||
cmp: dl
|
||||
-../../compare dl
|
||||
|
||||
opr:
|
||||
make pr | opr
|
||||
|
||||
pr:
|
||||
@pr `pwd`/dl.c
|
||||
|
||||
clean:
|
||||
-rm -f *.o *.old dl
|
||||
@@ -1,21 +0,0 @@
|
||||
all:
|
||||
|
||||
install:
|
||||
../../install head_em.s head_em
|
||||
../../install libem_s.a tail_em
|
||||
../../install end.s end_em
|
||||
|
||||
cmp:
|
||||
-../../compare head_em.s head_em
|
||||
-../../compare libem_s.a tail_em
|
||||
-../../compare end.s end_em
|
||||
|
||||
opr:
|
||||
make pr | opr
|
||||
|
||||
pr:
|
||||
@pr `pwd`/head_em.s
|
||||
@arch pv libem_s.a | pr -h `pwd`/libem_s.a
|
||||
@pr `pwd`/end.s
|
||||
|
||||
clean:
|
||||
@@ -1,17 +0,0 @@
|
||||
.define endtext, enddata, endbss, end
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
|
||||
.sect .text
|
||||
endtext:
|
||||
.align 2
|
||||
.sect .data
|
||||
.align 2
|
||||
enddata:
|
||||
.sect .bss
|
||||
.align 2
|
||||
endbss:
|
||||
end:
|
||||
@@ -1,233 +0,0 @@
|
||||
.define WRCH, RDCH, Earray, Erange, Eset
|
||||
.define Eiovfl, Eidivz, Eiund, Econv
|
||||
.define Estack, Eheap, Eillins, Eoddz
|
||||
.define Ecase , Ebadmon, OSBYTE, MON
|
||||
.define Ebadlin, Ebadgto, BASE, NBYTES
|
||||
.define hol0, IGNMASK, ADDR, PROGNAME
|
||||
.define LB, LBl, SP, HP, ERRPROC, UNSIGN
|
||||
.define Ytmp, EXG, ARTH, RETURN, SIGN
|
||||
.define RETSIZE, TRAPVAL, STACK, BRANCH
|
||||
.define start, Push, Pop, STACKTh, STACKTl
|
||||
.define F_DUM
|
||||
.sect .zero
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
|
||||
! DEFINITIONS
|
||||
|
||||
! The next three definitions are special for the
|
||||
! BBC microcomputer
|
||||
|
||||
WRCH = 0x0FFEE ! This subroutine writes the character in
|
||||
! register A to the screen
|
||||
RDCH = 0x0FFE0 ! This subroutine returns a character in
|
||||
! register A from the current input stream
|
||||
OSBYTE = 0x0FFF4 ! This subroutine performs miscelaneous
|
||||
! operating system calls
|
||||
|
||||
F_DUM = 0 ! Dummy floating point constant
|
||||
|
||||
! Here are the error numbers
|
||||
|
||||
Earray = 0
|
||||
Erange = 1
|
||||
Eset = 2
|
||||
Eiovfl = 3
|
||||
Eidivz = 6
|
||||
Eiund = 8
|
||||
Econv = 10
|
||||
Estack = 16
|
||||
Eheap = 17
|
||||
Eillins = 18
|
||||
Eoddz = 19
|
||||
Ecase = 20
|
||||
Ebadmon = 25
|
||||
Ebadlin = 26
|
||||
Ebadgto = 27
|
||||
MON = 0x78D0
|
||||
|
||||
BASE = 240 ! This is the offset from the localbase
|
||||
! for the second localbase
|
||||
|
||||
STACKTh = 0x78 ! This is the top of the stack
|
||||
STACKTl = 0x0D0
|
||||
|
||||
! Some zeropage declarations
|
||||
|
||||
.sect .zero
|
||||
|
||||
RES: .space 76 ! special for the operating system
|
||||
|
||||
hol0: .space 16 ! the hol0 block
|
||||
|
||||
IGNMASK: .space 2 ! can hold the ingnore mask
|
||||
|
||||
ADDR: .space 4 ! used for indirect addressing
|
||||
|
||||
LB: .space 2 ! the localbase
|
||||
|
||||
LBl: .space 2 ! the second localbase (localbase-BASE)
|
||||
|
||||
SP: .space 3 ! the stackpointer (real_stack)
|
||||
|
||||
HP: .space 2 ! the heap pointer
|
||||
|
||||
BRANCH: .space 2 ! used for branch instructions
|
||||
|
||||
ERRPROC: .space 2 ! can hold the address of the error handler
|
||||
|
||||
Ytmp: .space 1 ! used for intermediate storage in Y
|
||||
|
||||
EXG: .space 2 ! used by the exchange subroutine Exg
|
||||
|
||||
ARTH: .space 16 ! used for arithmetic
|
||||
|
||||
NBYTES: .space 2 ! containes the number of bytes for a block move
|
||||
|
||||
|
||||
RETURN: .space 4 ! the return area
|
||||
|
||||
RETSIZE: .space 1 ! the size of the object returned
|
||||
|
||||
SIGN: .space 1 ! the sign of the calculation
|
||||
|
||||
UNSIGN : .space 1 ! is it signed or unsigned arithmetic
|
||||
|
||||
TRAPVAL: .space 1 ! intermediate storage of the error number
|
||||
|
||||
STACK: .space 1 ! contains the hardware stackpointer on
|
||||
! entering _m_a_i_n for a neat return
|
||||
|
||||
RESERVED: .space 112 ! used by the operating system
|
||||
|
||||
.sect .text
|
||||
.base 0x0E02 ! where to start in the BBC micro
|
||||
! GENERAL PURPOSE ROUTINES
|
||||
|
||||
start:
|
||||
tsx
|
||||
stx STACK ! save stackpointer for exit and error
|
||||
|
||||
! The following three operating system calls are only
|
||||
! for the BBC microcomputer
|
||||
|
||||
lda #2
|
||||
ldx #0
|
||||
ldy #0
|
||||
jsr OSBYTE ! return control to the keyboard
|
||||
lda #15
|
||||
ldx #0
|
||||
ldy #0
|
||||
jsr OSBYTE ! clear all internal buffers
|
||||
lda #3
|
||||
ldx #5
|
||||
ldy #0
|
||||
jsr OSBYTE ! output to screen and RS423
|
||||
|
||||
lda #STACKTl
|
||||
sta LB ! set localbase (lowbyte)
|
||||
sta SP+2
|
||||
lda #0
|
||||
sta SP ! set stackpointer (lowbyte)
|
||||
sta ERRPROC ! set start address for error handler (lowbyte)
|
||||
sta ERRPROC+1 ! set start address for error handler (highbyte)
|
||||
sta hol0 ! set the line number (lowbyte)
|
||||
sta hol0+1 ! set the line number (highbyte)
|
||||
lda #STACKTh
|
||||
sta SP+1 ! set the stacpointer (highbyte)
|
||||
sta LB+1 ! set the localbase (highbyte)
|
||||
lda #[endbss].l
|
||||
sta HP ! set the heap pointer (lowbyte)
|
||||
lda #[endbss].h
|
||||
sta HP+1 ! set the heap pointer (highbyte)
|
||||
lda #[PROGNAME].l
|
||||
sta hol0+4 ! set fake programname pointer (lowbyte)
|
||||
lda #[PROGNAME].h
|
||||
sta hol0+5 ! set fake programname pointer (highbyte)
|
||||
lda #[beginbss].l
|
||||
sta ADDR ! start address of bss block (lowbyte)
|
||||
lda #[beginbss].h
|
||||
sta ADDR+1 ! start address of bss block (highbyte)
|
||||
ldy #0
|
||||
lda #0
|
||||
4: ldx #[endbss].h ! clear bss block
|
||||
cpx ADDR+1
|
||||
bcc 1f ! end of bss block reached
|
||||
bne 2f
|
||||
ldx #[endbss].l
|
||||
cpx ADDR
|
||||
bcc 1f ! end of bss block reached
|
||||
2: sta (ADDR),y
|
||||
inc ADDR
|
||||
bne 3f
|
||||
inc ADDR+1
|
||||
3: jmp 4b
|
||||
1: lda #0
|
||||
tax
|
||||
jsr Push ! push fake envelope pointer
|
||||
lda #[PROGNAME].h
|
||||
ldx #[PROGNAME].l
|
||||
jsr Push ! push argv[0]
|
||||
lda #0
|
||||
ldx #1
|
||||
jsr Push ! push argc
|
||||
jsr __m_a_i_n ! start the real program
|
||||
|
||||
lda #0x0FF
|
||||
jsr WRCH ! send end of program to R423
|
||||
lda #3
|
||||
ldx #0
|
||||
jsr OSBYTE ! send output to screen only
|
||||
lda #2
|
||||
ldx #1
|
||||
jsr OSBYTE ! input only from R423
|
||||
rts
|
||||
|
||||
|
||||
! The subroutine Push pushes the registerpair AX onto the stack.
|
||||
|
||||
Push:
|
||||
sty Ytmp ! save Y
|
||||
ldy SP+2
|
||||
bne 1f ! lowbyte of stackpointer <> 0
|
||||
dec SP+1 ! decrement highbyte of stackpointer
|
||||
1: dey
|
||||
dey ! decrement lowbyte of stackpointer
|
||||
sty SP+2 ! save lowbyte of stackpointer
|
||||
pha ! save A
|
||||
txa
|
||||
sta (SP),y ! push X onto the stack
|
||||
iny
|
||||
pla ! get A
|
||||
sta (SP),y ! push A onto the stack
|
||||
ldy Ytmp ! restore Y
|
||||
rts
|
||||
|
||||
|
||||
! The subroutine Pop pops the registerpair AX from the stack.
|
||||
|
||||
Pop:
|
||||
sty Ytmp ! save Y
|
||||
ldy SP+2
|
||||
lda (SP),y ! pop X from the stack
|
||||
tax
|
||||
iny
|
||||
lda (SP),y ! pop A from the stack
|
||||
iny
|
||||
bne 1f ! lowbyte of stackpointer <> 0
|
||||
inc SP+1 ! increment highbyte of stackpointer
|
||||
1: sty SP+2 ! store lowbyte of stackpointer
|
||||
pha ! save A
|
||||
pla ! get A
|
||||
ldy Ytmp ! restore Y
|
||||
rts
|
||||
|
||||
|
||||
.sect .data
|
||||
PROGNAME: ! for initialising the programname pointer
|
||||
.asciz "program"
|
||||
.sect .bss
|
||||
beginbss:
|
||||
@@ -1,40 +0,0 @@
|
||||
.define Mon
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
|
||||
! This subroutine performs some monitor calls.
|
||||
! The exit call just resets the hardware_stackpointer so
|
||||
! this routine will return to the operating system.
|
||||
! The close call just returns a zero.
|
||||
! The ioctl call just pops its arguments and returns a zero.
|
||||
! The write routine is a real one.
|
||||
|
||||
|
||||
Mon:
|
||||
cpx #1
|
||||
bne 1f ! exit
|
||||
ldx STACK ! load stackpointer
|
||||
dex
|
||||
dex ! adjust stackpointer
|
||||
txs ! set stackpointer
|
||||
rts
|
||||
1: cpx #4
|
||||
bne 1f
|
||||
jmp Mwrite
|
||||
1: cpx #6 ! facked
|
||||
bne 1f ! close
|
||||
lda #0
|
||||
tax ! return zero
|
||||
rts
|
||||
1: cpx #54
|
||||
jsr Pop ! pop first argument (fildes)
|
||||
jsr Pop ! pop second argument (request)
|
||||
jsr Pop ! pop third argument (argp)
|
||||
lda #0
|
||||
tax ! return zero
|
||||
rts
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
.define Mprint
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
|
||||
! This subroutine prints a zero terminated ascii string.
|
||||
! The registerpair AX contains the start of the string.
|
||||
! The subroutine WRCH is a special routine on the BBC microcomputer
|
||||
! which prints the character in A to the screen.
|
||||
! The subroutine WRCH is a special one provided by the BBC
|
||||
! microcomputer.
|
||||
|
||||
|
||||
Mprint:
|
||||
stx ADDR ! start address of string (lowbyte)
|
||||
sta ADDR+1 ! start address of string (highbyte)
|
||||
ldy #0
|
||||
1: lda (ADDR),y ! get ascii character
|
||||
beq 2f
|
||||
jsr WRCH ! put it on the screen
|
||||
iny
|
||||
bne 1b
|
||||
2: rts
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
.define Printhex
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
|
||||
! This subroutine print the contents of register A to the screen
|
||||
! in hexadecimal form.
|
||||
! The subroutine WRCH is a special one provided by the BBC
|
||||
! microcomputer.
|
||||
|
||||
|
||||
Printhex:
|
||||
pha ! save A
|
||||
lsr a
|
||||
lsr a
|
||||
lsr a
|
||||
lsr a ! get four high bits
|
||||
jsr 1f
|
||||
pla ! restore A
|
||||
and #0x0F ! get four low bits
|
||||
jsr 1f
|
||||
rts
|
||||
1: sed ! print in hex
|
||||
clc
|
||||
adc #0x90
|
||||
adc #0x40
|
||||
cld
|
||||
jmp WRCH
|
||||
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
.define Printstack
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
|
||||
! This a special subroutine which prints some things to the
|
||||
! monitorscreen for debugging.
|
||||
|
||||
|
||||
Printstack:
|
||||
ldy #0
|
||||
2: lda (hol0+4),y
|
||||
beq 1f
|
||||
jsr WRCH ! print filename
|
||||
iny
|
||||
jmp 2b
|
||||
1: lda #32
|
||||
jsr WRCH ! print a space
|
||||
lda hol0+1
|
||||
jsr Printhex ! print line number (highbyte)
|
||||
lda hol0
|
||||
jsr Printhex ! print line number (lowbyte)
|
||||
lda #32
|
||||
jsr WRCH ! print a space
|
||||
lda SP+1
|
||||
jsr Printhex ! print stackpointer (highbyte)
|
||||
lda SP+2
|
||||
jsr Printhex ! print stackpointer (lowbyte)
|
||||
lda #32
|
||||
jsr WRCH ! print a space
|
||||
lda LB+1
|
||||
jsr Printhex ! print real localbase (highbyte)
|
||||
lda LB
|
||||
jsr Printhex ! print real localbase (lowbyte)
|
||||
lda #32
|
||||
jsr WRCH ! print a space
|
||||
lda LBl+1
|
||||
jsr Printhex ! print second lowerbase (highbyte)
|
||||
lda LBl
|
||||
jsr Printhex ! print second lowerbase (lowbyte)
|
||||
lda #10
|
||||
jsr WRCH ! print a newline
|
||||
lda #13
|
||||
jsr WRCH ! print a carriagereturn
|
||||
rts
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
.define Mread
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
|
||||
! This subroutine reads characters from the standard input.
|
||||
! It ignores the filedes.
|
||||
! It reads atmost 255 characters. So the runtime system must
|
||||
! provide a way of dealing with this.
|
||||
! The subroutine RDCH is a special one provided by the BBC
|
||||
! microcomputer.
|
||||
|
||||
|
||||
Mread:
|
||||
jsr Pop ! ignore filedescriptor
|
||||
jsr Pop ! bufptr
|
||||
stx ADDR ! address of character buffer (lowbyte)
|
||||
sta ADDR+1 ! address of character buffer (highbyte)
|
||||
jsr Pop ! number of characters
|
||||
ldy #0 ! <= 255
|
||||
inx
|
||||
1: jsr RDCH ! read a character from the current inputstream
|
||||
bcs 8f
|
||||
sta (ADDR),y
|
||||
iny
|
||||
dex
|
||||
bne 1b
|
||||
8: tya
|
||||
tax
|
||||
lda #0
|
||||
jsr Push ! number of characters red.
|
||||
tax ! report a succesfull read.
|
||||
rts
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
.define Mwrite
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
|
||||
! This subroutine performs the monitor call write.
|
||||
! Writing is always done to standardoutput.
|
||||
! A zero is returned on exit.
|
||||
! The subroutine WRCH is a special routine of the BBC
|
||||
! microcomputer.
|
||||
|
||||
|
||||
Mwrite:
|
||||
jsr Pop ! get fildes
|
||||
jsr Pop ! get address of characterbuffer
|
||||
stx ADDR ! bufferaddress (lowbyte)
|
||||
sta ADDR+1 ! bufferaddress (highbyte)
|
||||
jsr Pop ! number of characters to be writen.
|
||||
ldy #0
|
||||
1: lda (ADDR),y
|
||||
cmp #10
|
||||
bne 2f
|
||||
pha
|
||||
lda #13
|
||||
jsr WRCH
|
||||
pla
|
||||
2: jsr WRCH
|
||||
iny
|
||||
dex
|
||||
bne 1b
|
||||
tya
|
||||
tax
|
||||
lda #0
|
||||
jsr Push
|
||||
tax
|
||||
rts
|
||||
|
||||
Reference in New Issue
Block a user