\r
PAGE 255, 132\r
\r
- .MODEL Medium\r
- .286\r
+ .MODEL Huge\r
+; .286\r
\r
; ==== MACROS ====\r
\r
PUBLIC DOS_PRINT\r
\r
DP_Stack STRUC\r
- DW ?x4 ; DI, SI, DS, BP\r
+ DW ?x2 ; DI, SI, DS, BP\r
DD ? ; Caller\r
DP_Text DD ? ; Far Address of Text to print\r
DP_Stack ENDS\r
\r
\r
DOS_PRINT PROC FAR\r
- \r
+\r
PUSHx BP, DS, SI, DI ; Preserve Important Registers\r
mov BP, SP ; Set up Stack Frame\r
\r
mov SI, DX ; DS:SI = String data\r
\r
@@DP_Scan_it:\r
- \r
+\r
cmp b [SI], 0 ; Null Byte found?\r
je @@DP_Got_Len ; exit loop if so\r
\r
mov DS, AX\r
\r
mov DX, o CR_LF ; Get Addr of CR/LF pair\r
- mov CX, 2 ; 2 Characters to Write \r
+ mov CX, 2 ; 2 Characters to Write\r
mov BX, 1 ; 1= DOS Handle for Display\r
\r
mov AH, 40h ; Write Text Function\r
int 21h ; Call DOS to do it\r
\r
- cld ; Reset Direction Flag \r
+ cld ; Reset Direction Flag\r
POPx DI, SI, DS, BP ; Restore Saved Registers\r
ret 4 ; Exit & Clean Up Stack\r
\r
;===========================================\r
;void far pascal dos_prints (char far *Text)\r
;===========================================\r
-; \r
-; Print Text Directly to DOS console \r
+;\r
+; Print Text Directly to DOS console\r
; without a trailing CR/LF\r
;\r
\r
mov SI, DX ; DS:SI = String data\r
\r
@@DPS_Scan_it:\r
- \r
+\r
cmp b [SI], 0 ; Null Byte found?\r
je @@DPS_Got_Len ; exit loop if so\r
\r
int 21h ; Call DOS to do it\r
\r
@DPS_Exit:\r
- cld ; Reset Direction Flag \r
+ cld ; Reset Direction Flag\r
POPx DI, SI, DS, BP ; Restore Saved Registers\r
ret 2 ; Exit & Clean Up Stack\r
\r
PUBLIC SET_VIDEO_MODE\r
\r
SVM_Stack STRUC\r
- DW ?x4 ; DI, SI, DS, BP\r
+ DW ?x2 ; DI, SI, DS, BP\r
DD ? ; Caller\r
SVM_Mode DB ?,? ; Desired Video Mode\r
SVM_Stack ENDS\r
CLR AX ; Return Nil (no Keypress)\r
\r
@SK_Exit:\r
- cld ; Reset Direction Flag \r
+ cld ; Reset Direction Flag\r
POPx DI, SI, DS, BP ; Restore Saved Registers\r
ret ; Exit & Clean Up Stack\r
\r
;=========================================\r
;\r
; Returns the Integer Square Root of (X)\r
-; Round allows the return value to be rounded to the \r
+; Round allows the return value to be rounded to the\r
; nearest integer value by passing 0x80. Passing 0\r
; return the Integer Portion only. The rounding amound is\r
-; a number from 0 to 1 multiplied by 256, thus \r
+; a number from 0 to 1 multiplied by 256, thus\r
; 0.5 * 0x100 = 0x80!\r
;\r
\r
sub DX, BX ; {sub edx,ebx}\r
inc AX ; {inc eax}\r
\r
-@ISQ_S: \r
+@ISQ_S:\r
loop @ISQ_L\r
\r
- add ax, [BP].ISQ_Round ; {add eax,$00008000} \r
+ add ax, [BP].ISQ_Round ; {add eax,$00008000}\r
; {*round* result in hi word: ie. +0.5}\r
shr ax, 8 ; {shr eax,16} {to ax (result)}\r
\r
- POPx DI, BP ; Restore Registers \r
+ POPx DI, BP ; Restore Registers\r
ret 4 ; Exit\r
\r
INT_SQR ENDP\r