INMC 80 News

  

May-September 1981, Issue 4











Page 64 of 71











-64-

Strings

STRINGS IN BASIC (AGAIN) G.T.Klement

After reading INMC NEWS 80/3, I think you will possibly be interested in a routine which saves and loads string arrays in BASIC.

Since I am a beginner in machine code programming, I am sure there are better solutions so take it for a first step to solve this problem.

Here is a ZEAP file with the source code, so you may easier test this routine. After the ZEAP file I have added a short BASIC program for demonstration.

ZEAP Z80 Assembler - Source Listing
0010 ; ===== STRINGSAVE V4 =s====
0020 ; 17-3681
9030 ;
0040 ;
0050 ; DATA FORMAT BASIC
0060 ;
0070 ; Nam Dis Sub DIM+1 DIM+1 L / CHP
0080 ;
9090 ;{1}2] 1314} [51 falbl lalbl JA|BIC|D|
9100 sI_I_} ILI} La it ILL. LILI!
0110 ;
22FF 0008 0120 RIN EQU #8
22FF 000D 0130 CRLF EQqu #0D
22FF 0028 0140 PRS RQU #28
22FF 0030 0150 ROUT EQU #30
22FF 0038 0160 RDEL EQU #38
22FF 005B 0170 MRET EQU #5B
22FF 005D 0180 TDEL EQU #5D
22FF OO5F 0190 MFLIP EQU #5F
22FF 0066 0200 TBCD3 EQU #66
22FF 0068 0210 B2HEX EQU #68
22FF 006B 0220 ERRM EQU #6B
22FF O06D 0230 souUT EQU #6D
22FF O06F 0240 SRLX EQU #6F
22FF 0070 0250 SRLIN EQU #70
22FF 0071 0260 NOM EQu. #71
22FF 0072 0270 NIM EQU #72
22FF 0077 0280 NNOM EQU. #77
22FF 0078 0290 NNIM EQU #78
22FF 0686 0300 LODEND EQU #0686
22FF 068A 0310 SAVEND EQU #068A
22FF 080A 0320 SCREEN EQU #080A
22FF OCIE 0330 ARGIO EQU #0CI1E
22FF 105A 0340 BEGCLR EQU #105A
22FF 10C3 0350 CLRTOP EQU #10C3
22FF 10DA 0360 BEGFRE EQU #10DA
22FF 1008 0370 BEGARR EQU #10D8
0380 ;
occo 390 ORG #cCco
0400 ;
0410 ; KRKKEKKK DRIVER SAVE KARKKAKKK
0420 ;
OccO DF77 0430 DRSAV SCAL NNOM
occ2 E5 0440 PUSH HL
0CC3 ES 0450 PUSH HL
occ4 cpppoc 0460 CALL FIN
occ? CL 0470 POP BC
OcCc8 CDO60D 0480 CALL MATRIX

This is an OCR’d version of the scanned page and likely contains recognition errors.











Page 64 of 71