Skip to content

Commit

Permalink
- build libs with dmc's lib
Browse files Browse the repository at this point in the history
- masm (v9 or v10) complained about a number of "mov AL,errorCode" which had to be changed to AX (I guess it would not assume an external to fit into a byte)
- I had to add a number of ridiculous "BYTE PTR" modifiers
- do not build loadx.exe
  • Loading branch information
rainers committed Feb 16, 2013
1 parent 92ff62f commit f4c2513
Show file tree
Hide file tree
Showing 65 changed files with 229 additions and 187 deletions.
2 changes: 1 addition & 1 deletion alloc/alloc.mak
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ALL : $(LIB)\ALLOC.LIB
$(LIB)\ALLOC.LIB : $(OBJ)\ALLOPOOL.OBJ $(OBJ)\allopoolc.obj $(OBJ)\ldatac.obj \
$(OBJ)\ALLOC.OBJ $(OBJ)\allocc.obj \
$(OBJ)\comprelec.obj $(OBJ)\minidatac.obj $(OBJ)\compalloc.obj
OPTLIB /OKMULTI $(LIB)\ALLOC ~+ $(OBJ)\*;
$(BUILD_LIB)


$(OBJ)\MINIDATA.OBJ : MINIDATA.ASM ..\COMMON\MACROS
Expand Down
3 changes: 3 additions & 0 deletions build_optlink.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd os2link
nmake -nologo -f optdll.mak HOST_WIN32=1 OPTLINK
cd ..
20 changes: 20 additions & 0 deletions clean.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@

del alloc\objnt\*.obj
del common\objnt\*.obj
del moves\objnt\*.obj
del ntio\objnt\*.obj
del parse\objnt\*.obj
del subs\objnt\*.obj
del os2link\objnt\*.obj os2link\objnt\*.map os2link\objnt\*.exe
del overlays\objnt\*.obj
del install\objnt\*.obj
del exe\objnt\*.obj
del cv\objnt\*.obj

del alloc\lstnt\*.lst
del common\lstnt\*.lst
del moves\lstnt\*.lst
del ntio\lstnt\*.lst
del parse\lstnt\*.lst
del subs\lstnt\*.lst
del os2link\lstnt\*.lst
del overlays\lstnt\*.lst
del install\lstnt\*.lst
del exe\lstnt\*.lst
del cv\lstnt\*.lst

del libnt\*.lib libnt\*.bak

2 changes: 1 addition & 1 deletion common/alias.asm
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ ALIAS_WARN PROC NEAR
;
;PREVIOUSLY DEFINED, IGNORED
;
MOV AL,ALIAS_IGNORED_ERR
MOV AX,ALIAS_IGNORED_ERR
LEA ECX,[ECX]._S_NAME_TEXT
CALL ERR_ASCIZ_RET
RET
Expand Down
44 changes: 22 additions & 22 deletions common/cmdsubs.asm
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ L6$:
JA L5$
INC EDI
CMP AL,' '
MOV AL,[EBX+EAX]
MOV AL,BYTE PTR[EBX+EAX]
JZ L6$
TEST EAX,MASK FNTBL_ILLEGAL
JZ L6$
Expand All @@ -415,7 +415,7 @@ L1$:
MOV [EDI],AL
JZ L6$ ;SPECIAL HANDLING
INC EDI
MOV AL,[EBX+EAX]
MOV AL,BYTE PTR[EBX+EAX]
CMP EDI,OFF INDNAM.NFN_TEXT+NFN_TEXT_SIZE
JA L5$
TEST EAX,MASK FNTBL_ILLEGAL
Expand Down Expand Up @@ -646,7 +646,7 @@ L49$:
MOV [EBX].MYI_BLOCK,EAX
MOV [EBX].MYI_PTRA,EDI
L5$:
MOV AL,[ESI]
MOV AL,BYTE PTR[ESI]
INC ESI

MOV [EDI],AL
Expand Down Expand Up @@ -695,7 +695,7 @@ SEE_NEXT PROC
;
MOV ESI,INPTR1

MOV AL,[ESI]
MOV AL,BYTE PTR[ESI]

RET

Expand All @@ -707,7 +707,7 @@ GET_NEXT PROC
;
;
MOV ESI,INPTR1
MOV AL,[ESI]
MOV AL,BYTE PTR[ESI]
INC ESI
MOV INPTR1,ESI
RET
Expand All @@ -726,7 +726,7 @@ L0$:
MOV AL,[ECX]
INC ECX
CMP ECX,OFF INBUF+INBUF_LEN+1
MOV AL,[EDX+EAX]
MOV AL,BYTE PTR[EDX+EAX]
JZ L2$ ;GET ANOTHER LINE
CMP AL,CH_SPC
JZ L0$
Expand Down Expand Up @@ -846,7 +846,7 @@ YY_FILENAME PROC
MOV EDX,OFF FNTBL
XOR ECX,ECX
L1$:
MOV AL,[ESI]
MOV AL,BYTE PTR[ESI]
INC ESI
L11$:
CMP AL,'^'
Expand All @@ -867,7 +867,7 @@ L13$:
CMP AL,' '
JZ L4$
L79$:
MOV AL,[EDX+EAX]
MOV AL,BYTE PTR[EDX+EAX]
CMP EDI,OFF FILNAM.NFN_TEXT+NFN_TEXT_SIZE
JAE L8$
TEST AL,MASK FNTBL_ILLEGAL
Expand Down Expand Up @@ -909,7 +909,7 @@ L59$:
JMP L1$

L7$:
MOV AL,[ESI] ;GOT A %, WHATS NEXT?
MOV AL,BYTE PTR[ESI] ;GOT A %, WHATS NEXT?
INC ESI

MOV [EDI],AL
Expand All @@ -918,7 +918,7 @@ L7$:
CMP AL,'@'
JNZ L77$

MOV AL,[ESI] ;GOT A %@
MOV AL,BYTE PTR[ESI] ;GOT A %@
INC ESI

MOV [EDI],AL
Expand All @@ -930,7 +930,7 @@ L7$:
CMP AL,'P'
JNZ L77$
L71$:
MOV AL,[ESI] ;GOT A %@P
MOV AL,BYTE PTR[ESI] ;GOT A %@P
INC ESI

MOV [EDI],AL
Expand Down Expand Up @@ -977,7 +977,7 @@ if fg_plink
CALL ERR_INBUF_ABORT
L91$:
endif
MOV AL,[ESI];CHECK LAST ILLEGAL CHARACTER, MAKE SURE IT ISN'T
MOV AL,BYTE PTR[ESI];CHECK LAST ILLEGAL CHARACTER, MAKE SURE IT ISN'T
; >, <, =, ), [, ], |,
;I.E., ONLY ALLOW 0DH, +, ", SPACE, /, ;
; WE ALREADY SKIPPED SPACES, TABS,+, ", /
Expand Down Expand Up @@ -1024,9 +1024,9 @@ else
MOV EDX,OFF PARSE_TABLE
endif
L0$:
MOV AL,[ESI]
MOV AL,BYTE PTR[ESI]
INC ESI
MOV AL,[EDX+EAX]
MOV AL,BYTE PTR[EDX+EAX]
CMP AL,CH_SEMI ;SEP, AT, OR SEMI
JB L31$
JE L3$
Expand All @@ -1042,11 +1042,11 @@ else
MOV EDX,OFF PARSE_TABLE
endif
L11$:
MOV AL,[ESI]
MOV AL,BYTE PTR[ESI]
INC ESI
CMP EDI,OFF SYMBOL_TEXT+SYMBOL_TEXT_SIZE-1
JAE TOKEN_TOO
MOV AL,[EDX+EAX]
MOV AL,BYTE PTR[EDX+EAX]
L12$:
MOV [EDI],AL
INC EDI
Expand Down Expand Up @@ -1095,17 +1095,17 @@ K_ESCAPE:
;
;ESCAPE, MAKE SURE NEXT ISN'T EOL
;
MOV AL,[ESI]
MOV AL,BYTE PTR[ESI]
if fg_td
MOV EDX,MY_PARSE_TABLE
else
MOV EDX,OFF PARSE_TABLE
endif
INC ESI
MOV AL,[EDX+EAX]
MOV AL,BYTE PTR[EDX+EAX]
CMP AL,' '
JNC K_ESCAPE_1
MOV AL,[ESI-1]
MOV AL,BYTE PTR[ESI-1]
K_ESCAPE_1:
MOV [EDI],AL
INC EDI
Expand Down Expand Up @@ -1140,7 +1140,7 @@ GET_SYMBOL PROC
MOV TOKSTR,ESI
XOR CL,CL
L1$:
MOV AL,[ESI]
MOV AL,BYTE PTR[ESI]
INC ESI
CMP AL,'^'
JZ L2$
Expand All @@ -1150,7 +1150,7 @@ L1$:
JZ L6$
MOV [EDI],AL
INC EDI
MOV AL,[EDX+EAX]
MOV AL,BYTE PTR[EDX+EAX]
CMP EDI,OFF SYMBOL_TEXT+SYMBOL_TEXT_SIZE
JAE L8$
TEST AL,MASK SYMTBL_ILLEGAL
Expand Down Expand Up @@ -1194,7 +1194,7 @@ L5$:
L6$:
MOV CL,AL
L61$:
MOV AL,[ESI]
MOV AL,BYTE PTR[ESI]
INC ESI
CMP AL,CL
JZ L1$
Expand Down
2 changes: 1 addition & 1 deletion common/coment.asm
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ YES_PHARLAP PROC
ADD ESI,4
CMP EAX,'8308'
JNZ L9$
MOV AL,[ESI]
MOV AL,BYTE PTR[ESI]
CMP AL,'6'
JNZ L9$
MOV DEFAULT_SIZE,MASK BIT_32
Expand Down
2 changes: 1 addition & 1 deletion common/common.mak
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $(LIB)\COMMON.LIB : $(OBJ)\THEADR.OBJ $(OBJ)\LNAMES.OBJ $(OBJ)\SEGDEF.OBJ $(OBJ)
$(OBJ)\newlibc.obj $(OBJ)\macrosc.obj $(OBJ)\fixupp2c.obj $(OBJ)\recordsc.obj \
$(OBJ)\mscmdlinc.obj
del $(LIB)\common.lib
OPTLIB /OKMULTI /PA:32 $(LIB)\COMMON ~+ $(OBJ)\*;
$(BUILD_LIB)

$(OBJ)\LNKINIT.OBJ : LNKINIT.ASM MACROS INITCODE SECTS IO_STRUC SEGMENTS SECTIONS CLASSES EXES MODULES WINMACS TDBG SEGMSYMS PE_STRUC \
RELEASE SYMBOLS WIN32DEF WINMACS
Expand Down
4 changes: 2 additions & 2 deletions common/fixupp.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2352,7 +2352,7 @@ PRELIM PROC NEAR
;
;HERE COMES PRELIM
;
MOV BL,[ESI]
MOV BL,BYTE PTR[ESI]
INC ESI

PUSH EBX
Expand Down Expand Up @@ -2436,7 +2436,7 @@ L4$:
RET

L5$:
MOV CL,[ESI]
MOV CL,BYTE PTR[ESI]
ADD ESI,ECX

INC ESI
Expand Down
4 changes: 2 additions & 2 deletions common/fixupp2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3178,7 +3178,7 @@ SPECIAL_RELOC_CHECK LABEL PROC
MOV EBX,ECX

MOV ECX,EAX
MOV AL,[EDI]
MOV AL,BYTE PTR[EDI]

SHR AL,CL

Expand Down Expand Up @@ -3206,7 +3206,7 @@ L55$:

REPE SCASB
L551$:
MOV AL,[EDI]
MOV AL,BYTE PTR[EDI]
JNZ L7$

OR AL,AL
Expand Down
2 changes: 1 addition & 1 deletion common/grpdef.asm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ PHASE: CALL OBJ_PHASE
RET

PHASE1:
MOV AL,GRP_ERR
MOV AX,GRP_ERR
CALL ERR_RET
RET

Expand Down
12 changes: 6 additions & 6 deletions common/lnkinit.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@ L51$:
;
TEST FLAG_0C,MASK APPTYPE ;IT IS DLL, IS IT A LIBRARY ?
JNZ L9$
MOV CL,DLL_NO_LIB_ERR ;NOPE, WARN THEM
MOV AX,DLL_NO_LIB_ERR ;NOPE, WARN THEM
CALL WARN_RET
JMP L9$
endif
Expand Down Expand Up @@ -1690,7 +1690,7 @@ L8$:
;
MOV EDX,'EXE'
CALL SET_EXT
MOV CL,SEGM_COM_SYS_ERR
MOV AX,SEGM_COM_SYS_ERR
CALL WARN_RET
JMP L9$
endif
Expand All @@ -1702,7 +1702,7 @@ L81$:
;
MOV EDX,'EXE'
CALL SET_EXT
MOV CL,OVL_COM_SYS_ERR
MOV AX,OVL_COM_SYS_ERR
CALL WARN_RET
JMP L9$
endif
Expand Down Expand Up @@ -2044,7 +2044,7 @@ INIT_THREAD PROC NEAR
RET

L9$:
MOV AL,THREAD_FAIL_ERR
MOV AX,THREAD_FAIL_ERR
push EAX
call _err_abort

Expand Down Expand Up @@ -2095,7 +2095,7 @@ ENVIRON_SCAN PROC
L1$:
XOR ECX,ECX
LEA ESI,[EDX+1]
MOV CL,[EDX] ;STRING LENGTH (INCLUDING =)
MOV CL,BYTE PTR[EDX] ;STRING LENGTH (INCLUDING =)
MOV EBX,EDI
if fgh_win32
PUSHM EBP,EDX
Expand All @@ -2116,7 +2116,7 @@ L11$:
INC ESI
INC EDI

MOV AL,[EBP+EAX]
MOV AL,BYTE PTR[EBP+EAX]
MOV BL,[EBP+EBX]

CMP AL,BL
Expand Down
8 changes: 4 additions & 4 deletions common/macros
Original file line number Diff line number Diff line change
Expand Up @@ -1198,12 +1198,12 @@ NEXT_INDEXI MACRO
LOCAL LOC1

XOR EAX,EAX
MOV AL,[ESI]
MOV AL,BYTE PTR[ESI]
INC ESI
TEST AL,AL
JNS LOC1
MOV AH,AL
MOV AL,[ESI]
MOV AL,BYTE PTR[ESI]
INC ESI
AND AH,7FH
LOC1:
Expand All @@ -1212,7 +1212,7 @@ LOC1:
NEXT_INDEX MACRO ZZ
XOR EAX,EAX

MOV AL,[ESI]
MOV AL,BYTE PTR[ESI]
INC ESI

TEST AL,AL
Expand All @@ -1223,7 +1223,7 @@ ZZ&_RET:
DOLONG MACRO ZZ
ZZ:
MOV AH,AL
MOV AL,[ESI]
MOV AL,BYTE PTR[ESI]

INC ESI
AND AH,7FH
Expand Down
Loading

0 comments on commit f4c2513

Please sign in to comment.