From 345609b5ac1d4453154cc65a97f1c1d4e5ac7635 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 2 Feb 1987 12:44:39 +0000 Subject: [PATCH] version for new assembler --- mach/z80/libmon/Makefile | 47 +++++++--- mach/z80/libmon/char.her.s | 5 + mach/z80/libmon/char.nas.s | 17 ++-- mach/z80/libmon/head_em.s | 44 +++++---- mach/z80/libmon/mon.cpm.s | 171 ++++++++++++++++++----------------- mach/z80/libmon/mon.s | 5 + mach/z80/libmon/putchr.nas.s | 15 ++- mach/z80/libmon/putchr.s | 5 + mach/z80/libmon/subr.s | 21 +++-- mach/z80/libsys/Makefile | 47 +++++++--- mach/z80/libsys/char.her.s | 5 + mach/z80/libsys/char.nas.s | 17 ++-- mach/z80/libsys/head_em.s | 44 +++++---- mach/z80/libsys/mon.cpm.s | 171 ++++++++++++++++++----------------- mach/z80/libsys/mon.s | 5 + mach/z80/libsys/putchr.nas.s | 15 ++- mach/z80/libsys/putchr.s | 5 + mach/z80/libsys/subr.s | 21 +++-- 18 files changed, 388 insertions(+), 272 deletions(-) diff --git a/mach/z80/libmon/Makefile b/mach/z80/libmon/Makefile index fbd24f1f4..97fc67705 100644 --- a/mach/z80/libmon/Makefile +++ b/mach/z80/libmon/Makefile @@ -1,25 +1,44 @@ -TAIL=tail.hermac +TAIL=libhermac_o.a # Other possibilities are: tail.nascom and tail.cpm +MACH=z80 -all: tail.cpm tail.nascom tail.hermac +all: head_em.o libhermac_o.a libnascom_o.a libcpm_o.a -install: $(TAIL) - ../../install head_em.s head_em - ../../install $(TAIL) tail_sys +install: head_em.o $(TAIL) + ../../install head_em.o head_em + ../../install $(TAIL) tail_mon -cmp: $(TAIL) - -../../compare head_em.s head_em - -../../compare $(TAIL) tail_sys +cmp: head_em.o $(TAIL) + -../../compare head_em.o head_em + -../../compare $(TAIL) tail_mon -tail.cpm: mon.cpm.s +head_em.o: head_em.s + $(MACH) -I../../../h -c head_em.s + +libcpm_o.a: libcpm_s.a + ASAR=aal ; export ASAR; march . libcpm_o.a + +libnascom_o.a: libnascom_s.a + ASAR=aal ; export ASAR; march . libnascom_o.a + +libhermac_o.a: libhermac_s.a + ASAR=aal ; export ASAR; march . libhermac_o.a + +libcpm_s.a: @echo Warning: untested, this is an example - arch cr tail.cpm mon.cpm.s + arch cr libcpm_s.a mon.cpm.s + echo libcpm_s.a > LIST + arch t libcpm_s.a >> LIST -tail.nascom: mon.s char.nas.s - arch cr tail.nascom mon.s char.nas.s +libnascom_s.a: + arch cr libnascom_s.a mon.s char.nas.s + echo libnascom_s.a > LIST + arch t libnascom_s.a >> LIST -tail.hermac: mon.s char.her.s - arch cr tail.hermac mon.s char.her.s +libhermac_s.a: + arch cr libhermac_s.a mon.s char.her.s + echo libhermac_s.a > LIST + arch t libhermac_s.a >> LIST opr: make pr | opr diff --git a/mach/z80/libmon/char.her.s b/mach/z80/libmon/char.her.s index 8ee338af2..a6367e91f 100644 --- a/mach/z80/libmon/char.her.s +++ b/mach/z80/libmon/char.her.s @@ -1,4 +1,9 @@ .define getchar, putchar +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text ! These getchar and putchar routines can be used for HERMAC computer diff --git a/mach/z80/libmon/char.nas.s b/mach/z80/libmon/char.nas.s index 2966cdf15..ce11523f3 100644 --- a/mach/z80/libmon/char.nas.s +++ b/mach/z80/libmon/char.nas.s @@ -1,9 +1,14 @@ .define putchar,getchar +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text ! output routine in monitor for the nascom CRT = 0x013B ! output a charcter ! entry: ascii character in a -.text +.sect .text putchar: push hl push bc @@ -22,11 +27,11 @@ fetch: inc hl ld a,(hl) jr 2b ! conversion table for nascom characters -tab: .byte 0x0D,0x00 - .byte 0x1B,0x1E - .byte 0x08,0x1D - .byte 0x0A,0x1F - .byte 0x7F,0x00 +tab: .data1 0x0D,0x00 + .data1 0x1B,0x1E + .data1 0x08,0x1D + .data1 0x0A,0x1F + .data1 0x7F,0x00 KBD = 0x69 get character from keyboard diff --git a/mach/z80/libmon/head_em.s b/mach/z80/libmon/head_em.s index 1f91d0e35..773d637da 100644 --- a/mach/z80/libmon/head_em.s +++ b/mach/z80/libmon/head_em.s @@ -1,6 +1,11 @@ .define EARRAY,ERANGE,EILLINS,EILLSIZE,ECASE,EMON,EHEAP .define hol0,trapproc,trpim,argv,hp,.reghp,envp,begbss,ignmask .define savebc,savede,savehl,saveix,saveaf,saveiy,ebadmon +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text EARRAY = 0 ERANGE = 1 EHEAP = 17 @@ -11,10 +16,9 @@ ebadmon=25 - .base 0x1000 -.text +.sect .text - ! clear .bss + ! clear .sect .bss ld sp,0x7ffe !address of fbase ld de,endbss ld h,d @@ -44,37 +48,37 @@ jp 0x20 -.bss +.sect .bss begbss: -.data +.sect .data hol0: - .word 0,0 - .word 0,0 + .data2 0,0 + .data2 0,0 saveaf: - .word 0 + .data2 0 savebc: - .word 0 + .data2 0 savede: - .word 0 + .data2 0 savehl: - .word 0 + .data2 0 saveix: - .word 0 + .data2 0 saveiy: - .word 0 + .data2 0 ignmask: - .word 0 + .data2 0 hp: - .word 0 + .data2 0 trapproc: - .word 0 + .data2 0 trpim: - .word 0 + .data2 0 argv: - .word 3f + .data2 3f envp: - .word 0 + .data2 0 3: .asciz 'PROGRAM' .reghp: - .word endbss + .data2 endbss diff --git a/mach/z80/libmon/mon.cpm.s b/mach/z80/libmon/mon.cpm.s index 79fd46703..c82ce9852 100644 --- a/mach/z80/libmon/mon.cpm.s +++ b/mach/z80/libmon/mon.cpm.s @@ -1,5 +1,10 @@ .define .mon .define uxfinish +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text ! monitor instruction ! a small collection of UNIX system calls implemented under CP/M @@ -98,21 +103,21 @@ zcount=41 zsave=42 - .errnz filefcb + .assert [ filefcb] <> 0 0: .space maxfiles*filesize filearea = 0b+128 sibuf: - .word 0 + .data2 0 .space 82 siptr: .space 2 saveargs: .space 128 argc: .space 2 -ttymode:.byte 9,9,8,21;.short 06310+RAW*040 ! raw = 040 +ttymode:.data1 9,9,8,21;.data2 06310+RAW*040 ! raw = 040 return: - .word 0,0 + .data2 0,0 uxinit: xor a ld c,maxfiles @@ -155,70 +160,70 @@ uxfinish: jp (hl) systab: - .word e.mon ! ux_indir - .word ux_exit - .word e.mon ! ux_fork - .word ux_read - .word ux_write - .word ux_open - .word ux_close - .word e.mon ! ux_wait - .word ux_creat - .word e.mon ! ux_link - .word ux_unlink - .word e.mon ! ux_exec - .word e.mon ! ux_chdir - .word ux_time - .word e.mon ! ux_mknod - .word e.mon ! ux_chmod - .word e.mon ! ux_chown - .word e.mon ! ux_break - .word e.mon ! ux_stat - .word e.mon ! ux_seek - .word ux_getpid - .word e.mon ! ux_mount - .word e.mon ! ux_umount - .word e.mon ! ux_setuid - .word e.mon ! ux_getuid - .word e.mon ! ux_stime - .word e.mon ! ux_ptrace - .word e.mon ! ux_alarm - .word e.mon ! ux_fstat - .word e.mon ! ux_pause - .word e.mon ! ux_utime - .word e.mon ! ux_stty - .word e.mon ! ux_gtty - .word e.mon ! ux_access - .word e.mon ! ux_nice - .word ux_ftime - .word e.mon ! ux_sync - .word e.mon ! ux_kill - .word unimpld - .word unimpld - .word unimpld - .word e.mon ! ux_dup - .word e.mon ! ux_pipe - .word e.mon ! ux_times - .word e.mon ! ux_prof - .word e.mon ! ux_unused - .word e.mon ! ux_setgid - .word e.mon ! ux_getgid - .word e.mon ! ux_sig - .word unimpld - .word unimpld - .word unimpld - .word unimpld - .word unimpld - .word ux_ioctl - .word unimpld - .word unimpld - .word unimpld - .word unimpld - .word unimpld ! ux_exece - .word e.mon ! ux_umask - .word e.mon ! ux_chroot - .word unimpld - .word unimpld + .data2 e.mon ! ux_indir + .data2 ux_exit + .data2 e.mon ! ux_fork + .data2 ux_read + .data2 ux_write + .data2 ux_open + .data2 ux_close + .data2 e.mon ! ux_wait + .data2 ux_creat + .data2 e.mon ! ux_link + .data2 ux_unlink + .data2 e.mon ! ux_exec + .data2 e.mon ! ux_chdir + .data2 ux_time + .data2 e.mon ! ux_mknod + .data2 e.mon ! ux_chmod + .data2 e.mon ! ux_chown + .data2 e.mon ! ux_break + .data2 e.mon ! ux_stat + .data2 e.mon ! ux_seek + .data2 ux_getpid + .data2 e.mon ! ux_mount + .data2 e.mon ! ux_umount + .data2 e.mon ! ux_setuid + .data2 e.mon ! ux_getuid + .data2 e.mon ! ux_stime + .data2 e.mon ! ux_ptrace + .data2 e.mon ! ux_alarm + .data2 e.mon ! ux_fstat + .data2 e.mon ! ux_pause + .data2 e.mon ! ux_utime + .data2 e.mon ! ux_stty + .data2 e.mon ! ux_gtty + .data2 e.mon ! ux_access + .data2 e.mon ! ux_nice + .data2 ux_ftime + .data2 e.mon ! ux_sync + .data2 e.mon ! ux_kill + .data2 unimpld + .data2 unimpld + .data2 unimpld + .data2 e.mon ! ux_dup + .data2 e.mon ! ux_pipe + .data2 e.mon ! ux_times + .data2 e.mon ! ux_prof + .data2 e.mon ! ux_unused + .data2 e.mon ! ux_setgid + .data2 e.mon ! ux_getgid + .data2 e.mon ! ux_sig + .data2 unimpld + .data2 unimpld + .data2 unimpld + .data2 unimpld + .data2 unimpld + .data2 ux_ioctl + .data2 unimpld + .data2 unimpld + .data2 unimpld + .data2 unimpld + .data2 unimpld ! ux_exece + .data2 e.mon ! ux_umask + .data2 e.mon ! ux_chroot + .data2 unimpld + .data2 unimpld emptyfile: ! searches for a free filestructure @@ -902,23 +907,23 @@ ux_getpid: -retarea: .word 0 ! base of buffer for result values (max 8 bytes) - .word 0 - .word 0 - .word 0 +retarea: .data2 0 ! base of buffer for result values (max 8 bytes) + .data2 0 + .data2 0 + .data2 0 trapproc: - .word 0 + .data2 0 -nextp: .byte 0 +nextp: .data1 0 header: -ntext: .word 0 -ndata: .word 0 -nproc: .word 0 -entry: .word 0 -nline: .word 0 - -hp: .word 0 -pb: .word 0 -pd: .word 0 +ntext: .data2 0 +ndata: .data2 0 +nproc: .data2 0 +entry: .data2 0 +nline: .data2 0 + +hp: .data2 0 +pb: .data2 0 +pd: .data2 0 diff --git a/mach/z80/libmon/mon.s b/mach/z80/libmon/mon.s index 0e997f14f..d6fd207b7 100644 --- a/mach/z80/libmon/mon.s +++ b/mach/z80/libmon/mon.s @@ -1,4 +1,9 @@ .define .mon +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text ! Monitor call ! Expects on stack: monitor call number diff --git a/mach/z80/libmon/putchr.nas.s b/mach/z80/libmon/putchr.nas.s index e0dbdeb67..e66a68910 100644 --- a/mach/z80/libmon/putchr.nas.s +++ b/mach/z80/libmon/putchr.nas.s @@ -1,4 +1,9 @@ .define putchr +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text ! output routine in monitor CRT = 0x013B ! output a charcter @@ -21,8 +26,8 @@ fetch: inc hl ld a,(hl) jr 2b ! conversion table for nascom characters -tab: .byte 0x0D,0x00 - .byte 0x1B,0x1E - .byte 0x08,0x1D - .byte 0x0A,0x1F - .byte 0x7F,0x00 +tab: .data1 0x0D,0x00 + .data1 0x1B,0x1E + .data1 0x08,0x1D + .data1 0x0A,0x1F + .data1 0x7F,0x00 diff --git a/mach/z80/libmon/putchr.s b/mach/z80/libmon/putchr.s index db15bf216..898db469a 100644 --- a/mach/z80/libmon/putchr.s +++ b/mach/z80/libmon/putchr.s @@ -1,4 +1,9 @@ .define putchr +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text putchr: push hl diff --git a/mach/z80/libmon/subr.s b/mach/z80/libmon/subr.s index 253048892..d82ca4f94 100644 --- a/mach/z80/libmon/subr.s +++ b/mach/z80/libmon/subr.s @@ -1,4 +1,9 @@ .define _read,_write,_ioctl,_getpid,_open,_close,_exit,_errno +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text _read: ld (savebc),bc push af @@ -149,14 +154,14 @@ _close: ret _exit: jp 0x38 -.data +.sect .data _errno: - .word 0 + .data2 0 ! output routine in monitor CRT = 0x013B ! output a charcter ! entry: ascii character in a -.text +.sect .text !putchr: ! push hl ! push bc @@ -175,11 +180,11 @@ CRT = 0x013B ! ld a,(hl) ! jr 2b !! conversion table for nascom characters -!tab: .byte 0x0D,0x00 -! .byte 0x1B,0x1E -! .byte 0x08,0x1D -! .byte 0x0A,0x1F -! .byte 0x7F,0x00 +!tab: .data1 0x0D,0x00 +! .data1 0x1B,0x1E +! .data1 0x08,0x1D +! .data1 0x0A,0x1F +! .data1 0x7F,0x00 KBD = 0x69 ! get character from keyboard diff --git a/mach/z80/libsys/Makefile b/mach/z80/libsys/Makefile index fbd24f1f4..97fc67705 100644 --- a/mach/z80/libsys/Makefile +++ b/mach/z80/libsys/Makefile @@ -1,25 +1,44 @@ -TAIL=tail.hermac +TAIL=libhermac_o.a # Other possibilities are: tail.nascom and tail.cpm +MACH=z80 -all: tail.cpm tail.nascom tail.hermac +all: head_em.o libhermac_o.a libnascom_o.a libcpm_o.a -install: $(TAIL) - ../../install head_em.s head_em - ../../install $(TAIL) tail_sys +install: head_em.o $(TAIL) + ../../install head_em.o head_em + ../../install $(TAIL) tail_mon -cmp: $(TAIL) - -../../compare head_em.s head_em - -../../compare $(TAIL) tail_sys +cmp: head_em.o $(TAIL) + -../../compare head_em.o head_em + -../../compare $(TAIL) tail_mon -tail.cpm: mon.cpm.s +head_em.o: head_em.s + $(MACH) -I../../../h -c head_em.s + +libcpm_o.a: libcpm_s.a + ASAR=aal ; export ASAR; march . libcpm_o.a + +libnascom_o.a: libnascom_s.a + ASAR=aal ; export ASAR; march . libnascom_o.a + +libhermac_o.a: libhermac_s.a + ASAR=aal ; export ASAR; march . libhermac_o.a + +libcpm_s.a: @echo Warning: untested, this is an example - arch cr tail.cpm mon.cpm.s + arch cr libcpm_s.a mon.cpm.s + echo libcpm_s.a > LIST + arch t libcpm_s.a >> LIST -tail.nascom: mon.s char.nas.s - arch cr tail.nascom mon.s char.nas.s +libnascom_s.a: + arch cr libnascom_s.a mon.s char.nas.s + echo libnascom_s.a > LIST + arch t libnascom_s.a >> LIST -tail.hermac: mon.s char.her.s - arch cr tail.hermac mon.s char.her.s +libhermac_s.a: + arch cr libhermac_s.a mon.s char.her.s + echo libhermac_s.a > LIST + arch t libhermac_s.a >> LIST opr: make pr | opr diff --git a/mach/z80/libsys/char.her.s b/mach/z80/libsys/char.her.s index 8ee338af2..a6367e91f 100644 --- a/mach/z80/libsys/char.her.s +++ b/mach/z80/libsys/char.her.s @@ -1,4 +1,9 @@ .define getchar, putchar +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text ! These getchar and putchar routines can be used for HERMAC computer diff --git a/mach/z80/libsys/char.nas.s b/mach/z80/libsys/char.nas.s index 2966cdf15..ce11523f3 100644 --- a/mach/z80/libsys/char.nas.s +++ b/mach/z80/libsys/char.nas.s @@ -1,9 +1,14 @@ .define putchar,getchar +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text ! output routine in monitor for the nascom CRT = 0x013B ! output a charcter ! entry: ascii character in a -.text +.sect .text putchar: push hl push bc @@ -22,11 +27,11 @@ fetch: inc hl ld a,(hl) jr 2b ! conversion table for nascom characters -tab: .byte 0x0D,0x00 - .byte 0x1B,0x1E - .byte 0x08,0x1D - .byte 0x0A,0x1F - .byte 0x7F,0x00 +tab: .data1 0x0D,0x00 + .data1 0x1B,0x1E + .data1 0x08,0x1D + .data1 0x0A,0x1F + .data1 0x7F,0x00 KBD = 0x69 get character from keyboard diff --git a/mach/z80/libsys/head_em.s b/mach/z80/libsys/head_em.s index 1f91d0e35..773d637da 100644 --- a/mach/z80/libsys/head_em.s +++ b/mach/z80/libsys/head_em.s @@ -1,6 +1,11 @@ .define EARRAY,ERANGE,EILLINS,EILLSIZE,ECASE,EMON,EHEAP .define hol0,trapproc,trpim,argv,hp,.reghp,envp,begbss,ignmask .define savebc,savede,savehl,saveix,saveaf,saveiy,ebadmon +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text EARRAY = 0 ERANGE = 1 EHEAP = 17 @@ -11,10 +16,9 @@ ebadmon=25 - .base 0x1000 -.text +.sect .text - ! clear .bss + ! clear .sect .bss ld sp,0x7ffe !address of fbase ld de,endbss ld h,d @@ -44,37 +48,37 @@ jp 0x20 -.bss +.sect .bss begbss: -.data +.sect .data hol0: - .word 0,0 - .word 0,0 + .data2 0,0 + .data2 0,0 saveaf: - .word 0 + .data2 0 savebc: - .word 0 + .data2 0 savede: - .word 0 + .data2 0 savehl: - .word 0 + .data2 0 saveix: - .word 0 + .data2 0 saveiy: - .word 0 + .data2 0 ignmask: - .word 0 + .data2 0 hp: - .word 0 + .data2 0 trapproc: - .word 0 + .data2 0 trpim: - .word 0 + .data2 0 argv: - .word 3f + .data2 3f envp: - .word 0 + .data2 0 3: .asciz 'PROGRAM' .reghp: - .word endbss + .data2 endbss diff --git a/mach/z80/libsys/mon.cpm.s b/mach/z80/libsys/mon.cpm.s index 79fd46703..c82ce9852 100644 --- a/mach/z80/libsys/mon.cpm.s +++ b/mach/z80/libsys/mon.cpm.s @@ -1,5 +1,10 @@ .define .mon .define uxfinish +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text ! monitor instruction ! a small collection of UNIX system calls implemented under CP/M @@ -98,21 +103,21 @@ zcount=41 zsave=42 - .errnz filefcb + .assert [ filefcb] <> 0 0: .space maxfiles*filesize filearea = 0b+128 sibuf: - .word 0 + .data2 0 .space 82 siptr: .space 2 saveargs: .space 128 argc: .space 2 -ttymode:.byte 9,9,8,21;.short 06310+RAW*040 ! raw = 040 +ttymode:.data1 9,9,8,21;.data2 06310+RAW*040 ! raw = 040 return: - .word 0,0 + .data2 0,0 uxinit: xor a ld c,maxfiles @@ -155,70 +160,70 @@ uxfinish: jp (hl) systab: - .word e.mon ! ux_indir - .word ux_exit - .word e.mon ! ux_fork - .word ux_read - .word ux_write - .word ux_open - .word ux_close - .word e.mon ! ux_wait - .word ux_creat - .word e.mon ! ux_link - .word ux_unlink - .word e.mon ! ux_exec - .word e.mon ! ux_chdir - .word ux_time - .word e.mon ! ux_mknod - .word e.mon ! ux_chmod - .word e.mon ! ux_chown - .word e.mon ! ux_break - .word e.mon ! ux_stat - .word e.mon ! ux_seek - .word ux_getpid - .word e.mon ! ux_mount - .word e.mon ! ux_umount - .word e.mon ! ux_setuid - .word e.mon ! ux_getuid - .word e.mon ! ux_stime - .word e.mon ! ux_ptrace - .word e.mon ! ux_alarm - .word e.mon ! ux_fstat - .word e.mon ! ux_pause - .word e.mon ! ux_utime - .word e.mon ! ux_stty - .word e.mon ! ux_gtty - .word e.mon ! ux_access - .word e.mon ! ux_nice - .word ux_ftime - .word e.mon ! ux_sync - .word e.mon ! ux_kill - .word unimpld - .word unimpld - .word unimpld - .word e.mon ! ux_dup - .word e.mon ! ux_pipe - .word e.mon ! ux_times - .word e.mon ! ux_prof - .word e.mon ! ux_unused - .word e.mon ! ux_setgid - .word e.mon ! ux_getgid - .word e.mon ! ux_sig - .word unimpld - .word unimpld - .word unimpld - .word unimpld - .word unimpld - .word ux_ioctl - .word unimpld - .word unimpld - .word unimpld - .word unimpld - .word unimpld ! ux_exece - .word e.mon ! ux_umask - .word e.mon ! ux_chroot - .word unimpld - .word unimpld + .data2 e.mon ! ux_indir + .data2 ux_exit + .data2 e.mon ! ux_fork + .data2 ux_read + .data2 ux_write + .data2 ux_open + .data2 ux_close + .data2 e.mon ! ux_wait + .data2 ux_creat + .data2 e.mon ! ux_link + .data2 ux_unlink + .data2 e.mon ! ux_exec + .data2 e.mon ! ux_chdir + .data2 ux_time + .data2 e.mon ! ux_mknod + .data2 e.mon ! ux_chmod + .data2 e.mon ! ux_chown + .data2 e.mon ! ux_break + .data2 e.mon ! ux_stat + .data2 e.mon ! ux_seek + .data2 ux_getpid + .data2 e.mon ! ux_mount + .data2 e.mon ! ux_umount + .data2 e.mon ! ux_setuid + .data2 e.mon ! ux_getuid + .data2 e.mon ! ux_stime + .data2 e.mon ! ux_ptrace + .data2 e.mon ! ux_alarm + .data2 e.mon ! ux_fstat + .data2 e.mon ! ux_pause + .data2 e.mon ! ux_utime + .data2 e.mon ! ux_stty + .data2 e.mon ! ux_gtty + .data2 e.mon ! ux_access + .data2 e.mon ! ux_nice + .data2 ux_ftime + .data2 e.mon ! ux_sync + .data2 e.mon ! ux_kill + .data2 unimpld + .data2 unimpld + .data2 unimpld + .data2 e.mon ! ux_dup + .data2 e.mon ! ux_pipe + .data2 e.mon ! ux_times + .data2 e.mon ! ux_prof + .data2 e.mon ! ux_unused + .data2 e.mon ! ux_setgid + .data2 e.mon ! ux_getgid + .data2 e.mon ! ux_sig + .data2 unimpld + .data2 unimpld + .data2 unimpld + .data2 unimpld + .data2 unimpld + .data2 ux_ioctl + .data2 unimpld + .data2 unimpld + .data2 unimpld + .data2 unimpld + .data2 unimpld ! ux_exece + .data2 e.mon ! ux_umask + .data2 e.mon ! ux_chroot + .data2 unimpld + .data2 unimpld emptyfile: ! searches for a free filestructure @@ -902,23 +907,23 @@ ux_getpid: -retarea: .word 0 ! base of buffer for result values (max 8 bytes) - .word 0 - .word 0 - .word 0 +retarea: .data2 0 ! base of buffer for result values (max 8 bytes) + .data2 0 + .data2 0 + .data2 0 trapproc: - .word 0 + .data2 0 -nextp: .byte 0 +nextp: .data1 0 header: -ntext: .word 0 -ndata: .word 0 -nproc: .word 0 -entry: .word 0 -nline: .word 0 - -hp: .word 0 -pb: .word 0 -pd: .word 0 +ntext: .data2 0 +ndata: .data2 0 +nproc: .data2 0 +entry: .data2 0 +nline: .data2 0 + +hp: .data2 0 +pb: .data2 0 +pd: .data2 0 diff --git a/mach/z80/libsys/mon.s b/mach/z80/libsys/mon.s index 0e997f14f..d6fd207b7 100644 --- a/mach/z80/libsys/mon.s +++ b/mach/z80/libsys/mon.s @@ -1,4 +1,9 @@ .define .mon +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text ! Monitor call ! Expects on stack: monitor call number diff --git a/mach/z80/libsys/putchr.nas.s b/mach/z80/libsys/putchr.nas.s index e0dbdeb67..e66a68910 100644 --- a/mach/z80/libsys/putchr.nas.s +++ b/mach/z80/libsys/putchr.nas.s @@ -1,4 +1,9 @@ .define putchr +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text ! output routine in monitor CRT = 0x013B ! output a charcter @@ -21,8 +26,8 @@ fetch: inc hl ld a,(hl) jr 2b ! conversion table for nascom characters -tab: .byte 0x0D,0x00 - .byte 0x1B,0x1E - .byte 0x08,0x1D - .byte 0x0A,0x1F - .byte 0x7F,0x00 +tab: .data1 0x0D,0x00 + .data1 0x1B,0x1E + .data1 0x08,0x1D + .data1 0x0A,0x1F + .data1 0x7F,0x00 diff --git a/mach/z80/libsys/putchr.s b/mach/z80/libsys/putchr.s index db15bf216..898db469a 100644 --- a/mach/z80/libsys/putchr.s +++ b/mach/z80/libsys/putchr.s @@ -1,4 +1,9 @@ .define putchr +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text putchr: push hl diff --git a/mach/z80/libsys/subr.s b/mach/z80/libsys/subr.s index 253048892..d82ca4f94 100644 --- a/mach/z80/libsys/subr.s +++ b/mach/z80/libsys/subr.s @@ -1,4 +1,9 @@ .define _read,_write,_ioctl,_getpid,_open,_close,_exit,_errno +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text _read: ld (savebc),bc push af @@ -149,14 +154,14 @@ _close: ret _exit: jp 0x38 -.data +.sect .data _errno: - .word 0 + .data2 0 ! output routine in monitor CRT = 0x013B ! output a charcter ! entry: ascii character in a -.text +.sect .text !putchr: ! push hl ! push bc @@ -175,11 +180,11 @@ CRT = 0x013B ! ld a,(hl) ! jr 2b !! conversion table for nascom characters -!tab: .byte 0x0D,0x00 -! .byte 0x1B,0x1E -! .byte 0x08,0x1D -! .byte 0x0A,0x1F -! .byte 0x7F,0x00 +!tab: .data1 0x0D,0x00 +! .data1 0x1B,0x1E +! .data1 0x08,0x1D +! .data1 0x0A,0x1F +! .data1 0x7F,0x00 KBD = 0x69 ! get character from keyboard -- 2.34.1