Skip to content

Commit

Permalink
add module version 14 supoprt to showmodule & FindModule
Browse files Browse the repository at this point in the history
fix legacy compile mode so it doesnt include changes in module version 14
  • Loading branch information
dmcoles committed Jul 8, 2024
1 parent d70316b commit 5d4e4f6
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 10 deletions.
9 changes: 6 additions & 3 deletions E-VO.S
Original file line number Diff line number Diff line change
Expand Up @@ -10092,8 +10092,8 @@ SRCFN: DC.L 0
EROBJLINE: DC.B 'WITH: %s',10,0
DC.B '$VER:'
TITLE: DC.B 'E-VO',160,'E',160,'Compiler'
DC.B '/Assembler/Linker/PP',160,'v3.8.0',160
DC.B '(28.06.2024)'
DC.B '/Assembler/Linker/PP',160,'v3.8.1-dev',160
DC.B '(08.07.2024)'
DC.B 10,'developing as "EC"',160
DC.B '''1991-97',160,'by Wouter van Oortmerssen',10
DC.B 'developing as "GEC"',160
Expand Down Expand Up @@ -11658,8 +11658,11 @@ SYMEND:
MOVE.L A5,A1 ; A1=BACKUP A5
MOVE.L D0,A0 ; A0=GLOBINFO
ADDQ.L #1,D1
BTST #5,ICODEPREFS+3 ;LEGACY MODE
BNE.S .LEG
MOVE.W 10(A4),(A5)+ ;save regoffs
BTST #2,5(A4)
.LEG
BTST #2,5(A4)
BEQ.S .NNAME
MOVE.L (A0),A3 ; ASCIIPTR
MOVE.L A5,A2
Expand Down
7 changes: 4 additions & 3 deletions Technical_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -783,15 +783,16 @@ OBJECT emodule
ENDOBJECT

8 OBJECT globals
oldoffs (vers>=14) original regoffs value (-1 also signals end)
len:INT any #until len=-1 (*)
oldoffs:INT (vers>=14) original regoffs value (-1 also signals end) (***)
len:INT any #until len=-1 (*) (****)
ascii[len]:ARRAY if len>0
codeoff[]:ARRAY OF off (vers>=10)?(LONG,opersize:INT):LONG
NIL:LONG
ENDOBJECT

(*) also 0 for private globals
also $8000: next LONG is skipsize. real len follows (off=6)
(***) version>=14 also $8000: next LONG is skipsize. real len follows (off=6)
(****) version<14 also $8000: next LONG is skipsize. real len follows (off=6)

9 OBJECT modinfo
skiplen:LONG
Expand Down
17 changes: 15 additions & 2 deletions tools/FindModule/FindModule.e
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ ENUM ABORT=0,ERR_OPEN,ERR_NOMEM,ERR_TOONEW,ERR_JOBID,ERR_TEMP
ENUM JOB_DONE,JOB_CONST,JOB_OBJ,JOB_CODE,JOB_PROCS,
JOB_SYS,JOB_LIB,JOB_RELOC,JOB_GLOBS,JOB_MODINFO,JOB_DEBUG,JOB_MACROS

CONST MODVERS=13, -> upto which version we understand , MODVER = 11 for Creative, MODVER=12 for Evo 3.5.0
CONST MODVERS=14, -> upto which version we understand
-> MODVER = 11 for Creative, MODVER=12 for Evo 3.5.0
-> MODVER=13 FOR Evo 3.6.0
-> MODVER=14 FOR Evo 3.8.0
SKIPMARK=$FFFF8000

DEF caseSensitive=TRUE
Expand Down Expand Up @@ -396,7 +399,12 @@ PROC search(mem,flen,filename:PTR TO CHAR) HANDLE
CASE JOB_GLOBS
c:=0;
IF o[]=SKIPMARK THEN o:=o+6
WHILE (len:=o[]++)>=0
IF thisvers>=14
val:=o[]++
ELSE
val:=0
ENDIF
WHILE (val<>-1) ANDALSO ((len:=o[]++)>=0)
IF aborted THEN Raise(ABORT)
IF len
match:=searchCompare(o)
Expand All @@ -406,6 +414,11 @@ PROC search(mem,flen,filename:PTR TO CHAR) HANDLE
c++
ENDIF
WHILE ^o++ DO IF thisvers>=10 THEN o++
IF thisvers>=14
val:=o[]++
ELSE
val:=0
ENDIF
ENDWHILE
CASE JOB_MODINFO
o:=o+4
Expand Down
17 changes: 15 additions & 2 deletions tools/ShowModule/ShowModule.e
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ ENUM JOB_DONE,JOB_CONST,JOB_OBJ,JOB_CODE,JOB_PROCS,
ENUM ER_NONE,ER_FILE,ER_MEM,ER_USAGE,ER_JOBID,
ER_BREAK,ER_FILETYPE,ER_TOONEW

CONST MODVERS=13, -> upto which version we understand , MODVER = 11 for Creative, MODVER=12 for Evo 3.5.0
CONST MODVERS=14, -> upto which version we understand
-> MODVER = 11 for Creative, MODVER=12 for Evo 3.5.0
-> MODVER=13 FOR Evo 3.6.0
-> MODVER=14 FOR Evo 3.8.0
SKIPMARK=$FFFF8000

DEF flen,o:PTR TO INT,mem,handle=NIL,file[250]:STRING,thisvers=0,cmode=FALSE,emode=FALSE
Expand Down Expand Up @@ -358,7 +361,12 @@ PROC process()
CASE JOB_GLOBS
c:=0; f:=TRUE
IF o[]=SKIPMARK THEN o:=o+6
WHILE (len:=o[]++)>=0
IF thisvers>=14
val:=o[]++
ELSE
val:=0
ENDIF
WHILE (val<>-1) ANDALSO ((len:=o[]++)>=0)
IF len
IF f
PutS('DEF ')
Expand All @@ -372,6 +380,11 @@ PROC process()
c++
ENDIF
WHILE ^o++ DO IF thisvers>=10 THEN o++
IF thisvers>=14
val:=o[]++
ELSE
val:=0
ENDIF
ENDWHILE
IF f=FALSE THEN PutS('\n')
IF c THEN PutF('/* \d private global variable(s) in this module */\n',c)
Expand Down

0 comments on commit 5d4e4f6

Please sign in to comment.