Subject: Ralph Molesworth Assembly Book Question

From: "roundf" <[email-masked]>
Date: Wed, 24 Jul 2013 23:31:19 -0000

I have been trying to do some of the chapter exercises in the Molesworth book, and have run into trouble on the BARGRAPH program that mixes Assembly with XB. The program wants you to load a file from an Editor/Assembler disk DSK1.BSCSUP and an object file DSK1.BGRAPH/O "from your "practice disk" that has the typed-in BARCODE basic program on it. I copied the E/A file over to the practice disk to avoid disk-swapping. I got an error in line 320. It was the same error when I actually did swap out the disks when prompted, so that should not be an issue. Other particulars are the BARGRAPH program was in TI BASIC and I tried to convert it to XB, the object file DSK1.BGRAPH has something to do with drawing the bar graph on screen, I assembled DSK1.BGRAPH/S in the E/A and got zero errors. Here is the current listing at the bottom. Any suggestions appreciated.

10 !BARGRAPH
100 REM  BAR GRAPH DEMONSTRATION
110 REM  TI BASIC W/MINI-MEMORY OR
120 REM  EDITOR/ASSEMBLER MODULE
130 REM  BY PHIL WEST AND BERNIE ELSNER 
140 CALL CLEAR
150 RANDOMIZE
160 PRINT "PLACE FILE BGRAPH/O IN"
170 PRINT "DISK DRIVE ONE THEN PRESS ENTER"
180 INPUT E$
190 PRINT "LOADING MACHINE LANGUAGE PLEASE WAIT"
200 CALL INIT
210 CALL LOAD(28706,0,0,0,0,0,0,0,0)
220 CALL LOAD("DSK1.BGRAPH/O")
230 PRINT "WHICH MODULE ARE YOU USING? ENTER"
240 PRINT " E - FOR EDITOR/ASSEMBLER M - FOR MINI-MEMORY"
250 INPUT E$
260 IF E$="M" THEN 350
270 IF E$<>"E" THEN 250
280 PRINT "PLACE EDITOR/ASSEMBLER"
290 PRINT "DISK A IN DRIVE ONE THEN PRESS ENTER"
300 INPUT E$
310 CALL CLEAR
320 CALL LOAD("DSK1.BSCSUP")
330 REM  RESERVE SPACE FOR CHARACTER DEFINITION 
340 REM  IN MACHINE LANGUAGE ROUTINE
350 FOR I=104 TO 159
360 CALL CHAR(I,"")
370 NEXT I
380 CALL CLEAR
390 CALL SCREEN(15)
400 PRINT "MICRO RETAIL PROFITS 1982-84"
410 PRINT " (Q)UIT OR (R)EPEAT"
420 F=L
430 FOR 1=1 TO 28
440 F=F*1.195
450 CALL LINK("BGRAPH",I,1,F)
460 NEXT I
470 FOR D=L TO 800
480 NEXT D
490 FOR 1=1 TO 28
500 CALL VCHAR(1,1+2,32,20)
510 CALL LINK("BGRAPH",I,6,F)
520 F=F/1.195
530 NEXT I
540 FOR D=L TO 800
550 NEXT D
560 CALL HCHAR(1,1,32,640)
570 REM  GENERATE RANDOM PARAMETERS 
580 FOR 1=1 TO 28
590 B=INT(RND*7+1)
600 C=INT(RND*160+1)
610 REM  DRAW BAR WITH M/L ROUTINE 
620 CALL LINK("BGRAPH",I,B,C)
630 NEXT I
640 CALL KEY(0,K,S)
650 IF K=82 THEN 380
660 IF K<>81 THEN 640
670 END