Digital Research CB-86 v2.0
This commit is contained in:
parent
b591749377
commit
349e15087f
BIN
Digital Research CB-86 v2/CB86.EXE
Normal file
BIN
Digital Research CB-86 v2/CB86.EXE
Normal file
Binary file not shown.
BIN
Digital Research CB-86 v2/CB86.L86
Normal file
BIN
Digital Research CB-86 v2/CB86.L86
Normal file
Binary file not shown.
BIN
Digital Research CB-86 v2/CB86.OR1
Normal file
BIN
Digital Research CB-86 v2/CB86.OR1
Normal file
Binary file not shown.
BIN
Digital Research CB-86 v2/CB86.OR2
Normal file
BIN
Digital Research CB-86 v2/CB86.OR2
Normal file
Binary file not shown.
BIN
Digital Research CB-86 v2/CB86.OR3
Normal file
BIN
Digital Research CB-86 v2/CB86.OR3
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
82
Digital Research CB-86 v2/CIRCOM.BAS
Normal file
82
Digital Research CB-86 v2/CIRCOM.BAS
Normal file
@ -0,0 +1,82 @@
|
||||
REM These are the circle drawing functions.
|
||||
REM
|
||||
REM Use %INCLUDE CIRCOM.BAS to include the functions
|
||||
REM in your program.
|
||||
REM
|
||||
REM
|
||||
REM CALL BEG.CIR to initialize the circle arrays
|
||||
REM CALL PLOT.CIR to draw a circle without fill
|
||||
REM CALL FILL.CIR to draw a circle with fill
|
||||
REM
|
||||
REM The circle is centered at .5,.5 with a radius
|
||||
REM of .5 in a coordinate system ranging from 0 to 1
|
||||
REM on the X and Y axes.
|
||||
REM
|
||||
REM Initialize the circle drawing arrays X.ARRAY and
|
||||
REM Y.ARRAY by using CALL BEG.CIR in the beginning
|
||||
REM of your program. This statement only needs to
|
||||
REM be executed once. There is a long delay while
|
||||
REM this CALL is completed; you may want to put
|
||||
REM a message in your program to let the user know
|
||||
REM that the machine is computing.
|
||||
REM
|
||||
REM You can position the circle as you wish using
|
||||
REM the SET VIEWPORT and SET WINDOW statements prior
|
||||
REM to calling the drawing functions.
|
||||
REM
|
||||
REM The aspect ratio of the device must be adjusted
|
||||
REM in order to proportion the circle. You can use
|
||||
REM the following statements to accomplish this:
|
||||
REM
|
||||
REM ASK DEVICE X.AXIS,Y.AXIS
|
||||
REM SET WINDOW 0,X.AXIS/Y.AXIS,0,1
|
||||
REM
|
||||
REM These statements scale the window so that the X
|
||||
REM and Y axes use the same unit scaling regardless
|
||||
REM of the aspect ratio of the device. The circle
|
||||
REM is drawn with a shift to the left of the viewport
|
||||
REM because of the increased scaling of the X axis.
|
||||
REM You can also use the BOUNDS statement to square
|
||||
REM the device or the VIEWPORT statement to rescale
|
||||
REM the viewport.
|
||||
REM
|
||||
REM The functions make use of the variables L.CIR
|
||||
REM X.ARRAY, Y.ARRAY, and I.ANGLE. X.ARRAY is an
|
||||
REM array of the X coordinates of the points around
|
||||
REM the circle. Y.ARRAY is the corresponding Y
|
||||
REM coordinates. L.CIR contains a count of the
|
||||
REM number of coordinate pairs. I.ANGLE is only
|
||||
REM used by the FOR loop in BEG.CIR.
|
||||
REM
|
||||
|
||||
DEF BEG.CIR
|
||||
DIM X.ARRAY(64)
|
||||
DIM Y.ARRAY(64)
|
||||
L.CIR=0
|
||||
|
||||
REM THIS FOR LOOP STEPS THROUGH 0 TO 360 DEGREES
|
||||
REM USING RADIANS. THERE ARE 2PI RADIANS IN 360 DEGREES.
|
||||
|
||||
FOR I.ANGLE = 0 TO 6.28 STEP .1
|
||||
X.ARRAY(L.CIR) = .5 + (.5 * COS(I.ANGLE))
|
||||
Y.ARRAY(L.CIR) = .5 + (.5 * SIN(I.ANGLE))
|
||||
L.CIR = L.CIR + 1
|
||||
NEXT I.ANGLE
|
||||
|
||||
REM THE CIRCLE MUST BE CLOSED FOR MAT PLOT
|
||||
|
||||
X.ARRAY(L.CIR) = X.ARRAY(0)
|
||||
Y.ARRAY(L.CIR) = Y.ARRAY(0)
|
||||
RETURN
|
||||
FEND
|
||||
|
||||
DEF PLOT.CIR
|
||||
MAT PLOT L.CIR: X.ARRAY,Y.ARRAY
|
||||
RETURN
|
||||
FEND
|
||||
|
||||
DEF FILL.CIR
|
||||
MAT FILL L.CIR-1: X.ARRAY,Y.ARRAY
|
||||
RETURN
|
||||
FEND
|
||||
|
412
Digital Research CB-86 v2/DEMOGRAF.BAS
Normal file
412
Digital Research CB-86 v2/DEMOGRAF.BAS
Normal file
@ -0,0 +1,412 @@
|
||||
REM THIS IS A DEMONSTRATION PROGRAM FOR
|
||||
REM CBASIC GRAPHICS EXTENSIONS
|
||||
REM
|
||||
REM PROGRAM NAME: DEMOGRAF
|
||||
REM
|
||||
%INCLUDE GRAPHCOM.BAS
|
||||
|
||||
DEF PAUSE
|
||||
REM UTILITY TO SUSPEND PROGRAM EXECUTION UNTIL CHARACTER IS
|
||||
REM ENTERED AT CONSOLE, STOPPING PROGRAM IF CTRL-C IS ENTERED,
|
||||
REM OTHERWISE RETURNING INTEGER VALUE OF CHARACTER ENTERED.
|
||||
REM CHARACTER IS NOT DISPLAYED.
|
||||
|
||||
INTEGER PAUSE,CHOICE
|
||||
|
||||
CHOICE = INKEY
|
||||
IF CHOICE = 3 THEN STOP
|
||||
PAUSE = CHOICE
|
||||
FEND
|
||||
|
||||
GRAPHIC OPEN 1
|
||||
CLEAR
|
||||
|
||||
BEEM: GRAPHIC PRINT AT (0,.9): "BEAM STATEMENT"
|
||||
SET BEAM "OFF"
|
||||
PLOT (0,1),(1,1),(1,0),(0,0)
|
||||
KEY% = PAUSE REM WAIT FOR CONSOLE INPUT
|
||||
CLEAR
|
||||
SET BEAM "ON"
|
||||
PLOT (0,1),(1,1),(1,0),(0,0)
|
||||
KEY% = PAUSE
|
||||
|
||||
REM ILLUSTRATE TECHNIQUE OF SQUARING A DISPLAY
|
||||
|
||||
BOWNDS: CLEAR
|
||||
GRAPHIC PRINT AT (0,.9): "BOUNDS STATEMENT"
|
||||
ASK DEVICE X.AXIS,Y.AXIS
|
||||
PRINT "THE ASPECT RATIO IS = ";Y.AXIS;"/";X.AXIS
|
||||
KEY% = PAUSE
|
||||
PLOT (0,0),(0,1),(1,1),(1,0),(0,0)
|
||||
KEY% = PAUSE
|
||||
CLEAR
|
||||
SET BOUNDS Y.AXIS,X.AXIS
|
||||
PLOT (0,0),(0,1),(1,1),(1,0),(0,0)
|
||||
SET BOUNDS 1,1
|
||||
KEY% = PAUSE
|
||||
|
||||
REM DEMONSTRATE CONTROL OF GRAPHIC CHARACTER HEIGHT
|
||||
REM AND MINIMUM HEIGHT FOR GRAPHIC CHARACTERS
|
||||
|
||||
HIGH: CLEAR
|
||||
SET CHARACTER HEIGHT 0
|
||||
GRAPHIC PRINT AT (0,.9): "CHARACTER HEIGHT STATEMENT"
|
||||
SET CHARACTER HEIGHT .1
|
||||
GRAPHIC PRINT AT (0,.7): "10 PERCENT"
|
||||
KEY% = PAUSE
|
||||
SET WINDOW 0,100,0,100
|
||||
SET CHARACTER HEIGHT 15
|
||||
GRAPHIC PRINT AT (0,40): "15 PERCENT"
|
||||
KEY% = PAUSE
|
||||
SET CHARACTER HEIGHT 0
|
||||
ASK CHARACTER HEIGHT CH
|
||||
PRINT "MINIMUM CHARACTER HEIGHT IS = "; CH
|
||||
GRAPHIC PRINT AT (0,20): "MINIMUM HEIGHT"
|
||||
|
||||
REM DISPLAY SEVERAL RANDOM LINES ON SCREEN, THEN MAKE
|
||||
REM THEM DISAPPEAR VIA "CLEAR" STATEMENT
|
||||
|
||||
INPUT ""; LINE SEED$
|
||||
RANDOMIZE
|
||||
CLR: CLEAR
|
||||
GRAPHIC PRINT AT (0,90): "CLEAR STATEMENT"
|
||||
SET WINDOW 0,1,0,1
|
||||
FOR I.INT% = 1 TO 10
|
||||
PLOT (RND,RND),(RND,RND)
|
||||
NEXT I.INT%
|
||||
KEY% = PAUSE
|
||||
CLEAR
|
||||
|
||||
REM ILLUSTRATE EFFECT OF AUTOMATIC CLIPPING WHEN FIGURE
|
||||
REM EXCEEDS ALLOWABLE BOUNDARIES
|
||||
|
||||
CLP: SET WINDOW 0,100,0,100
|
||||
GRAPHIC PRINT AT (0,90): "CLIP STATEMENT"
|
||||
PLOT (25,10),(50,150),(75,10),(25,10)
|
||||
KEY% = PAUSE
|
||||
|
||||
REM DRAW BORDER IN EACH AVAILABLE COLOR (NUMBER OF
|
||||
REM COLORS VARIES WITH RESOLUTION)
|
||||
|
||||
COLR: CLEAR
|
||||
GRAPHIC PRINT AT (0,90): \
|
||||
"COLOR AND COLOR COUNT STATEMENTS"
|
||||
SET WINDOW 0,1,0,1
|
||||
ASK COLOR COUNT CT%
|
||||
FOR I.INT% = 1 TO CT%
|
||||
SET COLOR I.INT%
|
||||
PLOT (0,0),(0,1),(1,1),(1,0),(0,0)
|
||||
KEY% = PAUSE
|
||||
NEXT I.INT%
|
||||
|
||||
REM RETRIEVE AND DISPLAY SPECIFICATIONS FOR CURRENT DEVICE
|
||||
|
||||
DEVC: CLEAR
|
||||
SET CHARACTER HEIGHT 0
|
||||
SET COLOR 1
|
||||
GRAPHIC PRINT AT (0,.8): "DEVICE STATEMENT"
|
||||
ASK DEVICE X.AXIS,Y.AXIS
|
||||
PRINT "THE VERTICAL AXIS IS "; \
|
||||
Y.AXIS*100.0/X.AXIS;"PERCENT OF THE";
|
||||
PRINT " HORIZONTAL AXIS"
|
||||
PRINT "X= ";X.AXIS;" Y= ";Y.AXIS
|
||||
KEY% = PAUSE
|
||||
|
||||
REM MENTION "GRAPHIC CLOSE" STATEMENT
|
||||
|
||||
GCLOSE: CLEAR
|
||||
GRAPHIC PRINT AT (0,.9): "GRAPHIC CLOSE STATEMENT"
|
||||
GRAPHIC PRINT AT (0,.5): "GRAPHIC CLOSE HAS NO DEMO"
|
||||
KEY% = PAUSE
|
||||
|
||||
REM ILLUSTRATE GRAPHIC INPUT VIA CURSOR POSITIONING
|
||||
|
||||
GIN: CLEAR
|
||||
SET WINDOW 0,100,0,100
|
||||
SET CHARACTER HEIGHT 0
|
||||
GRAPHIC PRINT AT (0,80): "GRAPHIC INPUT STATEMENT"
|
||||
GRAPHIC PRINT AT (0,25): "OPTION 1 ."
|
||||
SET COLOR 2
|
||||
GRAPHIC PRINT AT (0,50): "OPTION 2 ."
|
||||
SET COLOR 3
|
||||
GRAPHIC PRINT AT (0,75): "OPTION 3 ."
|
||||
GRAPHIC INPUT X.AXIS,Y.AXIS,A$
|
||||
N = INT((Y.AXIS+5)/25)
|
||||
IF N = 0 THEN N = 1 REM NO OPTION ZERO
|
||||
IF N > 3 THEN N = 3 REM ONLY THREE OPTIONS
|
||||
PRINT "THE CURSOR WAS POSITIONED AT: "; X.AXIS,Y.AXIS
|
||||
PRINT "YOU SELECTED OPTION: "; N
|
||||
PRINT "THE TERMINATING KEY WAS: "; A$
|
||||
KEY% = PAUSE
|
||||
|
||||
REM MENTION "GRAPHIC OPEN" STATEMENT
|
||||
|
||||
GOPEN: CLEAR
|
||||
SET COLOR 1
|
||||
SET CHARACTER HEIGHT 0
|
||||
GRAPHIC PRINT AT (0,90): "GRAPHIC OPEN STATEMENT"
|
||||
GRAPHIC PRINT AT (0,50): \
|
||||
"THE GRAPHIC OPEN HAS NO DEMONSTRATION"
|
||||
KEY% = PAUSE
|
||||
|
||||
REM DEMONSTRATE CENTERING AND JUSTIFICATION
|
||||
|
||||
GPRT: CLEAR
|
||||
SET WINDOW 0,1,0,1
|
||||
SET CHARACTER HEIGHT 0
|
||||
GRAPHIC PRINT AT (0,.9): "GRAPHIC PRINT STATEMENT"
|
||||
SET JUSTIFY 0,0
|
||||
GRAPHIC PRINT AT (.5,.5): "BEGINS AT CENTER"
|
||||
KEY% = PAUSE
|
||||
SET JUSTIFY .5,0
|
||||
GRAPHIC PRINT AT (.5,.3): "THIS IS CENTERED"
|
||||
KEY% = PAUSE
|
||||
SET JUSTIFY .5,.5
|
||||
GRAPHIC PRINT AT (.5,.3): "THIS IS CENTERED"
|
||||
KEY% = PAUSE
|
||||
SET JUSTIFY 1.0,1.0
|
||||
GRAPHIC PRINT AT (.5,.5): "ENDS AT CENTER"
|
||||
KEY% = PAUSE
|
||||
JUST: CLEAR
|
||||
SET JUSTIFY 0,0
|
||||
SET WINDOW 0,100,0,100
|
||||
SET CHARACTER HEIGHT 0
|
||||
GRAPHIC PRINT AT (0,90): "JUSTIFY STATEMENT"
|
||||
PLOT (20,80),(20,20),(80,20)
|
||||
PLOT (15,40),(20,40)
|
||||
PLOT (15,60),(20,60)
|
||||
PLOT (15,80),(20,80)
|
||||
PLOT (40,15),(40,20)
|
||||
PLOT (60,15),(60,20)
|
||||
PLOT (80,15),(80,20)
|
||||
SET JUSTIFY 1,.5
|
||||
GRAPHIC PRINT AT (14,20): "20"
|
||||
GRAPHIC PRINT AT (14,40): "40"
|
||||
GRAPHIC PRINT AT (14,60): "60"
|
||||
GRAPHIC PRINT AT (14,80): "80"
|
||||
SET JUSTIFY .5,1
|
||||
GRAPHIC PRINT AT (20,14): "20"
|
||||
GRAPHIC PRINT AT (40,14): "40"
|
||||
GRAPHIC PRINT AT (60,14): "60"
|
||||
GRAPHIC PRINT AT (80,14): "80"
|
||||
KEY% = PAUSE
|
||||
|
||||
REM EXHIBIT VARIATION OF LINE STYLE
|
||||
|
||||
STYL: CLEAR
|
||||
SET JUSTIFY 0,0
|
||||
SET WINDOW 0,1,0,1
|
||||
GRAPHIC PRINT AT (0,.9): "LINE STYLE STATEMENT"
|
||||
SET LINE STYLE 3
|
||||
SET JUSTIFY 1,0
|
||||
GRAPHIC PRINT AT (.5,.5): "Sign here"
|
||||
PLOT (0.5,0.5),(0.8,0.5)
|
||||
KEY% = PAUSE
|
||||
|
||||
REM ILLUSTRATE VARIATION IN SIZE OF MARKERS
|
||||
|
||||
MHIGH: CLEAR
|
||||
SET WINDOW 0,1,0,1
|
||||
SET CHARACTER HEIGHT 0
|
||||
SET LINE STYLE 1
|
||||
SET JUSTIFY 0,0
|
||||
GRAPHIC PRINT AT (0,.9): "MARKER HEIGHT STATEMENT"
|
||||
DIM MX(5)
|
||||
DIM MY(5)
|
||||
MX(0) = .3 : MY(0) = .7
|
||||
MX(1) = .7 : MY(1) = .7
|
||||
SET MARKER HEIGHT .1
|
||||
MAT MARKER 1: MX,MY
|
||||
SET WINDOW 0,100,0,100
|
||||
MX(0) = 30 : MY(0) = 50
|
||||
MX(1) = 70 : MY(1) = 50
|
||||
SET MARKER HEIGHT 15
|
||||
MAT MARKER 1: MX,MY
|
||||
SET MARKER HEIGHT 0
|
||||
ASK MARKER HEIGHT MK
|
||||
PRINT "MINIMUM MARKER HEIGHT IS = "; MK
|
||||
KEY% = PAUSE
|
||||
|
||||
REM DEMONSTRATE ALL MARKER SHAPES
|
||||
|
||||
MTYPE: CLEAR
|
||||
SET WINDOW 0,1,0,1
|
||||
SET MARKER HEIGHT 0
|
||||
GRAPHIC PRINT AT (0,.9): "MARKER TYPE STATEMENT"
|
||||
MX(0) = .5 : MY(0) = .7
|
||||
FOR I.INT% = 1 TO 5
|
||||
SET MARKER TYPE I.INT%
|
||||
MAT MARKER 0: MX,MY
|
||||
MY(0) = MY(0) - .1
|
||||
NEXT I.INT%
|
||||
KEY% = PAUSE
|
||||
|
||||
REM DEMONSTRATE FILLED POLYGON
|
||||
|
||||
MFILL: CLEAR
|
||||
SET LINE STYLE 1
|
||||
SET JUSTIFY 0,0
|
||||
GRAPHIC PRINT AT (0,.9): "MAT FILL STATEMENT"
|
||||
SET WINDOW 0,100,0,100
|
||||
SET CHARACTER HEIGHT 0
|
||||
SET COLOR 1
|
||||
DIM X.ARRAY(10)
|
||||
DIM Y.ARRAY(10)
|
||||
X.ARRAY(0) = 40 : Y.ARRAY(0) = 10
|
||||
X.ARRAY(1) = 35 : Y.ARRAY(1) = 25
|
||||
X.ARRAY(2) = 50 : Y.ARRAY(2) = 40
|
||||
X.ARRAY(3) = 65 : Y.ARRAY(3) = 25
|
||||
X.ARRAY(4) = 60 : Y.ARRAY(4) = 10
|
||||
MAT FILL 4: X.ARRAY,Y.ARRAY
|
||||
KEY% = PAUSE
|
||||
|
||||
REM ILLUSTRATE POSITIONING OF MARKERS VIA AN ARRAY
|
||||
|
||||
MMARK: CLEAR
|
||||
SET WINDOW 0,100,0,100
|
||||
GRAPHIC PRINT AT (0,90): "MAT MARKER STATEMENT"
|
||||
SET MARKER HEIGHT 0
|
||||
SET MARKER TYPE 1
|
||||
SET COLOR 1
|
||||
MAT MARKER 4: X.ARRAY,Y.ARRAY
|
||||
KEY% = PAUSE
|
||||
|
||||
REM DEMONSTRATE DRAWING POLYGON OUTLINE VIA AN ARRAY
|
||||
|
||||
MPLOT: CLEAR
|
||||
GRAPHIC PRINT AT (0,90): "MAT PLOT STATEMENT"
|
||||
SET COLOR 1
|
||||
SET WINDOW 0,1,0,1
|
||||
SET CHARACTER HEIGHT 0
|
||||
FOR I.INT% = 0 TO 4
|
||||
X.ARRAY(I.INT%) = .01 * X.ARRAY(I.INT%)
|
||||
Y.ARRAY(I.INT%) = .01 * Y.ARRAY(I.INT%)
|
||||
NEXT I.INT%
|
||||
X.ARRAY(5) = .40 : Y.ARRAY(5) = .10
|
||||
SET BEAM "OFF"
|
||||
MAT PLOT 4: X.ARRAY,Y.ARRAY
|
||||
KEY% = PAUSE
|
||||
CLEAR
|
||||
MAT PLOT 5: X.ARRAY,Y.ARRAY
|
||||
KEY% = PAUSE
|
||||
|
||||
REM DO POLYGON VIA "PLOT" STATEMENTS
|
||||
|
||||
PLT: CLEAR
|
||||
SET WINDOW 0,100,0,100
|
||||
SET CHARACTER HEIGHT 0
|
||||
SET COLOR 1
|
||||
GRAPHIC PRINT AT (0,90): "PLOT STATEMENT"
|
||||
PLOT (40,10),(35,25);
|
||||
SET COLOR 2
|
||||
PLOT (35,25),(50,40);
|
||||
SET LINE STYLE 2
|
||||
PLOT (50,40),(65,25);
|
||||
SET LINE STYLE 1
|
||||
SET COLOR 3
|
||||
PLOT (65,25),(60,10),(40,10)
|
||||
KEY% = PAUSE
|
||||
|
||||
REM EXERCISE ARBITRARY POSITIONING OF GRAPHIC BEAM
|
||||
|
||||
POSIT: CLEAR
|
||||
GRAPHIC PRINT AT (0,90): "POSITION STATEMENT"
|
||||
SET BEAM "OFF"
|
||||
SET POSITION 50,50
|
||||
SET POSITION 50,100
|
||||
SET BEAM "ON"
|
||||
SET POSITION 0,0
|
||||
SET POSITION 50,50
|
||||
KEY% = PAUSE
|
||||
|
||||
REM SHOW ALL LINE STYLES
|
||||
|
||||
STCNT: CLEAR
|
||||
GRAPHIC PRINT AT (0,90): "STYLE COUNT STATEMENT"
|
||||
SET WINDOW 0,100,0,100
|
||||
SET CHARACTER HEIGHT 0
|
||||
ASK STYLE COUNT ST%
|
||||
PRINT "THE NUMBER OF LINE STYLES IS: "; ST%
|
||||
FOR I.INT% = 1 TO ST%
|
||||
SET LINE STYLE I.INT%
|
||||
SET BEAM "OFF"
|
||||
PLOT (10*I.INT%,10),(10*I.INT%,90)
|
||||
NEXT I.INT%
|
||||
KEY% = PAUSE
|
||||
SET LINE STYLE 1
|
||||
|
||||
REM DEMONSTRATE ROTATION OF TEXT
|
||||
|
||||
ANGEL: CLEAR
|
||||
GRAPHIC PRINT AT (0,90): "TEXT ANGLE STATEMENT"
|
||||
SET WINDOW 0,1,0,1
|
||||
SET CHARACTER HEIGHT 0
|
||||
PI = 3.1415926
|
||||
RAD = PI*2
|
||||
DEG = RAD/360
|
||||
FOR I.INT% = 90 TO 360 STEP 90
|
||||
SET TEXT ANGLE I.INT%*DEG
|
||||
GRAPHIC PRINT AT (.5,.5): "ROTATE ME"
|
||||
NEXT I.INT%
|
||||
KEY% = PAUSE
|
||||
SET TEXT ANGLE 0
|
||||
|
||||
REM ILLUSTRATE EFFECT OF VARYING VIEWPORT
|
||||
|
||||
VYOU: CLEAR
|
||||
GRAPHIC PRINT AT (0,.9): "VIEWPORT STATEMENT"
|
||||
X.ARRAY(0) = 0 : Y.ARRAY(0) = 0
|
||||
X.ARRAY(1) = 0 : Y.ARRAY(1) = 100
|
||||
X.ARRAY(2) = 100 : Y.ARRAY(2) = 100
|
||||
X.ARRAY(3) = 100 : Y.ARRAY(3) = 0
|
||||
X.ARRAY(4) = 0 : Y.ARRAY(4) = 0
|
||||
SET VIEWPORT 0,1,0,1
|
||||
SET WINDOW 0,100,0,100
|
||||
SET CHARACTER HEIGHT 0
|
||||
MAT PLOT 4: X.ARRAY,Y.ARRAY
|
||||
SET VIEWPORT .1,.9,.1,.9
|
||||
MAT PLOT 4: X.ARRAY,Y.ARRAY
|
||||
SET VIEWPORT .2,.8,.2,.8
|
||||
MAT PLOT 4: X.ARRAY,Y.ARRAY
|
||||
SET VIEWPORT .3,.5,.3,.5
|
||||
MAT PLOT 4: X.ARRAY,Y.ARRAY
|
||||
SET VIEWPORT .5,.7,.5,.7
|
||||
MAT PLOT 4: X.ARRAY,Y.ARRAY
|
||||
KEY% = PAUSE
|
||||
|
||||
REM ILLUSTRATE EFFECT OF VARYING WINDOW
|
||||
|
||||
WINDW: CLEAR
|
||||
SET VIEWPORT 0,1,0,1
|
||||
SET WINDOW 0,100,0,100
|
||||
SET CHARACTER HEIGHT 0
|
||||
GRAPHIC PRINT AT (0,90): "WINDOW STATEMENT"
|
||||
PLOT (0,0),(60,60),(60,0),(0,0)
|
||||
SET WINDOW 0,200,0,200
|
||||
SET CHARACTER HEIGHT 0
|
||||
PLOT (0,0),(60,60),(60,0),(0,0)
|
||||
SET VIEWPORT 0,.5,.5,1.0
|
||||
PLOT (0,0),(60,60),(60,0),(0,0)
|
||||
KEY% = PAUSE
|
||||
|
||||
REM FINISH DEMONSTRATION AND END PROGRAM
|
||||
|
||||
FIN: CLEAR
|
||||
SET WINDOW 0,100,0,100
|
||||
SET CHARACTER HEIGHT 0
|
||||
SET VIEWPORT 0,1,0,1
|
||||
SET COLOR 1
|
||||
FOR I.INT% = 1 TO CT%
|
||||
SET COLOR I.INT%
|
||||
MAT PLOT 5: X.ARRAY,Y.ARRAY
|
||||
SET VIEWPORT .01*I.INT%,1-(I.INT%*.01), \
|
||||
.01*I.INT%,1-(I.INT%*.01)
|
||||
NEXT I.INT%
|
||||
SET JUSTIFY .5,.5
|
||||
SET COLOR 1
|
||||
SET VIEWPORT 0,1,0,1
|
||||
GRAPHIC PRINT AT (50,50): "THANKS FOR THE VIEWING"
|
||||
KEY% = PAUSE
|
||||
STOP
|
||||
END
|
||||
|
290
Digital Research CB-86 v2/DEMOSCRN.BAS
Normal file
290
Digital Research CB-86 v2/DEMOSCRN.BAS
Normal file
@ -0,0 +1,290 @@
|
||||
\ ********************************************
|
||||
\ * TEST PROGRAM FOR PC DOS SCREEN CONTROL *
|
||||
\ ********************************************
|
||||
\ * This program was written and tested by *
|
||||
\ * Digital Research Technical Support *
|
||||
\ ********************************************
|
||||
integer ROW, COL, RET, I, J
|
||||
string PAD, SP, TL
|
||||
|
||||
%include PCSCRN.DEF
|
||||
|
||||
TL = string$(8,"0123456789")
|
||||
PAD = string$(76,chr$(1))
|
||||
SP = string$(60," ")
|
||||
|
||||
def PRTCTR (S$,ROW)
|
||||
integer PRTCTR, ROW, COL
|
||||
COL = int%((79-len(S$))/2)
|
||||
call setcur(ROW,COL) : print S$;
|
||||
fend
|
||||
|
||||
|
||||
def TST.OK (TEST)
|
||||
integer TST.OK, TEST
|
||||
string YN, ERR.TST
|
||||
YN = ucase$(chr$(inkey))
|
||||
if YN <> "N" then return
|
||||
on TEST goto 1,2,3,4,5,6,7,8,9,10,11,12,13
|
||||
1: ERR.TST = "CLEAR SCREEN" : goto EXIT
|
||||
2: ERR.TST = "HOME CURSOR" : goto EXIT
|
||||
3: ERR.TST = "ERASE TO END OF LINE" : goto EXIT
|
||||
4: ERR.TST = "ERASE TO END OF SCREEN" : goto EXIT
|
||||
5: ERR.TST = "SET CURSOR POSITION" : goto EXIT
|
||||
6: ERR.TST = "GET CURRENT CURSOR POSITION" : goto EXIT
|
||||
7: ERR.TST = "MOVE CURSOR UP ONE LINE" : goto EXIT
|
||||
8: ERR.TST = "MOVE CURSOR DOWN ONE LINE" : goto EXIT
|
||||
9: ERR.TST = "MOVE CURSOR RIGHT ONE COLUMN" : goto EXIT
|
||||
10: ERR.TST = "MOVE CURSOR LEFT ONE COLUMN" : goto EXIT
|
||||
11: ERR.TST = "ADD NEW LINE AND SCROLL SCREEN DOWN" : goto EXIT
|
||||
12: ERR.TST = "PRINT STRING IN REVERSE VIDEO MODE" : goto EXIT
|
||||
13: ERR.TST = "PRINT STRING IN BLINKING VIDEO MODE" : goto EXIT
|
||||
EXIT: call cls
|
||||
call prtctr("====> ABNORMAL TERMINATION <=====",10)
|
||||
call setcur(12,10)
|
||||
print using "TEST: [&] failed";ERR.TST
|
||||
call setcur(23,0) : stop
|
||||
fend
|
||||
|
||||
def PRT.ROW.NUM(I)
|
||||
integer I
|
||||
string L
|
||||
L = str$(I)
|
||||
call setcur(I,0) : print using "//: ";L;
|
||||
fend
|
||||
|
||||
def BLK.FILL
|
||||
integer BLK.FILL, I
|
||||
string L
|
||||
call cls : print TL;
|
||||
for I = 1 to 23
|
||||
call prt.row.num(I)
|
||||
print PAD;
|
||||
next I
|
||||
fend
|
||||
|
||||
\ ************************************
|
||||
\ * (1) TEST CLEAR SCREEN FUNCTION *
|
||||
\ ************************************
|
||||
|
||||
call BLK.FILL : TMP1$ = " Test CLEAR SCREEN Function "
|
||||
TMP2$ = " press any key "
|
||||
COL = int%((79-len(TMP1$))/2)
|
||||
call setcur(11,COL) : call prtblnk(TMP1$)
|
||||
call setcur(13,COL) : call prtrev(TMP2$)
|
||||
I = inkey
|
||||
call cls
|
||||
call prtctr(" Well, did it clear the screen? ",11)
|
||||
call TST.OK(1)
|
||||
|
||||
\ ************************************
|
||||
\ * (2) TEST HOME CURSOR FUNCTION *
|
||||
\ ************************************
|
||||
|
||||
TMP1$ = " HOME CURSOR TEST "
|
||||
call setcur(11,10) : print SP;
|
||||
COL = int%((79-len(TMP1$))/2)
|
||||
call setcur(11,COL) : call prtrev(TMP1$)
|
||||
call HOME
|
||||
print " <=== Is the cursor at Row 0, Column 0 ?";
|
||||
call HOME
|
||||
call TST.OK(2)
|
||||
|
||||
\ ***********************************
|
||||
\ * (3) TEST ERASE TO END OF LINE *
|
||||
\ ***********************************
|
||||
|
||||
TMP1$ = " ERASE TO END OF LINE "
|
||||
call BLK.FILL
|
||||
COL = int%((79-len(TMP1$))/2)
|
||||
call setcur(2,COL) : call prtblnk(TMP1$)
|
||||
call setcur(10,4) : call eraeol
|
||||
call setcur(11,4) : print \
|
||||
"Is the above line erased except for column # ? ";
|
||||
call TST.OK(3)
|
||||
|
||||
\ *************************************
|
||||
\ * (4) TEST ERASE TO END OF SCREEN *
|
||||
\ *************************************
|
||||
|
||||
TMP1$ = " ERASE NEXT LINE TO END OF SCREEN "
|
||||
COL = int%((79-len(TMP1$))/2)
|
||||
call BLK.FILL
|
||||
call setcur(2,COL) : call prtblnk(TMP1$)
|
||||
call setcur(10,5) : print \
|
||||
" ===> hit any key to erase <=== ";
|
||||
I = inkey : call eraeos
|
||||
print "....OK ? "; : call TST.OK(4)
|
||||
|
||||
\ **********************************
|
||||
\ * (5) TEST SET CURSOR POSITION *
|
||||
\ **********************************
|
||||
|
||||
TMP1$ = " SET CURSOR POSITION "
|
||||
COL = int%((79-len(TMP1$))/2)
|
||||
call BLK.FILL
|
||||
call setcur(2,COL) : call prtblnk(TMP1$)
|
||||
call setcur(9,0) : call prtrev(TL)
|
||||
call setcur(10,6) : print \
|
||||
" This message should begin with a space at Row 10, Col 6 ";
|
||||
call TST.OK(5)
|
||||
|
||||
\ ******************************************
|
||||
\ * (6) TEST GET CURRENT CURSOR POSITION *
|
||||
\ ******************************************
|
||||
|
||||
TMP1$ = " GET CURRENT CURSOR POSITION "
|
||||
COL = int%((79-len(TMP1$))/2)
|
||||
call BLK.FILL : COLS% = COL
|
||||
call setcur(2,COL) : call prtblnk(TMP1$)
|
||||
call setcur(11,0) : call prtrev(TL)
|
||||
call setcur(12,15)
|
||||
print " Hit any key to get current cursor position ";
|
||||
I = inkey : RET = getpos
|
||||
ROW = ret/256 : COL = ret-row*256
|
||||
call cls
|
||||
print TL;
|
||||
for I = 1 to 23
|
||||
call prt.row.num(I)
|
||||
next I
|
||||
call setcur(2,COLS%) : call prtrev(TMP1$)
|
||||
call setcur(5,10) : print "ROW =";ROW
|
||||
call setcur(7,10) : print "COLUMN =";COL
|
||||
call setcur(9,10)
|
||||
print "Is the above = ROW 12 COLUMN 60 ? ";
|
||||
call TST.OK(6)
|
||||
|
||||
\ *********************************
|
||||
\ * (7) TEST CURSOR UP FUNCTION *
|
||||
\ *********************************
|
||||
|
||||
TMP1$ = " UP CURSOR COMMAND "
|
||||
COL = int%((79-len(TMP1$))/2)
|
||||
call BLK.FILL
|
||||
call setcur(2,COL) : call prtblnk(TMP1$)
|
||||
call setcur(5,10) : print \
|
||||
" This test will print a space on Row 10, Column 10 ";
|
||||
call setcur(6,10) : print \
|
||||
" It will then issue the UP CURSOR command ";
|
||||
I = inkey
|
||||
call setcur(11,0) : call prtrev(TL)
|
||||
call setcur(10,10) : print " "; : call UPCUR : print \
|
||||
" This line should start with a space on Row 9, Column 11 ";
|
||||
call TST.OK(7)
|
||||
|
||||
\ ***********************************
|
||||
\ * (8) TEST CURSOR DOWN FUNCTION *
|
||||
\ ***********************************
|
||||
|
||||
TMP1$ = " DOWN CURSOR COMMAND "
|
||||
COL = int%((79-len(TMP1$))/2)
|
||||
call BLK.FILL
|
||||
call setcur(2,COL) : call prtblnk(TMP1$)
|
||||
call setcur(5,10) : print \
|
||||
" This test will print a space on Row 10, Column 10 ";
|
||||
call setcur(6,10) : print \
|
||||
" It will then issue the DOWN CURSOR command ";
|
||||
I = inkey
|
||||
call setcur(9,0) : call prtrev(TL)
|
||||
call setcur(10,10) : print " "; : call DWNCUR : print \
|
||||
" This line should start with a space on Row 11, Column 11 ";
|
||||
call TST.OK(8)
|
||||
|
||||
\ *********************************************
|
||||
\ * (9) TEST MOVING CURSOR RIGHT ONE COLUMN *
|
||||
\ *********************************************
|
||||
|
||||
TMP1$ = " MOVE CURSOR RIGHT ONE COLUMN "
|
||||
COL = int%((79-len(TMP1$))/2)
|
||||
call BLK.FILL
|
||||
call setcur(2,COL) : call prtblnk(TMP1$)
|
||||
call setcur(5,10) : print \
|
||||
" This test will print a space on Row 10, Column 10 ";
|
||||
call setcur(6,10) : print \
|
||||
" It will then issue the CURSOR RIGHT command ";
|
||||
I = inkey
|
||||
call setcur(9,0) : call prtrev(TL)
|
||||
call setcur(10,10) : print " "; : call CUR.RT : print \
|
||||
"This line will start on Row 10, Column 12 if OK ";
|
||||
call TST.OK(9)
|
||||
|
||||
\ ********************************************
|
||||
\ * (10) TEST MOVING CURSOR LEFT ONE COLUMN *
|
||||
\ ********************************************
|
||||
|
||||
TMP1$ = " MOVE CURSOR LEFT ONE COLUMN "
|
||||
COL = int%((79-len(TMP1$))/2)
|
||||
call BLK.FILL
|
||||
call setcur(2,COL) : call prtblnk(TMP1$)
|
||||
call setcur(5,10) : print \
|
||||
" This test will print a space on Row 10, Column 10 ";
|
||||
call setcur(6,10) : print \
|
||||
" It will then issue the CURSOR LEFT command ";
|
||||
I = inkey : call setcur(9,0) : call prtrev(TL)
|
||||
call setcur(10,10) : print " "; : call CUR.LT : print \
|
||||
"This line will start on Row 10, Column 10 if OK ";
|
||||
call TST.OK(10)
|
||||
|
||||
\ *************************************************
|
||||
\ * (11) TEST ADDING ONE LINE AND SCROLLING DOWN *
|
||||
\ *************************************************
|
||||
|
||||
TMP1$ = " ADD LINE "
|
||||
COL = int%((79-len(TMP1$))/2)
|
||||
call BLK.FILL
|
||||
call setcur(2,COL) : call prtblnk(TMP1$)
|
||||
call setcur(5,10) : print \
|
||||
" This test will go to Row 10 and Insert a New Line ";
|
||||
call setcur(6,10) : print \
|
||||
" The 10th line and below will be scrolled down ";
|
||||
I = inkey
|
||||
call setcur(10,0) : call ADDLINE
|
||||
call prtctr("Is this message on new line",getpos/256)
|
||||
call TST.OK(11)
|
||||
|
||||
\ ****************************************************
|
||||
\ * (12) TEST PRINTING STRING IN REVERSE VIDEO MODE *
|
||||
\ ****************************************************
|
||||
|
||||
call BLK.FILL : call setcur(10,4) : call ADDLINE
|
||||
TMP1$ = " IS THIS IN REVERSE VIDEO "
|
||||
COL = int%((79-len(TMP1$))/2)
|
||||
call setcur(10,COL) : call prtrev(TMP1$)
|
||||
call TST.OK(12)
|
||||
|
||||
\ *****************************************************
|
||||
\ * (13) TEST PRINTING STRING IN BLINKING VIDEO MODE *
|
||||
\ *****************************************************
|
||||
|
||||
call BLK.FILL : call setcur(10,5) : call ADDLINE
|
||||
call setcur(10,30) : call PRTBLNK("IS THIS BLINKING")
|
||||
call TST.OK(13)
|
||||
|
||||
|
||||
DS$ = " ***************************************"
|
||||
MSG$ = "====> T E S T C O M P L E T E <===="
|
||||
call cls
|
||||
H$ = chr$(6)
|
||||
HL$ = string$(78,H$)
|
||||
call setcur(1,1) : call prtblnk(HL$)
|
||||
for I = 2 to 21
|
||||
call setcur(I,1) : call prtblnk(H$)
|
||||
call setcur(I,78) : call prtblnk(H$)
|
||||
next I
|
||||
call setcur(22,1) : call prtblnk(HL$)
|
||||
|
||||
call setcur(2,2) : print left$(HL$,76);
|
||||
for I = 3 to 20
|
||||
call setcur(I,2) : print H$;
|
||||
call setcur(I,77) : print H$;
|
||||
next I
|
||||
call setcur(21,2) : print left$(HL$,76);
|
||||
|
||||
call prtctr(DS$,9)
|
||||
COL = int%((79-len(MSG$))/2)
|
||||
call setcur(10,COL) : call prtrev(MSG$)
|
||||
call prtctr(DS$,11)
|
||||
call setcur(23,0)
|
||||
stop
|
||||
end
|
||||
|
4
Digital Research CB-86 v2/GRAPHCOM.BAS
Normal file
4
Digital Research CB-86 v2/GRAPHCOM.BAS
Normal file
@ -0,0 +1,4 @@
|
||||
COMMON ?VIEW(2),?WIND(2),?P(2),?P1(2),?KAPU(2)
|
||||
COMMON ?PTSI%(1),?PTSO%(1),?CONT%(1),?INTI%(1),?INTO%(1)
|
||||
COMMON ?VWTX(2),?RVIW(2),?VX(1),?XN,?YN,?XW,?YW
|
||||
|
321
Digital Research CB-86 v2/GRAPHR.BAS
Normal file
321
Digital Research CB-86 v2/GRAPHR.BAS
Normal file
@ -0,0 +1,321 @@
|
||||
REM THIS IS A DEMONSTRATION PROGRAM FOR DRAWING
|
||||
REM PIE AND BAR CHARTS.
|
||||
REM
|
||||
REM PROGRAM NAME: GRAPHR.BAS
|
||||
REM
|
||||
%INCLUDE GRAPHCOM.BAS
|
||||
GRAPHIC OPEN 1
|
||||
CLEAR
|
||||
|
||||
REM If the device supports color fill, MAT FILL
|
||||
REM statements are used. Otherwise, MAT PLOT
|
||||
REM is used to draw figures.
|
||||
|
||||
IN.FL: INPUT "DOES THIS DEVICE SUPPORT COLOR FILL? Y/N: ";FILL.FLG$
|
||||
IF FILL.FLG$ = "Y" OR FILL.FLG$ = "N" THEN GOTO OK.FL
|
||||
PRINT "ENTER Y OR N, PLEASE"
|
||||
GOTO IN.FL
|
||||
OK.FL: PRINT "THANK-YOU"
|
||||
|
||||
REM Initialize the arrays used for drawing the
|
||||
REM slices in the pie chart. Two 100 element arrays
|
||||
REM are constructed for drawing a full circle. Each
|
||||
REM point in the arrays then represents one percent.
|
||||
|
||||
PRINT "CALCULATING OCCURRING --- PLEASE WAIT"
|
||||
DIM X.ARRAY(100)
|
||||
DIM Y.ARRAY(100)
|
||||
DIM A.ARRAY(72)
|
||||
DIM B.ARRAY(72)
|
||||
A.ARRAY(0) = .5
|
||||
B.ARRAY(0) = .5
|
||||
L.CIR = 0
|
||||
FOR I.ANGLE = 0 TO 6.28-.0628 STEP .0628
|
||||
X.ARRAY(L.CIR) = .5 + (.5 * COS(I.ANGLE))
|
||||
Y.ARRAY(L.CIR) = .5 + (.5 * SIN(I.ANGLE))
|
||||
L.CIR = L.CIR + 1
|
||||
NEXT I.ANGLE
|
||||
|
||||
REM Close the circle
|
||||
|
||||
X.ARRAY(L.CIR) = X.ARRAY(0)
|
||||
Y.ARRAY(L.CIR) = Y.ARRAY(0)
|
||||
GOTO START.IT
|
||||
|
||||
REM This function draws a slice beginning at the
|
||||
REM point represented by BEG.PER and extending
|
||||
REM through PER.CENT points. The color is set to
|
||||
REM COL.OR and the ASCII.ID prints as an identifier
|
||||
REM for the slice.
|
||||
|
||||
REM The function extracts the points from X.ARRAY
|
||||
REM and Y.ARRAY and places them in A.ARRAY and
|
||||
REM B.ARRAY. MAT FILL and MAT PLOT always begin
|
||||
REM drawing at the first elements of the arrays, so
|
||||
REM the slice must be extracted from the arrays.
|
||||
|
||||
REM The function makes provision for slices that
|
||||
REM exceed 71 points. MAT FILL and MAT PLOT allow
|
||||
REM a maximum element number of 72.
|
||||
|
||||
DEF DRAW.SLICE (BEG.PER,PER.CENT,COL.OR,ASCII.ID)
|
||||
REAL BEG.PER,PER.CENT,COL.OR
|
||||
STRING ASCII.ID
|
||||
L.CIR = 1
|
||||
SET COLOR COL.OR
|
||||
OVR.FLOW = 0
|
||||
|
||||
REM Setup for slices greater than 71 percent.
|
||||
|
||||
IF PER.CENT > 71 THEN SAVE.PER = 71:OVR.FLOW = 1\
|
||||
ELSE SAVE.PER = PER.CENT
|
||||
|
||||
REM Extract points from circle array.
|
||||
|
||||
BAK.UP: FOR CNT.ER = BEG.PER TO BEG.PER + SAVE.PER
|
||||
IN.DEX = CNT.ER
|
||||
IF CNT.ER > 100 THEN IN.DEX = CNT.ER - 100
|
||||
A.ARRAY(L.CIR) = X.ARRAY(IN.DEX)
|
||||
B.ARRAY(L.CIR) = Y.ARRAY(IN.DEX)
|
||||
L.CIR = L.CIR + 1
|
||||
NEXT CNT.ER
|
||||
|
||||
REM OVER.FLOW is 1 for a more than 71 percent slice.
|
||||
|
||||
IF OVR.FLOW <> 1 THEN GOTO OVER.A
|
||||
|
||||
REM FILL.FLG$ is "N" for non-color-fill devices.
|
||||
|
||||
IF FILL.FLG$ = "N" THEN MAT PLOT L.CIR-1: A.ARRAY,B.ARRAY\
|
||||
ELSE MAT FILL L.CIR-1: A.ARRAY,B.ARRAY
|
||||
OVR.FLOW = 0
|
||||
BEG.PER = BEG.PER + 71
|
||||
SAVE.PER = PER.CENT - 71
|
||||
IF FILL.FLG$ = "N" THEN L.CIR = 0 ELSE L.CIR = 1
|
||||
GOTO BAK.UP
|
||||
OVER.A: A.ARRAY(0) = .5
|
||||
B.ARRAY(0) = .5
|
||||
|
||||
REM The slice must be closed for MAT PLOT. MAT FILL
|
||||
REM closes automatically.
|
||||
|
||||
IF FILL.FLG$ = "N" THEN\
|
||||
A.ARRAY(L.CIR) = .5: \
|
||||
B.ARRAY(L.CIR) = .5: \
|
||||
MAT PLOT L.CIR: A.ARRAY,B.ARRAY \
|
||||
ELSE \
|
||||
MAT FILL L.CIR-1: A.ARRAY,B.ARRAY
|
||||
|
||||
REM Expand the viewport for printing the slice ID.
|
||||
REM The minimum character height is used to adjust
|
||||
REM the window so the slice ID will appear outside
|
||||
REM the slice perimeter.
|
||||
|
||||
SET VIEWPORT 1.0-Y.AXIS,1,0,1
|
||||
ADJ.IT = MIN.HGT/1.45
|
||||
SET WINDOW -ADJ.IT,1+ADJ.IT,-ADJ.IT,1+ADJ.IT
|
||||
|
||||
REM MID.PT is the center elements in the slice. This
|
||||
REM is the position where the ID is printed.
|
||||
|
||||
MID.PT = INT(BEG.PER+(PER.CENT/2))
|
||||
X.AXIS = X.ARRAY(MID.PT)
|
||||
Y.AXIS = Y.ARRAY(MID.PT)
|
||||
GRAPHIC PRINT AT (X.AXIS,Y.AXIS): ASCII.ID
|
||||
SET WINDOW 0,1,0,1
|
||||
RETURN
|
||||
FEND
|
||||
|
||||
REM The first portion of the program allows entry
|
||||
REM of up to 9 slices. Enter the item number (1-9)
|
||||
REM and press the return key. Then type the slice
|
||||
REM description (up to 6 characters), the dollar
|
||||
REM value of the slice, and the color code for
|
||||
REM the slice.
|
||||
|
||||
REM The following entries are a good sample:
|
||||
|
||||
REM 1 <return>
|
||||
REM RENT,550,1 <return>
|
||||
REM 2 <return>
|
||||
REM FOOD,450,2 <return>
|
||||
REM 3 <return>
|
||||
REM CAR,225,3 <return>
|
||||
REM 4 <return>
|
||||
REM OTHER,750,4 <return>
|
||||
|
||||
REM This sets up a graph of four items--rent of
|
||||
REM $550 in color 1, food for $450 in color 2, etc.
|
||||
|
||||
REM Terminate the input by typing 0 in response
|
||||
REM to the ITEM NUMBER(0 TO FINISH): prompt.
|
||||
|
||||
REM After the 0 entry, the program calculates the
|
||||
REM percentages and prints a listing of the entries.
|
||||
|
||||
REM Corrections may be made by entering the
|
||||
REM item number to be corrected and inputting
|
||||
REM the correct data.
|
||||
|
||||
START.IT: PRINT
|
||||
DIM ITM.DESC$(9)
|
||||
DIM ITM.VALUE(9)
|
||||
DIM ITM.COLOR(9)
|
||||
DIM ITM.PERC(9)
|
||||
GO.A: PRINT "ENTER AN ITEM NUMBER FROM 1 TO 9 TO ADD OR CHANGE"
|
||||
PRINT
|
||||
PRINT "THEN ENTER--DESCRIPTION,AMOUNT,COLOR,RETURN"
|
||||
PRINT
|
||||
PRINT " DESCRIPTION IS THE SLICE DESCRIPTION"
|
||||
PRINT " AMOUNT IS THE QUANTITY/AMOUNT OF THE SLICE"
|
||||
PRINT " COLOR IS THE COLOR NUMBER TO USE FOR THE SLICE"
|
||||
PRINT " RETURN MEANS TO PRESS THE RETURN KEY"
|
||||
PRINT
|
||||
PRINT "THE FIELDS ARE SEPARATED BY COMMAS"
|
||||
PRINT
|
||||
IN.IT: INPUT "ITEM NUMBER(0 TO FINISH): "; ITM.NUMBER%
|
||||
IF ITM.NUMBER% = 0 THEN GOTO PRT.EM
|
||||
IF ITM.NUMBER% > 0 AND ITM.NUMBER% < 10 THEN GOTO OKAY.IN
|
||||
PRINT "THE ITEM NUMBER MUST BE FROM 1 TO 9"
|
||||
GOTO IN.IT
|
||||
OKAY.IN: IF ITM.VALUE(ITM.NUMBER%) = 0 THEN GOTO NEW.IN
|
||||
PRINT ITM.DESC$(ITM.NUMBER%),ITM.VALUE(ITM.NUMBER%),
|
||||
PRINT ITM.COLOR(ITM.NUMBER%)
|
||||
NEW.IN: INPUT "DESC,AMOUNT,COLOR: ";DESC.IN$,VAL.IN,CLR.IN%
|
||||
ITM.DESC$(ITM.NUMBER%) = DESC.IN$
|
||||
ITM.VALUE(ITM.NUMBER%) = VAL.IN
|
||||
ITM.COLOR(ITM.NUMBER%) = CLR.IN%
|
||||
PRINT
|
||||
GOTO IN.IT
|
||||
PRT.EM: TOT.VAL = 0
|
||||
|
||||
REM Calculate the total for percentages.
|
||||
|
||||
FOR CNT.R = 1 TO 9
|
||||
TOT.VAL = TOT.VAL + ITM.VALUE(CNT.R)
|
||||
NEXT CNT.R
|
||||
PRINT
|
||||
|
||||
REM Print the item list with percentages.
|
||||
|
||||
FOR CNT.R = 1 TO 9
|
||||
IF ITM.VALUE(CNT.R) <> 0 THEN\
|
||||
ITM.PERC(CNT.R) = ITM.VALUE(CNT.R)/TOT.VAL:\
|
||||
ITM.PERC(CNT.R) = INT((100*ITM.PERC(CNT.R))+.5):\
|
||||
PRINT CNT.R;"-";ITM.DESC$(CNT.R),ITM.VALUE(CNT.R),:\
|
||||
PRINT ITM.COLOR(CNT.R);" ";ITM.PERC(CNT.R);"%"
|
||||
NEXT CNT.R
|
||||
PRINT:PRINT "TOTAL VALUE: ";TOT.VAL
|
||||
PRINT:INPUT "DRAW THE GRAPH? ";Y.N$
|
||||
IF Y.N$ <> "Y" THEN GOTO IN.IT
|
||||
CLEAR
|
||||
BEG.PER = 0
|
||||
|
||||
REM THE MINIMUM CHARACTER HEIGHT FOR THE DEVICE
|
||||
REM IS USED TO ESTABLISH A BORDER AROUND THE CIRCLE
|
||||
REM WHERE THE SLICE ID (THE ITEM NUMBER) CAN BE
|
||||
REM PRINTED.
|
||||
|
||||
SET CHARACTER HEIGHT 0
|
||||
ASK CHARACTER HEIGHT MIN.HGT
|
||||
MIN.HGT = 2 * MIN.HGT
|
||||
FOR CNT.R = 1 TO 9
|
||||
IF ITM.VALUE(CNT.R) = 0 THEN GOTO NXT.CNT
|
||||
|
||||
REM Determine the aspect ratio and square the device.
|
||||
REM A border is left around the viewport for the
|
||||
REM slice ID. The viewport is set to the right
|
||||
REM of the device.
|
||||
|
||||
ASK DEVICE X.AXIS,Y.AXIS
|
||||
SET VIEWPORT 1-Y.AXIS+MIN.HGT,1-MIN.HGT,MIN.HGT,1-MIN.HGT
|
||||
DESC.IN$ = ITM.DESC$(CNT.R)
|
||||
VAL.IN = ITM.VALUE(CNT.R)
|
||||
CLR.IN% = ITM.COLOR(CNT.R)
|
||||
PER.CENT = ITM.PERC(CNT.R)
|
||||
CALL DRAW.SLICE (BEG.PER,PER.CENT,CLR.IN%,STR$(CNT.R))
|
||||
BEG.PER = BEG.PER + PER.CENT
|
||||
SET VIEWPORT 0,1,0,1
|
||||
S.1$ = DESC.IN$+" "+STR$(PER.CENT)+"%"
|
||||
GRAPHIC PRINT AT (0,1-(CNT.R/10)):S.1$
|
||||
NXT.CNT: NEXT CNT.R
|
||||
|
||||
REM Is the graph filled? The percentage calculation
|
||||
REM can be less than 100 percent due to roundoff.
|
||||
|
||||
IF BEG.PER >= 100 THEN GOTO BAR.A
|
||||
PER.CENT = 100 - BEG.PER
|
||||
DESC.IN$ = " "
|
||||
ASK DEVICE X.AXIS,Y.AXIS
|
||||
SET VIEWPORT 1-Y.AXIS+MIN.HGT,1-MIN.HGT,MIN.HGT,1-MIN.HGT
|
||||
CALL DRAW.SLICE (BEG.PER,PER.CENT,CLR.IN%,DESC.IN$)
|
||||
|
||||
REM This routine draws a simple bar chart of the
|
||||
REM data. The window range is set to 1/3 greater
|
||||
REM than the largest item in the array. This
|
||||
REM technique makes the largest bar draw across
|
||||
REM 75% of the viewport.
|
||||
|
||||
BAR.A: KEY%=CONCHAR%
|
||||
DIM BAR.X(4)
|
||||
DIM BAR.Y(4)
|
||||
SET VIEWPORT 0,1,0,1
|
||||
SET WINDOW 0,1,0,1
|
||||
SET CHARACTER HEIGHT 0
|
||||
ASK CHARACTER HEIGHT MIN.HGT
|
||||
CLEAR
|
||||
SET JUSTIFY .5,0
|
||||
SET COLOR 1
|
||||
GRAPHIC PRINT AT (.5,.99-MIN.HGT):"BAR CHART"
|
||||
SET JUSTIFY 0,0
|
||||
MAX.VAL = 0
|
||||
|
||||
REM Determine the maximum percentage.
|
||||
|
||||
FOR CNT.R = 1 TO 9
|
||||
IF MAX.VAL < ITM.PERC(CNT.R) THEN\
|
||||
MAX.VAL = ITM.PERC(CNT.R)
|
||||
NEXT CNT.R
|
||||
MAX.VAL = 1.33 * MAX.VAL
|
||||
|
||||
REM Scale the window. The X axis is 1/3 larger
|
||||
REM than the largest item to be graphed.
|
||||
REM The Y axis is scaled to 10 lines.
|
||||
|
||||
SET WINDOW 0,MAX.VAL,0,10
|
||||
SET CHARACTER HEIGHT 0
|
||||
ASK CHARACTER HEIGHT MIN.HGT
|
||||
|
||||
REM Draw the items.
|
||||
|
||||
FOR CNT.R = 1 TO 9
|
||||
IF ITM.VALUE(CNT.R) = 0 THEN GOTO NXT.A
|
||||
SET COLOR ITM.COLOR(CNT.R)
|
||||
P.LINE = 10 - CNT.R
|
||||
S.1$ = ITM.DESC$(CNT.R)+"-"+STR$(ITM.PERC(CNT.R))+"%"
|
||||
IF ITM.VALUE(CNT.R) <> ITM.PERC(CNT.R) THEN\
|
||||
S.1$ = S.1$+" $"+STR$(ITM.VALUE(CNT.R))
|
||||
GRAPHIC PRINT AT (0,P.LINE): S.1$
|
||||
|
||||
REM Setup the BAR.X and BAR.Y arrays to draw the
|
||||
REM bar. MAX.VAL is the percentage for the item.
|
||||
REM The window scaling automatically scales the
|
||||
REM bar. No special calculations are required.
|
||||
|
||||
MAX.VAL = ITM.PERC(CNT.R)
|
||||
TOP = P.LINE - .1
|
||||
BOT = TOP - .4
|
||||
BAR.Y(0) = BOT
|
||||
BAR.Y(1) = TOP
|
||||
BAR.X(2) = MAX.VAL
|
||||
BAR.Y(2) = TOP
|
||||
BAR.X(3) = MAX.VAL
|
||||
BAR.Y(3) = BOT
|
||||
BAR.Y(4) = BOT
|
||||
IF FILL.FLG$ = "N" THEN MAT PLOT 4: BAR.X,BAR.Y\
|
||||
ELSE MAT FILL 3: BAR.X,BAR.Y
|
||||
NXT.A: NEXT CNT.R
|
||||
KEY% = CONCHAR%
|
||||
STOP
|
||||
END
|
||||
|
BIN
Digital Research CB-86 v2/LIB86.EXE
Normal file
BIN
Digital Research CB-86 v2/LIB86.EXE
Normal file
Binary file not shown.
BIN
Digital Research CB-86 v2/LINK86.EXE
Normal file
BIN
Digital Research CB-86 v2/LINK86.EXE
Normal file
Binary file not shown.
129
Digital Research CB-86 v2/PCSCRN.DEF
Normal file
129
Digital Research CB-86 v2/PCSCRN.DEF
Normal file
@ -0,0 +1,129 @@
|
||||
\ ********************************************************
|
||||
\ * CB86 EXTERNAL FUNCTION DEFINITIONS FOR PC DOS v1.1 *
|
||||
\ ********************************************************
|
||||
\ * REQUIRED FOR PC DOS SCREEN CONTROL *
|
||||
\ ********************************************************
|
||||
\ * FILE: PCSCRN.DEF *
|
||||
\ ********************************************************
|
||||
|
||||
|
||||
|
||||
\ *******************************************************
|
||||
\ * GET CURRENT CURSOR POSITION - To Extract Position *
|
||||
\ * ROW = returned value / 256 *
|
||||
\ * COLUMN = returned value - ROW * 256 *
|
||||
\ *******************************************************
|
||||
|
||||
def GETPOS external
|
||||
integer GETPOS
|
||||
fend
|
||||
|
||||
\ ******************************************
|
||||
\ * SET CURSOR TO POSITION - ROW, COLUMN *
|
||||
\ * ROW and COLUMN are relative to ZERO *
|
||||
\ ******************************************
|
||||
|
||||
def SETCUR (ROW, COL) external
|
||||
integer SETCUR, ROW, COL
|
||||
fend
|
||||
|
||||
\ **************************************
|
||||
\ * HOME CURSOR TO UPPER LEFT CORNER *
|
||||
\ **************************************
|
||||
|
||||
def HOME external
|
||||
integer HOME
|
||||
fend
|
||||
|
||||
\ *************************
|
||||
\ * CLEAR ENTIRE SCREEN *
|
||||
\ *************************
|
||||
|
||||
def CLS external
|
||||
integer CLS
|
||||
fend
|
||||
|
||||
\ *****************************
|
||||
\ * MOVE CURSOR UP ONE LINE *
|
||||
\ *****************************
|
||||
|
||||
def UPCUR external
|
||||
integer UPCUR
|
||||
fend
|
||||
|
||||
\ *******************************
|
||||
\ * MOVE CURSOR DOWN ONE LINE *
|
||||
\ *******************************
|
||||
|
||||
def DWNCUR external
|
||||
integer DWNCUR
|
||||
fend
|
||||
|
||||
\ **********************************
|
||||
\ * MOVE CURSOR RIGHT ONE COLUMN *
|
||||
\ **********************************
|
||||
|
||||
def CUR.RT external
|
||||
integer CUR.RT
|
||||
fend
|
||||
|
||||
\ *********************************
|
||||
\ * MOVE CURSOR LEFT ONE COLUMN *
|
||||
\ *********************************
|
||||
|
||||
def CUR.LT external
|
||||
integer CUR.LT
|
||||
fend
|
||||
|
||||
\ ********************************************
|
||||
\ * INSERT NEW LINE AND SCROLL SCREEN DOWN *
|
||||
\ ********************************************
|
||||
|
||||
def ADDLINE external
|
||||
integer ADDLINE
|
||||
fend
|
||||
|
||||
\ *******************************************************
|
||||
\ * ERASE FROM CURRENT CURSOR POSITION TO END OF LINE *
|
||||
\ *******************************************************
|
||||
|
||||
def ERAEOL external
|
||||
integer ERAEOL
|
||||
fend
|
||||
|
||||
\ *******************************************
|
||||
\ * ERASE FROM NEXT LINE TO END OF SCREEN *
|
||||
\ *******************************************
|
||||
|
||||
def ERAEOS external
|
||||
integer ERAEOS
|
||||
fend
|
||||
|
||||
\ *****************************************
|
||||
\ * PRINT STRING IN SELECTED VIDEO MODE *
|
||||
\ * S$ = print string M = mode *
|
||||
\ * mode 007h = Normal Video *
|
||||
\ * mode 070h = Reverse Video *
|
||||
\ * mode 087h = Blinking Video *
|
||||
\ *****************************************
|
||||
|
||||
def PRTSTR (S$,M) external
|
||||
integer PRTSTR, M
|
||||
fend
|
||||
|
||||
\ ****************************************
|
||||
\ * PRINT STRING IN REVERSE VIDEO MODE *
|
||||
\ ****************************************
|
||||
|
||||
def PRTREV (S$) external
|
||||
integer PRTREV
|
||||
fend
|
||||
|
||||
\ *****************************************
|
||||
\ * PRINT STRING IN BLINKING VIDEO MODE *
|
||||
\ *****************************************
|
||||
|
||||
def PRTBLNK (S$) external
|
||||
integer PRTBLNK
|
||||
fend
|
||||
|
BIN
Digital Research CB-86 v2/PCSCRN.L86
Normal file
BIN
Digital Research CB-86 v2/PCSCRN.L86
Normal file
Binary file not shown.
BIN
Digital Research CB-86 v2/RASM86.EXE
Normal file
BIN
Digital Research CB-86 v2/RASM86.EXE
Normal file
Binary file not shown.
643
Digital Research CB-86 v2/READ.ME
Normal file
643
Digital Research CB-86 v2/READ.ME
Normal file
@ -0,0 +1,643 @@
|
||||
----------------------------------------------------------------
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| ================================================ |
|
||||
| | | |
|
||||
| | | |
|
||||
| | ***** CBASIC Compiler (CB86) ***** | |
|
||||
| | | |
|
||||
| | for the IBM Personal Computer | |
|
||||
| | Disk Operating System | |
|
||||
| | | |
|
||||
| | --------------- | |
|
||||
| | | |
|
||||
| | READ.ME File Notes | |
|
||||
| | | |
|
||||
| | - June 1983 - | |
|
||||
| | | |
|
||||
| | Digital Research Inc. | |
|
||||
| | P.O. Box 579 | |
|
||||
| | Pacific Grove, CA 93950 | |
|
||||
| | | |
|
||||
| ================================================ |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| This file presents enhancements and modifications |
|
||||
| made to CBASIC Compiler software and documentation. |
|
||||
| Changes described in this file apply to CBASIC |
|
||||
| Compiler (CB86) Version 2.0 and supercede existing |
|
||||
| product documentation. |
|
||||
| |
|
||||
| You can print the information in this file on your |
|
||||
| line printer using 8 by 11 inch paper with the |
|
||||
| printer set to 6 lines per inch. You can trim the |
|
||||
| pages along the dotted lines and place the pages |
|
||||
| in your product documentation binder. |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
| CBASIC Compiler (CB86) READ.ME File Notes June 1983 |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Table of Contents |
|
||||
| ================================================ |
|
||||
| |
|
||||
| Escape Sequences and Function Keys . . . . . 1 |
|
||||
| CHAIN Statement . . . . . . . . . . . . . . . 2 |
|
||||
| DATE$ Function (NEW!) . . . . . . . . . . . . 3 |
|
||||
| TIME$ Function (NEW!) . . . . . . . . . . . . 4 |
|
||||
| Graphics Extension Error Messages (NEW!) . . 5 |
|
||||
| |
|
||||
| ================================================ |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| i. |
|
||||
| |
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
| CBASIC Compiler (CB86) READ.ME File Notes |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Escape Sequences |
|
||||
| ================================================ |
|
||||
| |
|
||||
| IBM Personal Computer DOS Version 1.1 does not |
|
||||
| interpret ANSI standard escape sequences. |
|
||||
| Therefore, programs that attempt to handle screen |
|
||||
| displays using escape sequences for cursor control |
|
||||
| do not execute properly. |
|
||||
| |
|
||||
| |
|
||||
| Function Keys |
|
||||
| ================================================ |
|
||||
| |
|
||||
| This release of CBASIC Compiler does not support |
|
||||
| the function keys on the IBM Personal Computer |
|
||||
| keyboard. When you press a function key, a |
|
||||
| two-character sequence consisting of a zero and a |
|
||||
| second character is sent to the computer. CBASIC |
|
||||
| Compiler does not detect the leading zero. |
|
||||
| Therefore, any use of a function key in a CBASIC |
|
||||
| program will fail. Function keys are interpreted |
|
||||
| as regular keys within a CBASIC program. |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Page 1 |
|
||||
| |
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
| CBASIC Compiler (CB86) READ.ME File Notes CHAIN Statement |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| CHAIN Statement |
|
||||
| =============================================== |
|
||||
| |
|
||||
| The CHAIN statement loads another program into |
|
||||
| memory and starts execution. |
|
||||
| |
|
||||
| |
|
||||
| Syntax: CHAIN <filespec> |
|
||||
| |
|
||||
| |
|
||||
| Explanation: The CHAIN statement can load two types |
|
||||
| of programs - an overlay program generated by the |
|
||||
| linker, or a directly executable file. CHAIN can |
|
||||
| load files generated by languages other than CBASIC. |
|
||||
| However, before you chain to an overlay file, the |
|
||||
| linker must create that overlay and the root |
|
||||
| program at the same time. |
|
||||
| |
|
||||
| The filespec can be a string expression, a variable, |
|
||||
| or a constant. |
|
||||
| |
|
||||
| When a program chains to a second program, all open |
|
||||
| files in the original program are closed and all |
|
||||
| data is reinitialized to 0. Refer to the |
|
||||
| Programming Guide for more information on chaining |
|
||||
| modules and programs. |
|
||||
| |
|
||||
| |
|
||||
| Examples: CHAIN "B:AVERAGES" |
|
||||
| |
|
||||
| CHAIN NEW.PROG$ |
|
||||
| |
|
||||
| TOTALS$ = "ACCOUNTS.OVL" |
|
||||
| |
|
||||
| CHAIN CDRIVE$ + TOTAL$ |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Page 2 |
|
||||
| |
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
| CBASIC Compiler (CB86) READ.ME File Notes DATE$ Function |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| DATE$ Function |
|
||||
| =============================================== |
|
||||
| |
|
||||
| The DATE$ function returns a string indicating the |
|
||||
| current year, month, and day set through the |
|
||||
| operating system. |
|
||||
| |
|
||||
| |
|
||||
| Syntax: a$ = DATE$ |
|
||||
| |
|
||||
| |
|
||||
| Explanation: DATE$ returns a six character string |
|
||||
| in the form YYMMDD. YY is the last two digits of |
|
||||
| a year reference, such as 84 for 1984. MM is one |
|
||||
| of twelve digit combinations representing the |
|
||||
| month such as 02 for February or 11 for November. |
|
||||
| DD is one of thirty-one digit combinations |
|
||||
| representing the day of the month. The string that |
|
||||
| DATE$ returns is undefined if the operating system |
|
||||
| is set to a date later than December 31, 1999 or |
|
||||
| earlier than January 1, 1978. |
|
||||
| |
|
||||
| If your operating system does not support time and |
|
||||
| date functions, the CBASIC DATE$ function returns |
|
||||
| a string consisting of six blanks. Refer to your |
|
||||
| operating system manuals to see if your operating |
|
||||
| system supports time and date functions. |
|
||||
| |
|
||||
| |
|
||||
| Example: CURRDATE$ = DATE$ |
|
||||
| PRINT "Today's date is: "; CURRDATE$ |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Page 3 |
|
||||
| |
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
| CBASIC Compiler (CB86) READ.ME File Notes TIME$ Function |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| TIME$ Function |
|
||||
| ================================================ |
|
||||
| |
|
||||
| The TIME$ function returns a string indicating the |
|
||||
| current time of day. |
|
||||
| |
|
||||
| |
|
||||
| Syntax: a$ = TIME$ |
|
||||
| |
|
||||
| |
|
||||
| Explanation: TIME$ returns a six character string |
|
||||
| of the form HHMMSS. HH is one of 24 digit |
|
||||
| combinations representing the hour, such as 06 for |
|
||||
| 6:00 AM or 15 for 3:00 PM. MM is one of sixty |
|
||||
| digit combinations representing the minute. SS is |
|
||||
| one of sixty digit combinations representing the |
|
||||
| second. |
|
||||
| |
|
||||
| If your operating system does not support time and |
|
||||
| date functions, the CBASIC TIME$ function returns a |
|
||||
| string consisting of six blanks. Refer to your |
|
||||
| operating system manuals to see if your operating |
|
||||
| system supports time and date functions. |
|
||||
| |
|
||||
| |
|
||||
| Example: CURRTIME$ = TIME$ |
|
||||
| PRINT "The current time is: "; CURRTIME$ |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Page 4 |
|
||||
| |
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
| CBASIC Compiler (CB86) READ.ME File Notes Graphics Errors |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Graphics Extension Error Messages |
|
||||
| ================================================ |
|
||||
| |
|
||||
| The following error messages indicate compilation |
|
||||
| errors that can occur during compilation of a |
|
||||
| graphics statement in a program. Compilation |
|
||||
| continues after the error is recorded. |
|
||||
| |
|
||||
| Error numbers 180 through 240 inclusive are |
|
||||
| reserved for use with the CBASIC Compiler |
|
||||
| graphics extention. |
|
||||
| |
|
||||
| |
|
||||
| Error Meaning |
|
||||
| |
|
||||
| 180 A left parenthesis is missing. A left |
|
||||
| parenthesis is inserted. |
|
||||
| |
|
||||
| 181 A right parenthesis is missing. A right |
|
||||
| parenthesis is inserted. |
|
||||
| |
|
||||
| 182 A comma is missing in a PLOT statement. |
|
||||
| A comma is inserted. |
|
||||
| |
|
||||
| 183 The keyword STYLE is missing in a SET or |
|
||||
| ASK statement. STYLE is inserted. |
|
||||
| |
|
||||
| 184 A comma is missing in a SET statement. A |
|
||||
| comma is inserted. |
|
||||
| |
|
||||
| 185 The keyword HEIGHT is missing in a SET or |
|
||||
| ASK CHARACTER statement. HEIGHT is |
|
||||
| inserted. |
|
||||
| |
|
||||
| 186 The keyword ANGLE is missing in a SET or |
|
||||
| ASK TEXT statement. ANGLE is inserted. |
|
||||
| |
|
||||
| 187 A comma is missing in a SET or ASK WINDOW |
|
||||
| statement. A comma is inserted. |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Page 5 |
|
||||
| |
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
| CBASIC Compiler (CB86) READ.ME File Notes Graphics Errors |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| 188 A comma is missing in a SET or ASK |
|
||||
| VIEWPORT statement. A comma is inserted. |
|
||||
| |
|
||||
| 189 The keyword PAGE is missing in a SET |
|
||||
| statement. PAGE is inserted. |
|
||||
| |
|
||||
| 190 Not used. |
|
||||
| |
|
||||
| 191 The keyword COUNT is missing in a ASK |
|
||||
| STYLE statement. COUNT is inserted. |
|
||||
| |
|
||||
| 192 A comma is missing in an ASK statement. |
|
||||
| A comma is inserted. |
|
||||
| |
|
||||
| 193 Not used. |
|
||||
| |
|
||||
| 194 Not used. |
|
||||
| |
|
||||
| 195 The keyword COUNT is missing in a SET |
|
||||
| COLOR statement. COLOR is inserted. |
|
||||
| |
|
||||
| 196 Not used. |
|
||||
| |
|
||||
| 197 Not used. |
|
||||
| |
|
||||
| 198 Not used. |
|
||||
| |
|
||||
| 199 Not used. |
|
||||
| |
|
||||
| 200 Not used. |
|
||||
| |
|
||||
| 201 Not used. |
|
||||
| |
|
||||
| 202 Not used. |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Page 6 |
|
||||
| |
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
| CBASIC Compiler (CB86) READ.ME File Notes Graphics Errors |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| 203 A comma is missing in an GRAPHIC statement. |
|
||||
| A comma is inserted. |
|
||||
| |
|
||||
| 204 The keyword following GRAPHIC is unexpected. |
|
||||
| INPUT is inserted. |
|
||||
| |
|
||||
| 205 A left parenthesis is missing in a GRAPHIC |
|
||||
| statement. A left parenthesis is inserted. |
|
||||
| |
|
||||
| 206 A right parenthesis is missing in a GRAPHIC |
|
||||
| statement. A right parenthesis is inserted. |
|
||||
| |
|
||||
| 207 A colon is missing in a GRAPHIC statement. |
|
||||
| A colon is inserted. |
|
||||
| |
|
||||
| 208 The variable in an ASK statement is of type |
|
||||
| real or string. An integer variable is |
|
||||
| required. |
|
||||
| |
|
||||
| 209 The variable in an ASK statement is of type |
|
||||
| integer or string. A real variable is |
|
||||
| required. |
|
||||
| |
|
||||
| 210 The variable in an ASK statement is of type |
|
||||
| integer or real. A string variable is |
|
||||
| required. |
|
||||
| |
|
||||
| 211 Not used. |
|
||||
| |
|
||||
| 212 Not used. |
|
||||
| |
|
||||
| 213 Not used. |
|
||||
| |
|
||||
| 214 Not used. |
|
||||
| |
|
||||
| 215 Not used. |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Page 7 |
|
||||
| |
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
| CBASIC Compiler (CB86) READ.ME File Notes Graphics Errors |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| 216 A comma is missing in a GRAPHIC statement. |
|
||||
| A comma is inserted. |
|
||||
| |
|
||||
| 217 The variable in a MAT statement is of type |
|
||||
| integer or string. A real variable is |
|
||||
| required. |
|
||||
| |
|
||||
| 218 Not used. |
|
||||
| |
|
||||
| 219 Not used. |
|
||||
| |
|
||||
| 220 Not used. |
|
||||
| |
|
||||
| 221 The keyword following MAT is unexpected. |
|
||||
| FILL is inserted. |
|
||||
| |
|
||||
| 222 A colon is missing in a MAT statement. A colon |
|
||||
| is inserted. |
|
||||
| |
|
||||
| 223 An identifier is missing in a MAT statement. |
|
||||
| An identifier is inserted. |
|
||||
| |
|
||||
| 224 A comma is missing in a MAT statement. A |
|
||||
| comma is inserted. |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| VVVVVVV |
|
||||
| VVVVV |
|
||||
| VVV |
|
||||
| VVV |
|
||||
| VVV |
|
||||
| VVVVV |
|
||||
| VVV |
|
||||
| V |
|
||||
| |
|
||||
| END OF READ.ME FILE |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Page 8 |
|
||||
| |
|
||||
----------------------------------------------------------------
|
||||
|
1052
Digital Research CB-86 v2/READ.ME1
Normal file
1052
Digital Research CB-86 v2/READ.ME1
Normal file
File diff suppressed because it is too large
Load Diff
852
Digital Research CB-86 v2/READ.ME2
Normal file
852
Digital Research CB-86 v2/READ.ME2
Normal file
@ -0,0 +1,852 @@
|
||||
------------------------------------------------------------------
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| ================================================ |
|
||||
| | | |
|
||||
| | | |
|
||||
| | ***** CBASIC Compiler CB86 ***** | |
|
||||
| | | |
|
||||
| | with GSX-86 Graphics Extensions | |
|
||||
| | | |
|
||||
| | for the IBM Personal Computer | |
|
||||
| | Disk Operating System | |
|
||||
| | | |
|
||||
| | --------------- | |
|
||||
| | | |
|
||||
| | READ.ME File Notes | |
|
||||
| | | |
|
||||
| | (File #2 of 2) | |
|
||||
| | | |
|
||||
| | - January 1984 - | |
|
||||
| | | |
|
||||
| | Digital Research Inc. | |
|
||||
| | P.O. Box 579 | |
|
||||
| | Pacific Grove, CA 93950 | |
|
||||
| | | |
|
||||
| ================================================ |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| This file describes enhancements and modifications |
|
||||
| made to the Digital Research CBASIC Compiler - CB86 |
|
||||
| with GSX-86 Graphics Extensions. Changes described |
|
||||
| in this file apply to GSX-86 software Version 1.0, |
|
||||
| the "GSX-86 User's Guide for the IBM Personal |
|
||||
| Computer Disk Operating System" First Edition: |
|
||||
| August 1983, and the "CBASIC Compiler Language |
|
||||
| Graphics Guide" First Edition May 1983. |
|
||||
| |
|
||||
| You can print the information in this file on your |
|
||||
| line printer using 8 by 11 inch paper with the |
|
||||
| printer set to 6 lines per inch. You can trim the |
|
||||
| pages along the dotted lines and place the pages |
|
||||
| in your product documentation binder. NOTE: This |
|
||||
| file contains TABS which must be expanded. |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
__________________________________________________________________
|
||||
| CBASIC Compiler - CB86 READ.ME File Notes January 1984 |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| TABLE of CONTENTS |
|
||||
| ====================================================== |
|
||||
| |
|
||||
| GSX-86 SOFTWARE NOTES . . . . . . . . . . . . Page 1 |
|
||||
| CBASIC GRAPHICS GUIDE NOTES . . . . . . . . . Page 3 |
|
||||
| CBASIC GRAPHICS EXTENSION ERROR MESSAGES . . . Page 5 |
|
||||
| GSX-86 USER'S GUIDE NOTES . . . . . . . . . . Page 8 |
|
||||
| THE GSX-86 PROGRAMMER'S TOOL KIT . . . . . . . Page 9 |
|
||||
| Language Binding Software and Documentation . Page 10 |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Page i. |
|
||||
| |
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------
|
||||
| CBASIC Compiler - CB86 READ.ME File Notes January 1984 |
|
||||
| |
|
||||
| |
|
||||
| GSX-86 SOFTWARE NOTES |
|
||||
| =========================================== |
|
||||
| |
|
||||
| o To use GSX-86, you must have Version 1.1 or later |
|
||||
| versions of IBM Personal Computer DOS. |
|
||||
| |
|
||||
| o The file GRAPHICS.EXE, described in your GSX-86 User's |
|
||||
| Guide on page 3-1, has been replaced on your product |
|
||||
| disk with the file GSX.EXE. Use GSX.EXE with the |
|
||||
| following command to install GSX-86: A>GSX |
|
||||
| |
|
||||
| o The following table defines the six monitor driver |
|
||||
| files for the IBM Personal Computer. Each driver is |
|
||||
| described in detail following this table. This |
|
||||
| information replaces monitor driver descriptions in |
|
||||
| Section 4 of the GSX-86 User's Guide. |
|
||||
| |
|
||||
| Monitor Filename Support |
|
||||
| ------------------------------------------------------ |
|
||||
| Monochrome IBMMM1P1.SYS IBM Color/Graphics Monitor |
|
||||
| Adaptor Card in monochrome |
|
||||
| mode and PC Mouse by Mouse |
|
||||
| Systems. |
|
||||
| |
|
||||
| IBMMMSP1.SYS IBM Color/Graphics Monitor |
|
||||
| Adaptor Card in monochrome |
|
||||
| mode and Microsoft Mouse. |
|
||||
| |
|
||||
| IBMHM1P1.SYS Hercules Graphics Card |
|
||||
| with PC Mouse by Mouse |
|
||||
| Systems. |
|
||||
| |
|
||||
| IBMHMSP1.SYS Hercules Graphics Card and |
|
||||
| Microsoft Mouse. |
|
||||
| |
|
||||
| Color IBMCM1P1.SYS IBM Color/Graphics Monitor |
|
||||
| Adaptor Card in color mode |
|
||||
| and PC mouse by Mouse |
|
||||
| Systems. |
|
||||
| |
|
||||
| IBMCMSP1.SYS IBM Color/Graphics Monitor |
|
||||
| Adaptor Card and Microsoft |
|
||||
| Mouse. |
|
||||
| |
|
||||
| Page 1 |
|
||||
| |
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------
|
||||
| CBASIC Compiler - CB86 READ.ME File Notes January 1984 |
|
||||
| |
|
||||
| |
|
||||
| All drivers described here accept keyboard characters |
|
||||
| and do not require a mouse for proper operation. You |
|
||||
| can use the arrow keys to position the graphics cursor. |
|
||||
| |
|
||||
| |
|
||||
| IBMMM1P1.SYS This driver supports the IBM Color |
|
||||
| Adaptor Card in monochrome mode with or |
|
||||
| without the PC Mouse by Mouse Systems. |
|
||||
| |
|
||||
| To use the PC Mouse, connect it to |
|
||||
| comm 1 (one of two RS-232 ports on your |
|
||||
| IBM Personal Computer). The driver |
|
||||
| initializes comm 1 for the appropriate |
|
||||
| baud rate, parity, stop bits, and other |
|
||||
| communications protocol necessary to use |
|
||||
| the PC Mouse. If you use comm 1 with a |
|
||||
| printer, plotter, or modem after using |
|
||||
| it with a PC Mouse, reset communications |
|
||||
| protocol for that particular device. |
|
||||
| |
|
||||
| IBMMMSP1.SYS This driver supports the IBM Color |
|
||||
| Adaptor Card in monochrome mode with or |
|
||||
| without the Microsoft Mouse. |
|
||||
| |
|
||||
| IBMHM1P1.SYS This driver supports the Hercules |
|
||||
| Graphics Card with or without the PC |
|
||||
| Mouse by Mouse Systems. |
|
||||
| |
|
||||
| To use the PC Mouse, connect it to |
|
||||
| comm 1 (one of two RS-232 ports on your |
|
||||
| IBM Personal Computer). The driver |
|
||||
| initializes comm 1 for the appropriate |
|
||||
| baud rate, parity, stop bits, and other |
|
||||
| communications protocol necessary to use |
|
||||
| the PC Mouse. If you use comm 1 with a |
|
||||
| printer, plotter, or modem after using |
|
||||
| it with a PC Mouse, reset communications |
|
||||
| protocol for that particular device. |
|
||||
| |
|
||||
| IBMHMSP1.SYS This driver supports the Hercules |
|
||||
| Graphics Card with or without the |
|
||||
| Microsoft Mouse. |
|
||||
| |
|
||||
| Page 2 |
|
||||
| |
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------
|
||||
| CBASIC Compiler - CB86 READ.ME File Notes January 1984 |
|
||||
| |
|
||||
| |
|
||||
| IBMCM1P1.SYS This driver supports the Hercules |
|
||||
| Graphics Card with or without the PC |
|
||||
| Mouse by Mouse Systems. |
|
||||
| |
|
||||
| To use the PC Mouse, connect it to |
|
||||
| comm 1 (one of two RS-232 ports on your |
|
||||
| IBM Personal Computer). The driver |
|
||||
| initializes comm 1 for the appropriate |
|
||||
| baud rate, parity, stop bits, and other |
|
||||
| communications protocol necessary to use |
|
||||
| the PC Mouse. If you use comm 1 with a |
|
||||
| printer, plotter, or modem after using |
|
||||
| it with a PC Mouse, reset communications |
|
||||
| protocol for that particular device. |
|
||||
| |
|
||||
| IBMCMSP1.SYS This driver supports the IBM Color |
|
||||
| Adaptor Card in color mode with or |
|
||||
| without the Microsoft Mouse. |
|
||||
| |
|
||||
| o The DEMOGRAF program on your product disk has been |
|
||||
| modified. Therefore, the listing of DEMOGRAF in |
|
||||
| Appendix A of the CBASIC Compiler Graphics Guide is |
|
||||
| inaccurate. DEMOGRAF.BAS contains the improved source |
|
||||
| code. |
|
||||
| |
|
||||
| |
|
||||
| CBASIC GRAPHICS GUIDE NOTES |
|
||||
| ====================================================== |
|
||||
| |
|
||||
| The following issues apply to the "CBASIC Compiler |
|
||||
| Language Graphics Guide" First Edition: May 1983. |
|
||||
| |
|
||||
| 1. Add the following statement to the graphics cursor |
|
||||
| explanation on page 1-7. |
|
||||
| |
|
||||
| >> The term "cursor" refers to the current print |
|
||||
| position for non-graphics output. The graphics |
|
||||
| cursor only displays during execution of the |
|
||||
| GRAPHIC INPUT statement. The cursor position at |
|
||||
| the time the GRAPHIC INPUT statement executes, is |
|
||||
| determined by the current position of the beam. |
|
||||
| The position to which you move the graphics cursor |
|
||||
| has no effect on the position of the beam. |
|
||||
| |
|
||||
| Page 3 |
|
||||
| |
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
__________________________________________________________________
|
||||
| CBASIC Compiler - CB86 READ.ME File Notes January 1984 |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| 2. The file GRAPHICS.EXE, described in your GSX-86 |
|
||||
| User's Guide on page 3-1, has been replaced on your |
|
||||
| product disk with the file GSX.EXE. Replace all |
|
||||
| references to GRAPHICS.CMD on pages 2-2 and 2-3 in |
|
||||
| the Graphics Guide with GSX.EXE. |
|
||||
| |
|
||||
| 3. Page 3-4 -- The boundaries of the device are |
|
||||
| initially set to (1,1) upon execution of the |
|
||||
| GRAPHIC OPEN statement. |
|
||||
| |
|
||||
| 4. Replace the explanation of the CLEAR statement on |
|
||||
| page 3-10 with the following explanation. |
|
||||
| |
|
||||
| > The CLEAR statement clears the screen, and returns |
|
||||
| the graphics cursor and beam to position (0,0). < |
|
||||
| |
|
||||
| 5. Page 3-25 -- The default LINE STYLE value is 1. |
|
||||
| |
|
||||
| 6. Page 3-30 -- The default MARKER TYPE value is 1. |
|
||||
| |
|
||||
| 7. Page 3-40 -- The beam and graphics cursor position |
|
||||
| are initially set to (0,0) when a GRAPHIC OPEN |
|
||||
| statement is executed. |
|
||||
| |
|
||||
| 8. Page 3-44 -- The default TEXT ANGLE is 0 radians. |
|
||||
| |
|
||||
| 9. Page 3-47 -- The VIEWPORT bounds are initially set |
|
||||
| to 0,1,0,1 upon execution of a GRAPHIC OPEN |
|
||||
| statement. |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Page 4 |
|
||||
| |
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
__________________________________________________________________
|
||||
| CBASIC Compiler - CB86 READ.ME File Notes January 1984 |
|
||||
| |
|
||||
| |
|
||||
| CBASIC GRAPHICS EXTENSION ERROR MESSAGES |
|
||||
| ====================================================== |
|
||||
| |
|
||||
| The following error messages indicate compilation |
|
||||
| errors that can occur during compilation of a graphics |
|
||||
| statement in a program. Compilation continues after |
|
||||
| the error is recorded. Errors 180 to 240 are reserved |
|
||||
| for use with the CBASIC Compiler graphics extension. |
|
||||
| |
|
||||
| |
|
||||
| Error Meaning |
|
||||
| |
|
||||
| 180 A left parenthesis is missing. A left |
|
||||
| parenthesis is inserted. |
|
||||
| |
|
||||
| 181 A right parenthesis is missing. A right |
|
||||
| parenthesis is inserted. |
|
||||
| |
|
||||
| 182 A comma is missing in a PLOT statement. |
|
||||
| A comma is inserted. |
|
||||
| |
|
||||
| 183 The keyword STYLE is missing in a SET or |
|
||||
| ASK statement. STYLE is inserted. |
|
||||
| |
|
||||
| 184 A comma is missing in a SET statement. A |
|
||||
| comma is inserted. |
|
||||
| |
|
||||
| 185 The keyword HEIGHT is missing in a SET or |
|
||||
| ASK CHARACTER statement. HEIGHT is |
|
||||
| inserted. |
|
||||
| |
|
||||
| 186 The keyword ANGLE is missing in a SET or |
|
||||
| ASK TEXT statement. ANGLE is inserted. |
|
||||
| |
|
||||
| 187 A comma is missing in a SET or ASK WINDOW |
|
||||
| statement. A comma is inserted. |
|
||||
| |
|
||||
| 188 A comma is missing in a SET or ASK |
|
||||
| VIEWPORT statement. A comma is inserted. |
|
||||
| |
|
||||
| 189 The keyword PAGE is missing in a SET |
|
||||
| statement. PAGE is inserted. |
|
||||
| |
|
||||
| |
|
||||
| Page 5 |
|
||||
| |
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------
|
||||
| CBASIC Compiler - CB86 READ.ME File Notes January 1984 |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| 190 Not used. |
|
||||
| |
|
||||
| 191 The keyword COUNT is missing in a ASK |
|
||||
| STYLE statement. COUNT is inserted. |
|
||||
| |
|
||||
| 192 A comma is missing in an ASK statement. |
|
||||
| A comma is inserted. |
|
||||
| |
|
||||
| 193 Not used. |
|
||||
| |
|
||||
| 194 Not used. |
|
||||
| |
|
||||
| 195 The keyword COUNT is missing in a SET |
|
||||
| COLOR statement. COLOR is inserted. |
|
||||
| |
|
||||
| 196 Not used. |
|
||||
| |
|
||||
| 197 Not used. |
|
||||
| |
|
||||
| 198 Not used. |
|
||||
| |
|
||||
| 199 Not used. |
|
||||
| |
|
||||
| 200 Not used. |
|
||||
| |
|
||||
| 201 Not used. |
|
||||
| |
|
||||
| 202 Not used. |
|
||||
| |
|
||||
| 203 A comma is missing in an GRAPHIC statement. |
|
||||
| A comma is inserted. |
|
||||
| |
|
||||
| 204 The keyword following GRAPHIC is unexpected. |
|
||||
| INPUT is inserted. |
|
||||
| |
|
||||
| 205 A left parenthesis is missing in a GRAPHIC |
|
||||
| statement. A left parenthesis is inserted. |
|
||||
| |
|
||||
| 206 A right parenthesis is missing in a GRAPHIC |
|
||||
| statement. A right parenthesis is inserted. |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Page 6 |
|
||||
| |
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------
|
||||
| CBASIC Compiler - CB86 READ.ME File Notes January 1984 |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| 207 A colon is missing in a GRAPHIC statement. |
|
||||
| A colon is inserted. |
|
||||
| |
|
||||
| 208 The variable in an ASK statement is of type |
|
||||
| real or string. An integer variable is |
|
||||
| required. |
|
||||
| |
|
||||
| 209 The variable in an ASK statement is of type |
|
||||
| integer or string. A real variable is |
|
||||
| required. |
|
||||
| |
|
||||
| 210 The variable in an ASK statement is of type |
|
||||
| integer or real. A string variable is |
|
||||
| required. |
|
||||
| |
|
||||
| 211 Not used. |
|
||||
| |
|
||||
| 212 Not used. |
|
||||
| |
|
||||
| 213 Not used. |
|
||||
| |
|
||||
| 214 Not used. |
|
||||
| |
|
||||
| 215 Not used. |
|
||||
| |
|
||||
| 216 A comma is missing in a GRAPHIC statement. |
|
||||
| A comma is inserted. |
|
||||
| |
|
||||
| 217 The variable in a MAT statement is of type |
|
||||
| integer or string. A real variable is |
|
||||
| required. |
|
||||
| |
|
||||
| 218 Not used. |
|
||||
| |
|
||||
| 219 Not used. |
|
||||
| |
|
||||
| 220 Not used. |
|
||||
| |
|
||||
| 221 The keyword following MAT is unexpected. |
|
||||
| FILL is inserted. |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Page 7 |
|
||||
| |
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------
|
||||
| CBASIC Compiler - CB86 READ.ME File Notes January 1984 |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| 222 A colon is missing in a MAT statement. A colon |
|
||||
| is inserted. |
|
||||
| |
|
||||
| 223 An identifier is missing in a MAT statement. |
|
||||
| An identifier is inserted. |
|
||||
| |
|
||||
| 224 A comma is missing in a MAT statement. A |
|
||||
| comma is inserted. |
|
||||
| |
|
||||
| |
|
||||
| GSX-86 USER'S GUIDE NOTES |
|
||||
| ====================================================== |
|
||||
| |
|
||||
| The following issues apply to the "GSX-86 User's Guide |
|
||||
| for the IBM Personal Computer Disk Operating System." |
|
||||
| First Edition: August 1983. |
|
||||
| |
|
||||
| 1. Page 4-19 indicates that the "monitors support 182 |
|
||||
| marker sizes and 5 marker types." This GSX-86 |
|
||||
| implementation supports only 1 marker size and 5 |
|
||||
| marker types. |
|
||||
| |
|
||||
| 2. Page 4-20 indicates that the "IBM PC supports 182 |
|
||||
| character sizes". This GSX-86 implementation |
|
||||
| supports only one character size. |
|
||||
| |
|
||||
| 3. Page 4-22 indicates that you can "move the graphic |
|
||||
| cursor in 45 degree angles by pressing the 7, 9, 1, |
|
||||
| and 3 keys on the numeric keypad." In this |
|
||||
| implementation of GSX-86, the 7 key homes the |
|
||||
| graphic cursor to position (0,0). The other keys |
|
||||
| terminate GRAPHIC INPUT. |
|
||||
| |
|
||||
| 4. Page 4-22 indicates that "pressing the insert (INS) |
|
||||
| key changes the distance between large and small |
|
||||
| movements." In this implementation of GSX-86, the |
|
||||
| SHIFT and NUM LOCK keys toggle between large and |
|
||||
| small increment graphics cursor movement. |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Page 8 |
|
||||
| |
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------
|
||||
| CBASIC Compiler - CB86 READ.ME File Notes January 1984 |
|
||||
| |
|
||||
| |
|
||||
| THE GSX-86 PROGRAMMER'S TOOL KIT |
|
||||
| ====================================================== |
|
||||
| |
|
||||
| Graphics command keywords incorporated into the CB86 |
|
||||
| programming language are somewhat limited for the |
|
||||
| commercial software developer. Therefore, if you |
|
||||
| require additional graphics flexability, consider the |
|
||||
| GSX-86 Programmer's Tool Kit available from Digital |
|
||||
| Research. |
|
||||
| |
|
||||
| The GSX-86 Tool Kit provides monitor drivers and |
|
||||
| language binding software for the CP/M-86 operating |
|
||||
| system as well as IBM Personal Computer DOS. Of |
|
||||
| primary interest to the commercial programmer, the |
|
||||
| Tool Kit includes a licensing agreement enabling legal |
|
||||
| redistribution of the GSX-86 product configured for |
|
||||
| your IBM Personal Computer applications programs. |
|
||||
| |
|
||||
| The following list defines the contents of the GSX-86 |
|
||||
| Programmer's Tool Kit. |
|
||||
| |
|
||||
| GSX-86 Programmer's Tool Kit Software/Documentation |
|
||||
| ------------------------------------------------------ |
|
||||
| |
|
||||
| o GSX-86 V1.0 for DOS (5 1/4" DS/DD) |
|
||||
| |
|
||||
| Monitor Drivers: |
|
||||
| - IBM Color/Graphics Monitor Adaptor Card |
|
||||
| (monochrome graphics mode) |
|
||||
| - IBM Color/Graphics Monitor Adaptor Card |
|
||||
| (monochrome graphics mode/mouse support) |
|
||||
| - IBM Color/Graphics Monitor Adaptor Card |
|
||||
| (color graphics mode) |
|
||||
| - IBM Color/Graphics Monitor Adaptor Card |
|
||||
| (color graphics mode/mouse support) |
|
||||
| - Hercules Graphics Card |
|
||||
| (monochrome graphics mode) |
|
||||
| - Hercules Graphics Card |
|
||||
| (monochrome graphics mode/mouse support) |
|
||||
| |
|
||||
| Peripheral Device Drivers: |
|
||||
| - Includes all drivers that are provided in the latest |
|
||||
| version of GSX-86 for IBM Personal Computer DOS. |
|
||||
| |
|
||||
| Page 9 |
|
||||
| |
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------
|
||||
| CBASIC Compiler - CB86 READ.ME File Notes January 1984 |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| o GSX-86 V1.0 for CP/M-86 (5 1/4" DS/DD) |
|
||||
| |
|
||||
| Monitor Drivers: |
|
||||
| - IBM Color/Graphics Monitor Adaptor Card |
|
||||
| (monochrome graphics mode) |
|
||||
| - IBM Color/Graphics Monitor Adaptor Card |
|
||||
| (monochrome graphics mode/mouse support) |
|
||||
| - IBM Color/Graphics Monitor Adaptor Card |
|
||||
| (color graphics mode) |
|
||||
| - IBM Color/Graphics Monitor Adaptor Card |
|
||||
| (color graphics mode/mouse support) |
|
||||
| - Hercules Graphics Card |
|
||||
| (monochrome graphics mode) |
|
||||
| - Hercules Graphics Card |
|
||||
| (monochrome graphics mode/mouse support) |
|
||||
| |
|
||||
| Peripheral Devices Drivers: |
|
||||
| - Includes all drivers that are provided in the latest |
|
||||
| version of GSX-86 for the CP/M-86 family of |
|
||||
| operating systems. |
|
||||
| |
|
||||
| o GSX-86 User's Guide (CP/M-86) V1.2 |
|
||||
| |
|
||||
| o GSX-86 User's Guide (DOS) V1.0 |
|
||||
| |
|
||||
| o GSX-86 Programmer's Guide (Generic) V1.2 |
|
||||
| |
|
||||
| |
|
||||
| Language Binding Software and Documentation |
|
||||
| ------------------------------------------------------ |
|
||||
| |
|
||||
| o GSX-86 Language Binding Disk (DOS) (5 1/4" DS/DD) |
|
||||
| |
|
||||
| - CBASIC Compiler (CB86) |
|
||||
| - Pascal/MT+86 |
|
||||
| - PL/I-86 |
|
||||
| - Digital Research C (Small Memory Model) |
|
||||
| - Digital Research C (Large Memory Model) |
|
||||
| - Digital Research FORTRAN-77 (Small Memory Model) |
|
||||
| - Digital Research FORTRAN-77 (Large Memory Model) |
|
||||
| |
|
||||
| |
|
||||
| Page 10 |
|
||||
| |
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------
|
||||
| CBASIC Compiler - CB86 READ.ME File Notes January 1984 |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| o GSX-86 Language Binding Disk (CP/M-86) (5 1/4" DS/DD) |
|
||||
| |
|
||||
| - CBASIC Compiler (CB86) |
|
||||
| - Pascal/MT-86 |
|
||||
| - PL/I-86 |
|
||||
| - Digital Research C (Small Memory Model) |
|
||||
| - Digital Research C (Large Memory Model) |
|
||||
| - Digital Research FORTRAN-77 (Small Memory Model) |
|
||||
| - Digital Research FORTRAN-77 (Large Memory Model) |
|
||||
| |
|
||||
| o GSX-86 Programmer's Reference Language Guide (Generic) |
|
||||
| |
|
||||
| |
|
||||
| Demonstration Software |
|
||||
| ------------------------------------------------------ |
|
||||
| |
|
||||
| o GSX-86 Demonstration Disk (CP/M-86) (5 1/4" DS/DD) |
|
||||
| |
|
||||
| o GSX-86 Demonstration Disk (DOS) (5 1/4" DS/DD) |
|
||||
| |
|
||||
| |
|
||||
| Licensing Information |
|
||||
| ------------------------------------------------------ |
|
||||
| |
|
||||
| o Single User License |
|
||||
| |
|
||||
| o Redistribution License |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| VVVVVVV |
|
||||
| VVVVV |
|
||||
| VVV |
|
||||
| V |
|
||||
| |
|
||||
| END OF READ.ME FILE |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| Page 11 |
|
||||
| |
|
||||
------------------------------------------------------------------
|
||||
|
331
Digital Research CB-86 v2/READ1.ME
Normal file
331
Digital Research CB-86 v2/READ1.ME
Normal file
@ -0,0 +1,331 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*****************************
|
||||
* R E L E A S E N O T E S *
|
||||
*****************************
|
||||
|
||||
|
||||
ASSEMBLER PLUS TOOLS
|
||||
|
||||
VERSION 1.0
|
||||
|
||||
|
||||
FOR THE IBM PERSONAL COMPUTER DISK OPERATING SYSTEM
|
||||
|
||||
|
||||
Copyright (c) 1983 by Digital Research, Inc.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1-1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Assembler Plus Tools Release Notes
|
||||
|
||||
|
||||
|
||||
These release notes pertain to both the software and
|
||||
the documentation set for the Digital Research
|
||||
product:
|
||||
|
||||
|
||||
Assembler Plus Tools
|
||||
|
||||
For the IBM Personal Computer
|
||||
Disk Operating System
|
||||
|
||||
|
||||
|
||||
They provide the most current information regarding:
|
||||
|
||||
o changes and corrections to the software that
|
||||
have been identified since the product was
|
||||
released.
|
||||
|
||||
o errors or omissions in the documentation set
|
||||
that could not be corrected because of the lead
|
||||
time needed for production and printing.
|
||||
|
||||
|
||||
|
||||
Note: These release notes have been formatted so you
|
||||
can print them on your own printer, cut them to size
|
||||
(6 1/2 x 8 1/2), and place them in your manuals.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1-2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Assembler Plus Tools Release Notes
|
||||
|
||||
|
||||
LINK-86 Notes
|
||||
|
||||
|
||||
A new command line option has been added to the
|
||||
linker. The $MY option directs LINK-86 to send the
|
||||
.MAP file to your line printer.
|
||||
|
||||
A new optional parameter has been added to the MAP
|
||||
option. The NOCOMMON parameter directs LINK-86 to
|
||||
suppress the listing of common segment names in the
|
||||
MAP file.
|
||||
|
||||
LINK-86 now displays the filename and module name
|
||||
indicating the location of an undefined symbol.
|
||||
|
||||
The Assembler Plus Tools package does not include an
|
||||
overlay manager. The overlay manager is part of the
|
||||
run-time library that is packaged with your language
|
||||
software.
|
||||
|
||||
LINK-86 can now report three additional error
|
||||
messages:
|
||||
|
||||
CLASS NOT FOUND - The class name specified in
|
||||
the command line does not exist in any of the
|
||||
files being linked.
|
||||
|
||||
GROUP NOT FOUND - The group name specified in
|
||||
the command line does not exist in any of the
|
||||
files being linked.
|
||||
|
||||
SEGMENT NOT FOUND - The segment name specified
|
||||
in the command line does not exist in any of the
|
||||
files being linked.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1-3
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Assembler Plus Tools Release Notes
|
||||
|
||||
|
||||
RASM-86 NOTES
|
||||
|
||||
|
||||
A new command line option has been added to the RASM-
|
||||
86 assembler. The $NC option directs RASM-86 not to
|
||||
convert letters in symbol names to uppercase. This
|
||||
feature supports users of the C language.
|
||||
|
||||
RASM-86 Version 1.3 now supports 8087 opcodes.
|
||||
However, RASM-86 does not allow types other than
|
||||
byte, word, and double-word. Therefore, in order to
|
||||
support the 8087 instructions, the form of the RASM-
|
||||
86 instruction is slightly different from the Intel
|
||||
convention.
|
||||
|
||||
All memory reference instructions have two characters
|
||||
appended to the end of the opcode name. The two
|
||||
characters represent the number of bits referenced by
|
||||
the instruction. For example,
|
||||
|
||||
FADD64 byte ptr my_var
|
||||
|
||||
|
||||
This instruction assumes that my_var contains 64 bits
|
||||
(4 bytes). This convention applies to all 8087
|
||||
instructions that reference user memory, except those
|
||||
that always reference the same number of bits (i.e.
|
||||
FSTCW).
|
||||
|
||||
Also, in the Intel convention, any instruction that
|
||||
is followed by a P causes the stack to be popped. In
|
||||
RASM-86, the P follows the number of bits. For
|
||||
example,
|
||||
|
||||
FSUB80P byte ptr my_var; sub and pop temp real
|
||||
|
||||
|
||||
We recommend that you carefully study all the Intel
|
||||
documentation about the 8087 coprocessor and its
|
||||
opcodes before using them in RASM-86.
|
||||
|
||||
|
||||
|
||||
1-4
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Assembler Plus Tools Release Notes
|
||||
|
||||
|
||||
SID-86 Notes
|
||||
|
||||
|
||||
Currently, SID-86 does not fully support symbol files
|
||||
for programs configured according to the LARGE,
|
||||
COMPACT, or MEDIUM memory models.
|
||||
|
||||
To reference symbols in a LARGE or MEDIUM model
|
||||
program, you must refer to the .MAP file generated
|
||||
for the program by LINK-86. The .MAP file provides
|
||||
you with relative segment locations.
|
||||
|
||||
To reference a segment during debugging with SID-86,
|
||||
you must add the relative segment location provided
|
||||
by the .MAP file to the absolute segment location
|
||||
which is displayed by SID-86 when the file is loaded.
|
||||
|
||||
|
||||
END OF READ.ME FILE
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1-5
|
||||
|
||||
|
||||
|
BIN
Digital Research CB-86 v2/SID86.COM
Normal file
BIN
Digital Research CB-86 v2/SID86.COM
Normal file
Binary file not shown.
46
Digital Research CB-86 v2/TSTCIR.BAS
Normal file
46
Digital Research CB-86 v2/TSTCIR.BAS
Normal file
@ -0,0 +1,46 @@
|
||||
REM DEMONSTRATION PROGRAM FOR CIRCLE DRAWING FUNCTIONS
|
||||
REM
|
||||
REM PROGRAM NAME: TSTCIR.BAS
|
||||
REM
|
||||
%INCLUDE GRAPHCOM.BAS
|
||||
%INCLUDE CIRCOM.BAS
|
||||
GRAPHIC OPEN 1
|
||||
CLEAR
|
||||
PRINT "COMPUTING"
|
||||
CALL BEG.CIR
|
||||
PRINT "ENDED"
|
||||
CALL PLOT.CIR
|
||||
KEY% = CONCHAR% REM WAIT FOR KEYBOARD
|
||||
|
||||
REM SCALE THE WINDOW TO DRAW A PROPERLY PROPORTIONED CIRCLE
|
||||
|
||||
ASK DEVICE X.AXIS,Y.AXIS
|
||||
PRINT X.AXIS,Y.AXIS
|
||||
SET WINDOW 0,X.AXIS/Y.AXIS,0,1
|
||||
CALL PLOT.CIR
|
||||
KEY%=CONCHAR%
|
||||
CALL FILL.CIR
|
||||
KEY%=CONCHAR%
|
||||
|
||||
REM CHANGE THE VIEWPORT TO REPOSITION THE CIRCLE
|
||||
|
||||
SET VIEWPORT 0,.5,0,.5 REM LOWER LEFT QUARTER
|
||||
CLEAR
|
||||
CALL PLOT.CIR
|
||||
KEY%=CONCHAR%
|
||||
|
||||
SET VIEWPORT .5,1,0,.5 REM LOWER RIGHT QUARTER
|
||||
CALL PLOT.CIR
|
||||
KEY%=CONCHAR%
|
||||
|
||||
SET VIEWPORT 0,.5,.5,1 REM UPPER LEFT QUARTER
|
||||
CALL PLOT.CIR
|
||||
KEY%=CONCHAR%
|
||||
|
||||
SET VIEWPORT .5,1,.5,1 REM UPPER RIGHT QUARTER
|
||||
CALL PLOT.CIR
|
||||
KEY%=CONCHAR%
|
||||
|
||||
STOP
|
||||
END
|
||||
|
116
Digital Research CB-86 v2/VIDEOIBM.A86
Normal file
116
Digital Research CB-86 v2/VIDEOIBM.A86
Normal file
@ -0,0 +1,116 @@
|
||||
;VIDEOIBM.A86
|
||||
pagesize 64+11
|
||||
;*****************************************************************
|
||||
;RASM86 interface to IBM PC/XT ROM video routine.
|
||||
;Digital Research Tech. Support
|
||||
;15 Sept. 83
|
||||
;*********************************************************************
|
||||
|
||||
PUBLIC VIDEOIBM
|
||||
CSEG
|
||||
|
||||
;Equates:
|
||||
VID_INT equ 10h ;how to get to ROM
|
||||
P0 equ 16[bp]
|
||||
P1 equ 14[bp]
|
||||
P2 equ 12[bp]
|
||||
P3 equ 10[bp]
|
||||
P4 equ 8[bp]
|
||||
P5 equ 6[bp]
|
||||
P6 equ 4[bp]
|
||||
P7 equ 2[bp]
|
||||
;return address equals 0[bp]
|
||||
|
||||
;Entry point:
|
||||
VIDEOIBM:
|
||||
mov bp,sp ;set up stack frame
|
||||
pushf ;must save direction flag
|
||||
push si
|
||||
push di
|
||||
|
||||
;Branch to appropriate routine:
|
||||
mov bx,P0
|
||||
and bx,000Fh ;only 16 entries
|
||||
shl bx,1 ;table of words
|
||||
call CS:TABLE[bx] ;gone
|
||||
|
||||
;Back to CB86:
|
||||
BACK:
|
||||
pop di
|
||||
pop si
|
||||
popf
|
||||
ret 16 ;get rid of 8 entry words
|
||||
|
||||
;Routine to call ROM:
|
||||
ROM:
|
||||
mov ah,P0
|
||||
int VID_INT
|
||||
RET1: ret
|
||||
|
||||
eject
|
||||
;Jump table:
|
||||
TABLE equ offset $ ;function #:
|
||||
dw SET_MODE ; 0
|
||||
dw SET_CURS_TYP ; 1
|
||||
dw SET_CURS_POS ; 2
|
||||
dw RET_CURS_POS ; 3
|
||||
dw RET1 ;Read-Light-Pen not sup.
|
||||
dw SET_PAGE ; 5
|
||||
dw SCROLL_UP ; 6
|
||||
dw SCROLL_DOWN ; 7
|
||||
dw RET_CHAR ; 8
|
||||
dw CHAR_OUT ; 9
|
||||
dw CHAR_ONLY ; 10
|
||||
dw SET_PALETTE ; 11
|
||||
dw DOT_OUT ; 12
|
||||
dw RET1 ;Read-Dot not sup.
|
||||
dw TTY_OUT ; 14
|
||||
dw GET_MODE ; 15
|
||||
|
||||
;*********************************************************************
|
||||
;The following routines interface by using 8-bit registers and return
|
||||
;either nothing to CB86, or have already put the returned value in AX:
|
||||
|
||||
SET_MODE:
|
||||
SET_CURS_TYP:
|
||||
SET_CURS_POS:
|
||||
SET_PAGE:
|
||||
SCROLL_UP:
|
||||
SCROLL_DOWN:
|
||||
SET_PALETTE:
|
||||
TTY_OUT:
|
||||
RET_CHAR:
|
||||
GET_MODE:
|
||||
;Load registers:
|
||||
mov al,P1
|
||||
mov bh,P2
|
||||
mov bl,P3
|
||||
mov ch,P4
|
||||
mov cl,P5
|
||||
mov dh,P6
|
||||
mov dl,P7
|
||||
|
||||
jmps ROM ;ROM: will do the RET
|
||||
|
||||
;**********************************************************************
|
||||
;The rest of the routines use a unique combination of 8- and 16-bit
|
||||
;registers:
|
||||
|
||||
CHAR_OUT:
|
||||
CHAR_ONLY:
|
||||
DOT_OUT:
|
||||
mov al,P1
|
||||
mov bh,P2
|
||||
mov bl,P3
|
||||
mov cx,P4
|
||||
mov dx,P6
|
||||
jmp ROM
|
||||
|
||||
RET_CURS_POS:
|
||||
mov bh,P2
|
||||
call ROM
|
||||
mov ax,dx
|
||||
ret
|
||||
|
||||
END
|
||||
|
BIN
Digital Research CB-86 v2/VIDEOIBM.OBJ
Normal file
BIN
Digital Research CB-86 v2/VIDEOIBM.OBJ
Normal file
Binary file not shown.
BIN
Digital Research CB-86 v2/XREF86.EXE
Normal file
BIN
Digital Research CB-86 v2/XREF86.EXE
Normal file
Binary file not shown.
29
Digital Research CB-86 v2/e.bas
Normal file
29
Digital Research CB-86 v2/e.bas
Normal file
@ -0,0 +1,29 @@
|
||||
100 DIGITS% = 200
|
||||
110 DIM A%( 200 )
|
||||
120 HIGH% = DIGITS%
|
||||
130 X% = 0
|
||||
140 N% = HIGH% - 1
|
||||
150 IF N% <= 0 THEN GOTO 200
|
||||
160 A%( N% ) = 1
|
||||
170 N% = N% - 1
|
||||
180 GOTO 150
|
||||
200 A%( 1 ) = 2
|
||||
210 A%( 0 ) = 0
|
||||
220 IF HIGH% <= 9 THEN GOTO 400
|
||||
230 HIGH% = HIGH% - 1
|
||||
235 N% = HIGH%
|
||||
240 IF N% = 0 THEN GOTO 300
|
||||
250 A%( N% ) = MOD( X%, N% )
|
||||
260 X% = ( 10 * A%( N% - 1 ) ) + ( X% / N% )
|
||||
270 N% = N% - 1
|
||||
280 GOTO 240
|
||||
300 IF X% >= 10 THEN GOTO 330
|
||||
310 PRINT USING "#"; X%;
|
||||
320 GOTO 220
|
||||
330 PRINT USING "##"; X%;
|
||||
340 GOTO 220
|
||||
400 PRINT ""
|
||||
410 PRINT "done"
|
||||
420 STOP
|
||||
|
||||
|
5
Digital Research CB-86 v2/m.bat
Normal file
5
Digital Research CB-86 v2/m.bat
Normal file
@ -0,0 +1,5 @@
|
||||
ntvdm cb86 %1
|
||||
ntvdm link86 %1 = %1
|
||||
|
||||
|
||||
|
4
Digital Research CB-86 v2/read_me.txt
Normal file
4
Digital Research CB-86 v2/read_me.txt
Normal file
@ -0,0 +1,4 @@
|
||||
.bas source files must be ^z / 0x1a terminated or the compiler fails and/or doesn't generate any code!
|
||||
|
||||
|
||||
|
20
Digital Research CB-86 v2/sieve.bas
Normal file
20
Digital Research CB-86 v2/sieve.bas
Normal file
@ -0,0 +1,20 @@
|
||||
1 SIZE% = 8190
|
||||
2 DIM FLAGS%(8191)
|
||||
3 PRINT "10 iterations"
|
||||
4 FOR X% = 1 TO 10
|
||||
5 COUNT% = 0
|
||||
6 FOR I% = 0 TO SIZE%
|
||||
7 FLAGS%(I%) = 1
|
||||
8 NEXT I%
|
||||
9 FOR I% = 0 TO SIZE%
|
||||
10 IF FLAGS%(I%) = 0 THEN 18
|
||||
11 PRIME% = I% + I% + 3
|
||||
12 K% = I% + PRIME%
|
||||
13 IF K% > SIZE% THEN 17
|
||||
14 FLAGS%(K%) = 0
|
||||
15 K% = K% + PRIME%
|
||||
16 GOTO 13
|
||||
17 COUNT% = COUNT% + 1
|
||||
18 NEXT I%
|
||||
19 NEXT X%
|
||||
20 PRINT COUNT%," PRIMES"
|
187
Digital Research CB-86 v2/ttt.bas
Normal file
187
Digital Research CB-86 v2/ttt.bas
Normal file
@ -0,0 +1,187 @@
|
||||
rem coded for CBASIC Compiler CB-80 21 May 83 Version 2.0
|
||||
rem Tic Tac Toe solving app that learns what WOPR learned: you can't win
|
||||
rem Only three starting positions are examined. Others are just reflections of these
|
||||
rem b% -- The board
|
||||
rem al% -- Alpha, for pruning
|
||||
rem be% -- Beta, for pruning
|
||||
rem l% -- Top-level loop iteration
|
||||
rem mv% -- the first move taken
|
||||
rem wi% -- The winning piece (0 none, 1 X, 2, O )
|
||||
rem re% -- Resulting score of 4000/minmax board position. 5 draw, 6 X win, 4 Y win
|
||||
rem sX% -- Stack arrays for "recursion" X can be P, V, A, or B for those variables.
|
||||
rem v% -- Value of a board position
|
||||
rem st% -- Stack Pointer. Even for alpha/beta pruning Minimize plys, Odd for Maximize
|
||||
rem p% -- Current position where a new piece is played
|
||||
rem mc% -- Move count total for debugging. Should be a multiple of 6493
|
||||
rem Note: Can't use real recursion with GOSUB because stack is limited to roughly 5 deep
|
||||
rem BASIC doesn't support goto/gosub using arrays for target line numbers
|
||||
rem build like this:
|
||||
rem ntvdm -t cb86 tttcb86
|
||||
rem ntvdm -t link86 tttcb86 = tttcb86
|
||||
|
||||
li% = val( command$ )
|
||||
if 0 = li% then li% = 1
|
||||
dim b%(9)
|
||||
dim sp%(10)
|
||||
dim sv%(10)
|
||||
dim sa%(10)
|
||||
dim sb%(10)
|
||||
mc% = 0
|
||||
for l% = 1 to li%
|
||||
mv% = 0 : p% = 0
|
||||
mc% = 0
|
||||
al% = 2
|
||||
be% = 9
|
||||
b%(mv%) = 1
|
||||
goto 4000
|
||||
55 b%(mv%) = 0
|
||||
mv% = 1 : p% = 1
|
||||
b%(mv%) = 1
|
||||
al% = 2
|
||||
be% = 9
|
||||
goto 4000
|
||||
65 b%(mv%) = 0
|
||||
mv% = 4 : p% = 4
|
||||
b%(mv%) = 1
|
||||
al% = 2
|
||||
be% = 9
|
||||
goto 4000
|
||||
75 b%(mv%) = 0
|
||||
next l%
|
||||
87 print "iterations: "; li%
|
||||
print "move count: "; mc%
|
||||
stop
|
||||
|
||||
rem this version is slower but works if there are no computed gotos
|
||||
|
||||
2000 wi% = b%( 0 )
|
||||
if 0 = wi% then goto 2100
|
||||
if wi% = b%( 1 ) and wi% = b%( 2 ) then goto 4106
|
||||
if wi% = b%( 3 ) and wi% = b%( 6 ) then goto 4106
|
||||
2100 wi% = b%( 3 )
|
||||
if 0 = wi% then goto 2200
|
||||
if wi% = b%( 4 ) and wi% = b%( 5 ) then goto 4106
|
||||
2200 wi% = b%( 6 )
|
||||
if 0 = wi% then goto 2300
|
||||
if wi% = b%( 7 ) and wi% = b%( 8 ) then goto 4106
|
||||
2300 wi% = b%( 1 )
|
||||
if 0 = wi% then goto 2400
|
||||
if wi% = b%( 4 ) and wi% = b%( 7 ) then goto 4106
|
||||
2400 wi% = b%( 2 )
|
||||
if 0 = wi% then goto 2500
|
||||
if wi% = b%( 5 ) and wi% = b%( 8 ) then goto 4106
|
||||
2500 wi% = b%( 4 )
|
||||
if 0 = wi% then goto 4106
|
||||
if wi% = b%( 0 ) and wi% = b%( 8 ) then goto 4106
|
||||
if wi% = b%( 2 ) and wi% = b%( 6 ) then goto 4106
|
||||
wi% = 0
|
||||
goto 4106
|
||||
|
||||
3000 wi% = b%(0)
|
||||
if ( ( wi% = b%(1) ) and ( wi% = b%(2) ) ) then goto 4106
|
||||
if ( ( wi% = b%(3) ) and ( wi% = b%(6) ) ) then goto 4106
|
||||
if ( ( wi% = b%(4) ) and ( wi% = b%(8) ) ) then goto 4106
|
||||
wi% = 0
|
||||
go to 4106
|
||||
|
||||
3010 wi% = b%(1)
|
||||
if ( ( wi% = b%(0) ) and ( wi% = b%(2) ) ) then goto 4106
|
||||
if ( ( wi% = b%(4) ) and ( wi% = b%(7) ) ) then goto 4106
|
||||
wi% = 0
|
||||
go to 4106
|
||||
|
||||
3020 wi% = b%(2)
|
||||
if ( ( wi% = b%(0) ) and ( wi% = b%(1) ) ) then goto 4106
|
||||
if ( ( wi% = b%(5) ) and ( wi% = b%(8) ) ) then goto 4106
|
||||
if ( ( wi% = b%(4) ) and ( wi% = b%(6) ) ) then goto 4106
|
||||
wi% = 0
|
||||
go to 4106
|
||||
|
||||
3030 wi% = b%(3)
|
||||
if ( ( wi% = b%(4) ) and ( wi% = b%(5) ) ) then goto 4106
|
||||
if ( ( wi% = b%(0) ) and ( wi% = b%(6) ) ) then goto 4106
|
||||
wi% = 0
|
||||
go to 4106
|
||||
|
||||
3040 wi% = b%(4)
|
||||
if ( ( wi% = b%(0) ) and ( wi% = b%(8) ) ) then goto 4106
|
||||
if ( ( wi% = b%(2) ) and ( wi% = b%(6) ) ) then goto 4106
|
||||
if ( ( wi% = b%(1) ) and ( wi% = b%(7) ) ) then goto 4106
|
||||
if ( ( wi% = b%(3) ) and ( wi% = b%(5) ) ) then goto 4106
|
||||
wi% = 0
|
||||
go to 4106
|
||||
|
||||
3050 wi% = b%(5)
|
||||
if ( ( wi% = b%(3) ) and ( wi% = b%(4) ) ) then goto 4106
|
||||
if ( ( wi% = b%(2) ) and ( wi% = b%(8) ) ) then goto 4106
|
||||
wi% = 0
|
||||
go to 4106
|
||||
|
||||
3060 wi% = b%(6)
|
||||
if ( ( wi% = b%(7) ) and ( wi% = b%(8) ) ) then goto 4106
|
||||
if ( ( wi% = b%(0) ) and ( wi% = b%(3) ) ) then goto 4106
|
||||
if ( ( wi% = b%(4) ) and ( wi% = b%(2) ) ) then goto 4106
|
||||
wi% = 0
|
||||
go to 4106
|
||||
|
||||
3070 wi% = b%(7)
|
||||
if ( ( wi% = b%(6) ) and ( wi% = b%(8) ) ) then goto 4106
|
||||
if ( ( wi% = b%(1) ) and ( wi% = b%(4) ) ) then goto 4106
|
||||
wi% = 0
|
||||
go to 4106
|
||||
|
||||
3080 wi% = b%(8)
|
||||
if ( ( wi% = b%(6) ) and ( wi% = b%(7) ) ) then goto 4106
|
||||
if ( ( wi% = b%(2) ) and ( wi% = b%(5) ) ) then goto 4106
|
||||
if ( ( wi% = b%(0) ) and ( wi% = b%(4) ) ) then goto 4106
|
||||
wi% = 0
|
||||
go to 4106
|
||||
|
||||
4000 rem minmax function to find score of a board position
|
||||
rem recursion is simulated with gotos and arrays as stacks
|
||||
st% = 0
|
||||
v% = 0
|
||||
re% = 0
|
||||
4100 mc% = mc% + 1
|
||||
rem print "{"; b%(0);b%(1);b%(2);b%(3);b%(4);b%(5);b%(6);b%(7);b%(8);"}";al%;be%;p%;st%
|
||||
if st% < 4 then goto 4150
|
||||
rem goto 2000
|
||||
on (p% + 1) goto 3000, 3010, 3020, 3030, 3040, 3050, 3060, 3070, 3080
|
||||
4106 if 0 = wi% then goto 4140
|
||||
if wi% = 1 then re% = 6: goto 4280
|
||||
re% = 4
|
||||
goto 4280
|
||||
4140 if st% = 8 then re% = 5: goto 4280
|
||||
4150 if st% and 1 then v% = 2 else v% = 9
|
||||
p% = 0
|
||||
4180 if 0 <> b%(p%) then goto 4500
|
||||
if st% and 1 then b%(p%) = 1 else b%(p%) = 2
|
||||
sp%(st%) = p%
|
||||
sv%(st%) = v%
|
||||
sa%(st%) = al%
|
||||
sb%(st%) = be%
|
||||
st% = st% + 1
|
||||
goto 4100
|
||||
4280 st% = st% - 1
|
||||
p% = sp%(st%)
|
||||
v% = sv%(st%)
|
||||
al% = sa%(st%)
|
||||
be% = sb%(st%)
|
||||
b%(p%) = 0
|
||||
if st% and 1 then goto 4340
|
||||
if re% = 4 then goto 4530
|
||||
if re% < v% then v% = re%
|
||||
if v% < be% then be% = v%
|
||||
if be% <= al% then goto 4520
|
||||
goto 4500
|
||||
4340 if re% = 6 then goto 4530
|
||||
if re% > v% then v% = re%
|
||||
if v% > al% then al% = v%
|
||||
if al% >= be% then goto 4520
|
||||
4500 p% = p% + 1
|
||||
if p% < 9 then goto 4180
|
||||
4520 re% = v%
|
||||
4530 if st% = 0 then on ( 1 + mv% ) goto 55, 65, 87, 87, 75
|
||||
goto 4280
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user