Skip to content

Commit 24ed0b4

Browse files
committed
Add HIDE_LOAD_MSG define
1 parent 3571d9d commit 24ed0b4

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

library-asm/load.asm

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#include once <alloc.asm>
22
#include once <free.asm>
3-
#include once <print.asm>
3+
4+
#ifndef HIDE_LOAD_MSG
5+
# include once <print.asm>
6+
#endif
47

58
LOAD_CODE:
69
; This function will implement the LOAD CODE Routine
@@ -22,7 +25,9 @@ LOAD_CODE:
2225
LOCAL LD_CH_PR
2326
LOCAL LOAD_END
2427
LOCAL VR_CONTROL, VR_CONT_1, VR_CONT_2
28+
LOCAL MEM0
2529

30+
MEM0 EQU 5C92h ; Temporary memory buffer
2631
HEAD1 EQU MEM0 + 8 ; Uses CALC Mem for temporary storage
2732
; Must skip first 8 bytes used by
2833
; PRINT routine
@@ -134,7 +139,10 @@ LD_TYPE:
134139
cp 4 ; check if type in acceptable range 0 - 3.
135140
jr nc, LD_LOOK_H ; back to LD-LOOK-H with 4 and over.
136141
; else A indicates type 0-3.
142+
#ifndef HIDE_LOAD_MSG
137143
call PRINT_TAPE_MESSAGES; Print tape msg
144+
#endif
145+
138146
ld hl, HEAD1 + 1 ; point HL to 1st descriptor.
139147
ld de, (TMP_HEADER) ; point DE to 2nd descriptor.
140148
ld b, 10 ; the count will be ten characters for the
@@ -167,16 +175,20 @@ LD_NAME:
167175

168176
;; LD-CH-PR
169177
LD_CH_PR:
178+
#ifndef HIDE_LOAD_MSG
170179
call __PRINTCHAR ; PRINT-A prints character
180+
#endif
171181
djnz LD_NAME ; loop back to LD-NAME for ten characters.
172182

173183
bit 7, c ; test if all matched
174184
jr nz, LD_LOOK_H ; back to LD-LOOK-H if not
175185

176186
; else print a terminal carriage return.
177187

188+
#ifndef HIDE_LOAD_MSG
178189
ld a, 0Dh ; prepare carriage return.
179190
call __PRINTCHAR ; PRINT-A outputs it.
191+
#endif
180192

181193
ld a, (HEAD1)
182194
cp 03 ; Only "bytes:" header is used un ZX BASIC
@@ -197,7 +209,7 @@ VR_CONTROL:
197209
jr z, VR_CONT_1 ; forward to VR-CONT-1 if length unspecified
198210
; e.g. LOAD "x" CODE
199211
sbc hl, de
200-
jr nz, LOAD_ERROR ; Lenghts don't match
212+
jr nz, LOAD_ERROR ; Lengths don't match
201213

202214
VR_CONT_1:
203215
ld hl, HEAD1 + 13 ; fetch start of old data (orig. header)
@@ -262,6 +274,7 @@ LD_BYTES_NOINTER:
262274
ENDP
263275

264276

277+
#ifndef HIDE_LOAD_MSG
265278
PRINT_TAPE_MESSAGES:
266279

267280
PROC
@@ -310,3 +323,5 @@ PRINT_TAPE_MSG:
310323
ret
311324
312325
ENDP
326+
327+
#endif

0 commit comments

Comments
 (0)