-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
FASTOUT.MAC
82 lines (68 loc) · 1.2 KB
/
FASTOUT.MAC
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.z80
jp START
; -------------------------------------------------------------------------------
db 13
USAGE_S:
db "FASTOUT - Enable or disable the fast STROUT mode",13,10
db 13,10
db "When fast STROUT mode is enabled, MSX-DOS functions STROUT and ZSTROUT",13,10
db "will print strings faster, but string length will be limited to",13,10
db "511 characters (longer strings will be truncated).",13,10
db 13,10
db "Usage: FASTOUT [ON|OFF]",13,10
db 1Ah
db 0
START:
call CHK250##
ld de,BUF
ld a,1
call EXTPAR##
jr nz,FOUND_PARAMS
ld de,USAGE_S
ld c,_ZSTROUT##
call 5
ld b,a
ld c,_TERM##
jp 5
FOUND_PARAMS:
;--- Set value
ld hl,BUF
call CHKONOFF##
ld b,a
ld a,1
ld c,_FOUT##
call 5
ld b,a
ld c,_TERM##
jp nz,5
;--- Get current value
DO_GET:
xor a
ld c,_FOUT##
call 5
ld d,b
ld b,a
ld c,_TERM##
jp nz,5
ld b,d
push bc
ld de,INFO_MSG
ld c,_ZSTROUT##
call 5
pop af
or a
ld de,OFF_S
jr z,DO_INFO
ld de,ON_S
DO_INFO:
ld c,_ZSTROUT##
call 5
ld b,a
ld c,_TERM##
jp 5
INFO_MSG:
db "Fast STROUT mode is currently ",0
ON_S: db "ON",13,10,0
OFF_S: db "OFF",13,10,0
BUF:
end