I have recently purchased PB35 for DOS to evaluate it in order to migrate to PB CC or PB dll
in the near future.
Currently I use PDS 7.0 and Masm6.1 in PWB environment and have so for many years.
Some of my assembly programs are 100's of Kb in size.
Can somebody tell me:
1. What is wrong with the attached program and why is the
assembly routine considered invalid.
2. How do I assemble a source file that is not in-line without using
microsoft MASM
I know this example is easier to code inline, but it is merely a test to compare the
pb compiler to see how much of my code I have to change.
'---------------------------------------------------------------------------------------------------------------------------
' The Basic File
'---------------------------------------------------------------------------------------------------------------------------
DECLARE FUNCTION DOSTIME& (A&)
COMMON STARTIME&
COMMON ESC$
$LINK "D:\MASM61\ASM.DEV\DOSTIME.OBJ"
ESC$ = CHR$(&H1B)
STARTIME& = Dostime&(0)
DO
K$=UCASE$(INKEY$)
If K$ = ESC$ THEN End
LOCATE 1,1: PRINT USING "######.##";(DOSTIME&(0)-STARTIME&)/18.2;
LOOP
end
'---------------------------------------------------------------------------------------------------------------------------
Now the assembly function
'---------------------------------------------------------------------------------------------------------------------------
;*****************************************************************************
; DOSTIME.ASM IS A FUNCTION FOR READING DOS TIME IN 1/18.2 SECS.
; IT RETURNS THE RESULT IN DX:AX
;*****************************************************************************
.DOSSEG
.MODEL MEDIUM
.386
.CODE
PUBLIC DOSTIME
ORG 100H
DOSTIME PROC FAR
PUSH BP
MOV BP,SP
;******************************
MOV AH,00H ;get dos time count
INT 1AH ;which returns a value in cx:dx
MOV AX,DX ;but qbasic wants DX as hi word
MOV DX,CX ;and AX as lo word
;******************************
POP BP
RETF 2
DOSTIME ENDP
END
------------------
in the near future.
Currently I use PDS 7.0 and Masm6.1 in PWB environment and have so for many years.
Some of my assembly programs are 100's of Kb in size.
Can somebody tell me:
1. What is wrong with the attached program and why is the
assembly routine considered invalid.
2. How do I assemble a source file that is not in-line without using
microsoft MASM
I know this example is easier to code inline, but it is merely a test to compare the
pb compiler to see how much of my code I have to change.
'---------------------------------------------------------------------------------------------------------------------------
' The Basic File
'---------------------------------------------------------------------------------------------------------------------------
DECLARE FUNCTION DOSTIME& (A&)
COMMON STARTIME&
COMMON ESC$
$LINK "D:\MASM61\ASM.DEV\DOSTIME.OBJ"
ESC$ = CHR$(&H1B)
STARTIME& = Dostime&(0)
DO
K$=UCASE$(INKEY$)
If K$ = ESC$ THEN End
LOCATE 1,1: PRINT USING "######.##";(DOSTIME&(0)-STARTIME&)/18.2;
LOOP
end
'---------------------------------------------------------------------------------------------------------------------------
Now the assembly function
'---------------------------------------------------------------------------------------------------------------------------
;*****************************************************************************
; DOSTIME.ASM IS A FUNCTION FOR READING DOS TIME IN 1/18.2 SECS.
; IT RETURNS THE RESULT IN DX:AX
;*****************************************************************************
.DOSSEG
.MODEL MEDIUM
.386
.CODE
PUBLIC DOSTIME
ORG 100H
DOSTIME PROC FAR
PUSH BP
MOV BP,SP
;******************************
MOV AH,00H ;get dos time count
INT 1AH ;which returns a value in cx:dx
MOV AX,DX ;but qbasic wants DX as hi word
MOV DX,CX ;and AX as lo word
;******************************
POP BP
RETF 2
DOSTIME ENDP
END
------------------
Comment