Skip to content

Commit 8c90b90

Browse files
author
dosworld
committed
Fixed generation COM files
1 parent 34d99f9 commit 8c90b90

6 files changed

Lines changed: 8 additions & 7 deletions

File tree

BIN/BIN2RDF.EXE

464 Bytes
Binary file not shown.

BIN/RDFDUMP.EXE

464 Bytes
Binary file not shown.

BIN/RLIB.EXE

480 Bytes
Binary file not shown.

BIN/RLINK.EXE

528 Bytes
Binary file not shown.

SRC/RLINK.PAS

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ END;
134134

135135
FUNCTION GetRlibMetaInfo(VAR rlib : STRING; root : PRDFMETA; fname : STRING; VAR hdr : BFILE; VAR err : BOOLEAN):PRDFMETA;
136136
VAR i : BFILE;
137+
nname : STRING;
137138
BEGIN
138139
IF (fname[0] > #1) AND (fname[1] = '@') THEN BEGIN
139140
delete(fname, 1, 1);
@@ -147,11 +148,11 @@ BEGIN
147148
END;
148149
Close(i);
149150
END ELSE BEGIN
150-
fname := FindFileInRlib(rlib, fname);
151-
IF Length(fname) = 0 THEN BEGIN
151+
nname := FindFileInRlib(rlib, fname);
152+
IF Length(nname) = 0 THEN BEGIN
152153
System.Writeln('File ', fname, ' does not exists.');
153154
err := TRUE;
154-
END ELSE root := GetRdlMetaInfo(root, fname, hdr, err)
155+
END ELSE root := GetRdlMetaInfo(root, nname, hdr, err)
155156
END;
156157
GetRlibMetaInfo := root;
157158
END;
@@ -631,11 +632,11 @@ BEGIN
631632
END;
632633

633634
IF rrec.seg = r^.code_segnum THEN BEGIN
634-
SetMem(code, RWIDTH16
635+
IncMem(code, RWIDTH16
635636
, (r^.linker.hmz_code_seg SHL 4) + rrec.offset
636637
, fix);
637638
END ELSE IF rrec.seg = r^.data_segnum THEN BEGIN
638-
SetMem(code, RWIDTH16
639+
IncMem(code, RWIDTH16
639640
, (r^.linker.hmz_data_seg SHL 4) + rrec.offset
640641
, fix);
641642
END;

SRC/RLINKOUT.PAS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,8 @@ BEGIN
644644
err := err OR DisableRecs(hdr, RREC_IMPORT);
645645
err := err OR DisableRecs(hdr, RREC_FARIMPORT);
646646
err := err OR DisableRelocsWidth(hdr, RWIDTH16);
647-
648647
code_ofs := $100;
648+
code_size := FileSize(code);
649649
bss_ofs := code_ofs + code_size;
650650

651651
Seek(hdr, 0);
@@ -659,7 +659,7 @@ BEGIN
659659
END;
660660

661661
Seek(hdr, 0);
662-
WHILE RDF_LOOKUPREC(hdr, RREC_RELOC, c) AND (NOT err) DO BEGIN
662+
WHILE RDF_NLOOKUPREC(hdr, FileSize(hdr), RREC_RELOC, c) AND (NOT err) DO BEGIN
663663
GET_RELOC_REC(c, rec);
664664

665665
self := (rec.seg AND $40) <> 0;

0 commit comments

Comments
 (0)