Software / Hercules Graphics Card / HBASIC

Homepage

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).

Why PC-DOS 2.0? HBASIC runs only with PC-DOS 2.0 or 2.1.

HBASIC
HBASIC needs PC-DOS 2.0

Important: 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.

Drive A: PC-DOS 2.0
Drive A: PC-DOS 2.0
Drive B: BASIC interpreter
Drive B: BASICA interpreter

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

HBASIC
HBASIC needs PC-DOS 2.0
BASICA
BASICA interpreter version A2.00
PATTERN.BAS
PATTERN.BAS
        
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
        
        
the output
The output

Documents

Downloads