Bugfix int range in sasm, create Makefile, portability fixes
This commit is contained in:
parent
8c84a4b877
commit
a49bce948c
5 changed files with 58 additions and 3 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,5 +1,6 @@
|
|||
pcomp/*.s
|
||||
progs/*.s
|
||||
lib/stdlib.s
|
||||
tests/*.s
|
||||
examples/*.s
|
||||
!runtime.s
|
||||
|
|
@ -22,6 +23,11 @@ sine.pas
|
|||
graph1.pas
|
||||
graph2.pas
|
||||
chase.pas
|
||||
pcomp/libgen
|
||||
pcomp/lsymgen
|
||||
pcomp/pcomp
|
||||
pcomp/sasm
|
||||
pcomp/sdis
|
||||
**/tridoracpu.cache/
|
||||
**/tridoracpu.hw/
|
||||
**/tridoracpu.ip_user_files/
|
||||
|
|
|
|||
|
|
@ -276,4 +276,4 @@ SHELL_ERR:
|
|||
FOUND_MSG:
|
||||
.BYTE " shell.prog ",0
|
||||
|
||||
%include corelib.s
|
||||
%include "corelib.s"
|
||||
|
|
|
|||
46
pcomp/Makefile
Normal file
46
pcomp/Makefile
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
PCOMP=./pcomp
|
||||
SASM=./sasm
|
||||
LSYMGEN=./lsymgen
|
||||
LIBGEN=./libgen
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .pas .o
|
||||
|
||||
.pas:
|
||||
fpc -Mobjfpc -gl $<
|
||||
|
||||
all: pcomp sasm sdis libgen lsymgen
|
||||
|
||||
libs: pcomp sasm
|
||||
$(SASM) ../lib/coreloader.s
|
||||
$(LSYMGEN) ../lib/coreloader.sym
|
||||
$(PCOMP) -n ../lib/stdlib.pas
|
||||
$(LIBGEN) ../lib/stdlib.s
|
||||
$(LIBGEN) ../lib/runtime.s
|
||||
$(LIBGEN) ../lib/float32.s
|
||||
|
||||
nativecomp: pcomp sasm libs
|
||||
$(PCOMP) sasm.pas
|
||||
$(PCOMP) pcomp.pas
|
||||
$(PCOMP) lsymgen.pas
|
||||
$(PCOMP) libgen.pas
|
||||
|
||||
nativeprogs: nativecomp
|
||||
$(PCOMP) ../progs/shell.pas
|
||||
$(PCOMP) ../progs/editor.pas
|
||||
$(PCOMP) ../progs/reclaim.pas
|
||||
$(PCOMP) ../progs/dumpdir.pas
|
||||
$(PCOMP) ../progs/partmgr.pas
|
||||
$(PCOMP) ../progs/xfer.pas
|
||||
|
||||
examples: nativecomp
|
||||
$(PCOMP) ../tests/readtest.pas
|
||||
$(PCOMP) ../tests/readchartest.pas
|
||||
$(PCOMP) ../tests/timetest.pas
|
||||
$(PCOMP) ../tests/test133.pas
|
||||
-$(PCOMP) ../examples/chase.pas
|
||||
$(PCOMP) ../tests/cchangetest.pas
|
||||
$(PCOMP) ../tests/tree.pas
|
||||
|
||||
clean:
|
||||
rm -f pcomp sasm sdis libgen lsymgen *.o *.s
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
procedure initPlatform;
|
||||
begin
|
||||
outputPrefix := '';
|
||||
includePrefix := '..\lib\';
|
||||
includePrefix := '../lib/';
|
||||
end;
|
||||
|
||||
procedure newString(var s:StringRef;len:integer);
|
||||
|
|
|
|||
|
|
@ -1185,7 +1185,10 @@ begin
|
|||
intValue := getSymbolValue(value)
|
||||
else
|
||||
intValue := convertNumber(value);
|
||||
emitWord(intValue + current^.offset);
|
||||
|
||||
if intValue <> Unresolved then
|
||||
intValue := intValue + current^.offset;
|
||||
emitWord(intValue);
|
||||
|
||||
current := current^.prev;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue