From 7d456bf02572fa87fd0efdca42e6f87d1756c09f Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sun, 16 Aug 2015 20:53:43 -0400 Subject: [PATCH] move case on to the makefile --- Makefile | 2 +- data.aii | 2 +- get_dir_entry.aii | 2 +- get_file_info.aii | 33 ++++++++++++++++++++++----------- gsos.equ | 3 --- main.aii | 2 +- params.aii | 3 ++- stubs.aii | 2 +- tables.aii | 3 +-- 9 files changed, 30 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index ceba2cd..e39d84e 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ OBJECTS=$(SOURCES:.aii=.o) LD=mpw linkIIgs ASM=mpw asmIIgs #ASMFLAGS=-d DEBUG_S16 -d DebugSymbols -ASMFLAGS=-d DebugSymbols +ASMFLAGS=-case on -d DebugSymbols LDFLAGS= minix.fst : Makefile $(OBJECTS) diff --git a/data.aii b/data.aii index 6b05f5b..9a15cca 100644 --- a/data.aii +++ b/data.aii @@ -1,5 +1,5 @@ - case on + string asis include 'records.equ' diff --git a/get_dir_entry.aii b/get_dir_entry.aii index 2ae2339..daa422e 100644 --- a/get_dir_entry.aii +++ b/get_dir_entry.aii @@ -4,7 +4,7 @@ ; a directory. ; - case on + string asis include 'gsos.equ' include 'minix.equ' diff --git a/get_file_info.aii b/get_file_info.aii index 88ce5e9..90f9357 100644 --- a/get_file_info.aii +++ b/get_file_info.aii @@ -1,5 +1,5 @@ - case on + string asis include 'gsos.equ' include 'minix.equ' @@ -15,11 +15,19 @@ entry path_to_inode entry load_inode + entry find_file import id_disk import device_read +data record + +path_offset ds.w 1 +more ds.w 1 + + endr + get_file_info procname export with fst_parms @@ -239,6 +247,7 @@ no_path bps lda #bad_path_syntax sec +exit rts check_path @@ -249,7 +258,8 @@ check_path ; but is it relative? - lda [path] + ldy #2 + lda [path],y and #$00ff cmp #':' beq absolute @@ -258,13 +268,14 @@ check_path sta inode lda dev_num - bne bps + beq bps + sta device jsr id_disk + bcs exit + lda #2 + sta data.path_offset ; skip past gs-os length word + brl find_file ; will rts. ; - ; now find the actual file... - ; - ; - rts absolute ; @@ -284,6 +295,8 @@ absolute find_file proc with dp + with data + import find_entry_by_name path equ fst_parms.path1_ptr @@ -293,7 +306,6 @@ span equ fst_parms.span1 import target:GSString32 stz more - stz path_offset ; we always need to load inode 1 lda #1 @@ -310,7 +322,7 @@ dir_loop ; get a path component. ldx #0 - ldy #path_offset + ldy path_offset path_loop lda [path],y @@ -382,8 +394,7 @@ done rts -path_offset ds.w 1 -more ds.w 1 + endp diff --git a/gsos.equ b/gsos.equ index 173eb6a..f08e4c7 100644 --- a/gsos.equ +++ b/gsos.equ @@ -1,8 +1,5 @@ - string asis - case on - MACRO DEFAULT &var,&value IF &FINDSYM(&SYSGLOBAL,&var)=0 THEN diff --git a/main.aii b/main.aii index 1e01109..918a01c 100644 --- a/main.aii +++ b/main.aii @@ -1,5 +1,5 @@ - case on + string asis include 'gsos.equ' include 'minix.equ' diff --git a/params.aii b/params.aii index 2f06180..5d38e85 100644 --- a/params.aii +++ b/params.aii @@ -1,4 +1,5 @@ - case on + + string asis include 'gsos.equ' include 'minix.equ' diff --git a/stubs.aii b/stubs.aii index e4c566e..98c87a3 100644 --- a/stubs.aii +++ b/stubs.aii @@ -1,5 +1,5 @@ - case on + string asis include 'gsos.equ' stubs proc diff --git a/tables.aii b/tables.aii index 7c4c4b6..e62a01e 100644 --- a/tables.aii +++ b/tables.aii @@ -1,6 +1,5 @@ - case on - string asis + string asis tables record