# HG changeset patch # User Pascal Bellard # Date 1560525436 -7200 # Node ID f9e283da869ae744d13dc211657b8d68247b3dfb # Parent 41fed2f82bebd4561ce2c33fa7141c7572a98ae9 tazboot: spare 2k diff -r 41fed2f82beb -r f9e283da869a linld/stuff/src/CRTL.ASM --- a/linld/stuff/src/CRTL.ASM Fri Jun 14 16:14:44 2019 +0100 +++ b/linld/stuff/src/CRTL.ASM Fri Jun 14 17:17:16 2019 +0200 @@ -31,6 +31,27 @@ segment _BSS byte public use16 'BSS' + ifdef EXTRA +;typedef unsigned dirsizetype; +struc isostate ; struct isostate { +fd dw ? ; 0 int fd; +filemod dw ? ; 2 unsigned short filemod; +fileofs dd ? ; 4 unsigned long fileofs; +filesize dd ? ; 8 unsigned long filesize; +filename dw ? ;12 char *filename; +curdirsize dw ? ;14 dirsizetype curdirsize; +dirsize dw ? ;16 dirsizetype dirsize; +curdirofs dd ? ;18 unsigned long curdirofs; +dirofs dd ? ;22 unsigned long dirofs; +curpos dw ? ;26 unsigned curpos; +filename2open dw ? ;28 char *filename2open; +entrysize dw ? ;30 int entrysize; +tmp dw ? ;32 const char *tmp; +;buffer label ;34 char buffer[2048+512]; +ends ; } isostate; + public _isostate +_isostate isostate + endif _xfer_buf db 4096 dup (?) global _no_exit:byte _no_exit db ? @@ -321,24 +342,6 @@ endp @lseekcur$qii ifdef EXTRA - -;typedef unsigned dirsizetype; -struc isostate ; struct isostate { -fd dw ? ; 0 int fd; -filemod dw ? ; 2 unsigned short filemod; -fileofs dd ? ; 4 unsigned long fileofs; -filesize dd ? ; 8 unsigned long filesize; -filename dw ? ;12 char *filename; -curdirsize dw ? ;14 dirsizetype curdirsize; -dirsize dw ? ;16 dirsizetype dirsize; -curdirofs dd ? ;18 unsigned long curdirofs; -dirofs dd ? ;22 unsigned long dirofs; -curpos dw ? ;26 unsigned curpos; -filename2open dw ? ;28 char *filename2open; -entrysize dw ? ;30 int entrysize; -tmp dw ? ;32 const char *tmp; -buffer db 2560 dup(?) ;34 char buffer[2048+512]; -ends ; } isostate; ;*************************************************************** ;_fastcall long isolseek(bx:const unsigned long *offset); ;_fastcall long lseekset2(ax:int fd, bx:unsigned long* whence); @@ -347,7 +350,6 @@ proc @isolseek$qpxul near isolseek: - extrn _isostate:isostate mov ax,[_isostate.fd] global @lseekset2$qipul:near @lseekset2$qipul: @@ -367,7 +369,8 @@ call isolseek jc doret mov dx,2560 - mov bx,offset _isostate.buffer + ;mov bx,offset _isostate.buffer + mov bx,offset _xfer_buf mov ax,[_isostate.fd] jmp @read$dxbxax ; read(fd,buffer,2560) diff -r 41fed2f82beb -r f9e283da869a linld/stuff/src/ISO9660.CPP --- a/linld/stuff/src/ISO9660.CPP Fri Jun 14 16:14:44 2019 +0100 +++ b/linld/stuff/src/ISO9660.CPP Fri Jun 14 17:17:16 2019 +0200 @@ -3,8 +3,6 @@ #include "iso9660.h" #define __ROCKRIDGE -struct isostate isostate; - #if 1 #define setdirofs(to,sec) (*(int*)((char*)&(to)+1) = *(int*)&(sec)<<(SECTORBITS-8)) #define cpydirofs(to,from) (*(int*)((char*)&(to)+1) = *(int*)((char*)&(from)+1)) diff -r 41fed2f82beb -r f9e283da869a linld/stuff/src/pipehole.awk --- a/linld/stuff/src/pipehole.awk Fri Jun 14 16:14:44 2019 +0100 +++ b/linld/stuff/src/pipehole.awk Fri Jun 14 17:17:16 2019 +0200 @@ -16,10 +16,9 @@ } if (/x->curdirsize == 0xFFFF/) isiso=4 if (isiso == 4) { # ISO9660.LST - if (/DGROUP:_isostate\+14,-1/) { - sub(/DGROUP:_isostate\+14/,"[si+14]") - isiso=0 - } + sub(/DGROUP:_isostate\+14/,"[si+14]") + sub(/DGROUP:_isostate\+16/,"[si+16]") + if (/goto restarted/) isiso=0 } if (/c = \*s;/) isiso=3 if (isiso == 3) { # ISO9660.LST @@ -36,6 +35,7 @@ if (isiso == 2) { # ISO9660.LST if (/mov bx,cx/) next gsub(/cx/,"bx") + sub(/DGROUP:_isostate\+31/,"[si+31]") } if (/const char \*n = name/) isiso=1 if (isiso == 1) { # ISO9660.LST