Home > other >  In masm can compile BorlandC unable to compile
In masm can compile BorlandC unable to compile

Time:10-15

Masm version 4.0 is compiled through,
I want to upgrade to BorlandC3.1 but unable to compile,
Is grammar problem?


VSTACK equ 600 h; The stack size

Extrn main: far
Extrn putwindow: far
Extrn putibm: far

DGROUP GROUP DATA, UDATA XSTACK
ASSUME the DS: DGROUP

_PROG SEGMENT BYTE PUBLIC 'PROG'
CS: ASSUME _PROG

;
PUBLIC CXINIT
CXINIT PROC FAR
JMP over
The db 0,0,0,0,0,0,0,0,0,0,0,0,0; On seg boundary
Vrtx32 proc far
DB 0 ebh, eh, 0 FFH, FFH 0, 0 FFH, 0 FFH, FFH 0, 0 FFH, FFH 0, 0 FFH
DB FFH 0, 0 FFH, FFH 0, 0 FFH, FFH 0, 0 FFH, FFH 0, 0 FFH, FFH 0, 0 FFH
DB FFH 0, 0 FFH, FFH 0, 0 FFH, FFH 0, 0 FFH, FFH 0, 0 FFH, FFH 0, 0 FFH
A great deal of data,,,,,, is omitted,,,,,,,
The DB 010 h, 04 ah, 001 h, 05 ah, 00 ch, ch 05, 011 h, 0 e1h, 011 h, 072 h
The DB 012 h, 0 c7h, 012 h, 03 bh, 013 h, 00 dh, 017 h, 047 h, 017 h, 0 d4h
DB 017 h, 05 dh, 018 h, 0 BBH, 018 h, 03 dh, 01 bh, 021 h, 01 eh
Vrtx32 endp
Over: CLI
CLD. Direction
Xor ax, ax
Mov ss, ax
Mov ax, 380 h
Mov sp, ax
MOV AX, UDATA; Zero udata area
MOV ES, AX
CX, XOR CX
MOV DI, CX
XOR AL, AL
CLEARU: STOSB; The CLEAR UDATA the MEMORY
LOOP CLEARU
MOV AX, XSTACK
MOV ES, AX
CX, XOR CX
MOV DI, CX
XOR AL, AL
The CLEAR: STOSB; The CLEAR STACK MEMORY
LOOP the CLEAR
MOV AX, DGROUP
MOV DS, AX
XOR AX, AX
Mov macrokey, AX
Mov macrokey + 2, AX
MOV AX, VSTACK + 1
MOV _TOP, AX; The top of the stack
MOV AX, XSTACK
The ADD AX, 400 h; TO the END OF VRTX
XOR SI, SI
XOR BX, BX
Mov sports, si
Mov sports + 2, ax; The start of the stack Pointers
Mov es, ax
The add ax, 40 h; Room 256 Pointers for
Mov es: 2, ax; Stack for the task 0
Mov dx, 05 feh. The top of the stack for the task 0
Mov es: 0, dx
The add ax, 060 h; Reserve space for task stack 0
Mov dx, 0 FFFFH
Mov _pbox, dx
Mov _pbox + 2, dx
Mov dx, 0 FFFFH
Mov _p2box, dx
Mov _p2box + 2, dx
CX, MOV 5; NUMBER OF TERMINALS
SET: MOV BOFFSET [SI], AX; SEG START
MOV TOPOINT [SI], BX
MOV FRPOINT [SI], BX
Mov busywin2 [si], bx
; Mov curwind2 [si], dx
INC SI
INC SI
The ADD AX, buffsize/16; Buffsize EACH
LOOP SET
CX, MOV AX; SAVE IT
Mov _psp + 2, ax
MOV _MBASE + 2, AX
MOV _MNEXT + 2, AX
XOR BX, BX
MOV _MBASE, BX
MOV _MNEXT, BX
Push ax
TRY: MOV ES, AX; The FIND RAM CONTINUOUS
; CMP ax, 0 afe0h; This works for NT, but not 95
CMP ax, 0 b7e0h; Use some of the video area
; Use more memory now!
; CMP ax, 09 fe0h
Ja istop
MOV BX, ES: 0
INC BX
MOV ES: 0, BX
CMP BX, ES: 0; SAME YET?
Developed ISTOP; NO - NO RAM
The ADD AX, 10 h; NEXT 256 BYTES
JMP TRY
ISTOP: SUB AX, 90 h; Difference SOME BACK TO DOS
POP ES. GET the START OF the BLOCK
MOV DX, DX
MOV ES: 0, DX
MOV ES: 2, AX
MOV BX, AX
SUB AX, CX. The SIZE OF BLOCK
PUSH AX
MOV AX, ES
SUB BX, AX
MOV AH, AH 4
; INT h; FREE IT
POP AX
MOV _MSIZE, AX
; CALL RBRK
;
Mov ax, 0 b000h; Mono screen
Mov es, ax
MOV BX, ES: 0
INC BX
MOV ES: 0, BX
CMP BX, ES: 0; SAME YET?
; Jz ismono; NO - NO RAM
Mov ax, 0 b800h
Ismono: mov bx, dgroup
Mov ds, bx
Mov disptype, ax; Save it for others
Mov ax, 2
Mov cputype, ax; IBM
;
;
; The USER of the PRE - INIT CODE
;
CFTBL_PTR_OFF EQU WORD PTR 0200 h; CFTBL POINTER OFFSET
CFTBL_PTR_SEG EQU WORD PTR 0202 h; CFTBL POINTER SEGMENT
VRTX EQU WORD PTR 080 h; VRTX INTERRUPT
INT32_VCT EQU WORD PTR 204 h; VRTX INT the VECTOR

INIT PROC FAR
MOV AX, 0; The SET AX TO 0
MOV DS, AX; COPY TO DS
MOV DS: CFTBL_PTR_SEG, SEG TBL; CFTBL SEGMENT
MOV DS: CFTBL_PTR_OFF, OFFSET TBL; CFTBL OFFSET
Mov ax, 0; Assume offset is zero
MOV DS: INT32_VCT, AX; The LOAD IT
MOV AX, seg vrtx32; The GET VRTX ENTRY (CS)
Inc ax; Plus one because it starts at 80:10
MOV DS: INT32_VCT + 2, AX; The LOAD IT
MOV AX, 030 h; VRTX_INIT
INT 81 h; CALL VRTX
The OR AX, AX; ANY ERRORS?
JZ P_INIT
JMP abort
P_INIT:
CALL TIMER_INIT
MOV BX, OFFSET the MAIN; CODE OFFSET OF TASK
MOV AX, SEG MAIN; CODE SEGMENT OF TASK
MOV CL, 4
ROL AX, CL
CX, MOV AX
AND AX, 15
CX, AND 0 fff0h
The ADD BX, CX
The ADC AX, 0; (AX, BX)=LONG EQUIVALENT
CX, MOV BX
CX, AND 15; The SAVE NORMALIZED OFFSET
XCHG AX, BX
SHR BX, 1; The CONSTRUCT BASE VALUE
RCR AX, 1
SHR BX, 1
RCR AX, 1
SHR BX, 1
RCR AX, 1
SHR BX, 1
RCR AX, 1
MOV BX, CX
MOV ES, AX; PLACE the SEGMENT IS ES
MOV CL, 0; ID=0
MOV CH, 0; PRI=0
MOV AX, DGROUP; The set up for DS/SS. EXE file
MOV DS, AX
MOV AX, 00 h; SC_TCREATE
INT 81 h; CALL VRTX
MOV AX, 31 h; VRTX_GO
INT 81 h; CALL VRTX, NO RETURN
; FROM THIS CALL
INIT ENDP
;
TBL LABEL BYTE
DW SEG XSTACK; The SYSTEM RAM START ADDRESS
DW 400 h; The SYSTEM RAM SIZE
DW 0; RESERVED, MUST BE 0
DW 0; NO INTERRUPT STACK
DW 0; RESERVED, MUST BE 0
DW 40 h; Idle stack size
DW 0; nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related