-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathTBOL.ASM
61 lines (42 loc) · 876 Bytes
/
TBOL.ASM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
; *******************************************************
; * *
; * Turbo Pascal Run-time Library *
; * Textfile Boolean I/O *
; * *
; * Copyright (c) 1988,92 Borland International *
; * *
; *******************************************************
TITLE TBOL
INCLUDE SE.ASM
CONST SEGMENT WORD PUBLIC
; TRUE and FALSE strings
TrueStr DB 4,'TRUE'
FalseStr DB 5,'FALSE'
CONST ENDS
CODE SEGMENT BYTE PUBLIC
ASSUME CS:CODE,DS:CONST
; Externals
EXTRN WriteStr:NEAR
; Publics
PUBLIC WriteBool
; Write standard procedure (Boolean)
WriteBool:
ARG FileP,DWORD,1
ARG Value,BYTE,2
ARG Width,WORD,1
ENTRY WINFAR
PUSH FileP.seg
PUSH FileP.ofs
MOV AX,OFFSET DS:TrueStr
CMP Value,0
JNE @@1
MOV AX,OFFSET DS:FalseStr
@@1: PUSH DS
PUSH AX
PUSH Width
PUSH CS
CALL WriteStr
ADD SP,4
EXIT 4
CODE ENDS
END