Computer graphics in its beginnings
I wrote my first programs in a similar way. Two floppy disk drives, in drive A: the operating system and in drive B: the BASIC interpreter. In this case PC-DOS 2.0 with BASICA and the extension HBASIC for the Hercules graphics card (GB101, GB102).
Why PC-DOS 2.0? HBASIC runs only with PC-DOS 2.0 or 2.1.

HBASIC needs BASICA and BASICA needs the original IBM ROM BASIC. For this reason HBASIC runs only on an IBM PC 5150 or IBM XT 5160! See here.


HBASIC is not a standalone BASIC, but a extension for BASICA. It patches only the graphics routines!



The file PATTERN.BAS:
10 SCREEN 2
20 DIM VERT%(120)
30 KEY OFF
40 CLS
50 INPUT "enter radius (range 10-170)";R
60 INPUT "enter number of vertices (range 3-50)";V
70 CLS
80 X0=360+R*1.5:Y0=170
90 PSET(X0,Y0)
100 THETA=6.28319/V:N=V-1
110 FOR I=1 TO N
120 VERT%(2*I-1)=R*1.5*COS(THETA*I)+360
130 VERT%(2*I)=R*SIN(THETA*I)+170
140 PSET(VERT%(2*I-1),VERT%(2*I)),1
150 NEXT I
160 N0=N
170 FOR J=1 TO N
180 FOR I= 1 TO N0
190 XN=VERT%(2*I-1):YN=VERT%(2*I)
200 LINE(X0,Y0)-(XN,YN)
210 NEXT I
220 X0=XN:Y0=YN:N0=N0-1
230 NEXT J
240 LOCATE 1,1
250 INPUT "Try another (Y/N)"; A$
260 IF A$="Y" OR A$="y" GOTO 40
270 CLS
280 END

Important: You must NOT use an XT-CF-Lite card with XTIDE Universal BIOS in your IBM 5160 or 5160. PC-DOS can be started properly from drive A:, but HBASIC cannot load from floppy drive now (F3: LOAD "PATTERN.BAS). The error "Device I/O" is always reported. After that DOS crashed, a restart is necessary.
Documents
Downloads
- HBASIC for the Hercules Graphics Card (GB101): Download (33 KByte)