80-Bus News

  

March-April 1983, Volume 2, Issue 2











Page 24 of 55











NAS-GRAPHPAC SYSTEM MANUAL Page 2

The Graphpac workspace will be located just below the relocated package at 6F00 hex.

If it is intended to run Nas-Graphpac in ROM it will be necessary to locate the Graphpac workspace in the low memory area ODOO – 1000 hex. This can be achieved by entering the following command line.

E 1000 aasa L (enter)

where asaa is the address at which the program will run and where L is the letter D,E or F to indicate which 100 hex bytes in the low memory area is to be used. D equates to ODOO hex etc. This decision will depend on what other software is running on the syaten.

The relocation process in both cases is straight forward and when complete the user will be prompted to make a tape copy of the generated version at its execution sddress (a copy is placed at 4000 hex. if RAM is not available at the target address). Once this tape is made the original Nas-Graphpac tape will not be needed unless a new version is required at a different address, and should be kept in a safe place as a master backup tape.

WARNTNG.... .

It is essential that you do not ask the relocator to configure Nas-Graphpac so that it crosses the 32K address boundary. If you have a 16k Nascom system you can only configure Nas-Graphpac to start at 4800 hex. If you have a Nascom equipped with 32K or more, never ask the relocator to address Graphpac between 7801 hex and 7FFF hex. as it is probable that the package will not work correctly.

EXECUTING NAS-GRAPHPAC (COLD START)

It is important that if CGsort’s Nas-Debug is active on the system, it should be disabled by pressing RESET or executing Nas-sys at address zero or by using the Nas-sys N command before Nas-Graphpac is used.

Your generated Nas-Graphpac must first be loaded using the Nas-sys READ command. Execute WNas-Graphpac at the first address that was displayed during the READ process, i.e.

B 7000 (enter)

where Graphpac was relocated originally at 7000 hex.

Nas-Graphpac will be initialised together with the BASIC and an attempt to set the MEMORY SIZE at 101 hex bytes below Nas-Graphpac will be made irrespective of the position of the Nas-Graphpac workspace. If Nas-Graphpac resides in ROM, the MEMORY SIZE message will be printed and the normal BASIC cold start procedure is used.

If it is wished to set the MEMORY SIZE Manually this can be achieved by entering a second argument on execution.

& 7000 SYFF (enter)

Graphpac will be executed at address 7000 hex and the MEMORY SIZE will be set at SFFF hex. This will be confirmed on entry to BASIC as the free memory size will be printed in decimal. If the second argument entered is invalid, the MEMORY SIZE message will de displayed and the user will be prompted to enter the correct value (in decimal). DO NoT just press the enter key without entering a decimal value if this point is reached, unless Nas-Graphpac resides in ROM.

EXECUTING NAS-GRAPHPAC (warm start)

If the user has returned to Nas-sys, Nas-Graphpac and BASIC may be re-entered by executing Nas-Graphpac at it’s normal execution address. (The same as cold start.)

EB 7000 (enter)

A second argument should not be entered unless the user is aware of

the consequences as explained in appendix 2.

NAS-GRAPHPAC SYSTEM MANUAL Page 3

ENTERING NAS-GRAPHPAC COMMANDS

Nas-Graphpac commands can be entered in the DIRECT MODE or as part of a statement line. If the command is to be entered while in the DIRECT MODE, it must ALWAYS be preceded by a colon (:) otherwise a syntax error will occur. Nas-Graphpac commands can be used as part of a statement line using normal BASIC conventions except a colon must precede a Nas-Graphpac command that follows the word THEN in an IF THEN statement.

BASIC variable and array names should not match Nas-Graphpac command names. (although this is usually acceptable if a LET is not implied and the word LET is used in a statement line.)

BASIC PROGRAM EXECUTION TIME

Every care has been taken to ensure the graphic routines execute as fast as possible and speed problems should not be encountered while actually producing graphic displays, however, there ig a time overhead caused by searching the Graphpac command table, before deciding whether Graphpac or BASIC is to take control. In long program loops that do not include Nas-Graphpac commands (i.e. setting up a large array) it may be worth while disabling Graphpac temporarily. This is achieved by the following line which POKE’s the N.M.I. flag in BASIC’s workspace.

POKE 41’73,0

Before a Nas-Graphpac command is executed, the N.M.I. flag must again

be modified with the following line POKE 4175,1

This facility should only be used in a program where the execution speed is critical. An INPUT statement, keyboard interrupt or a return to the direct mode will cause Graphpac to be enabled.

Another problem with program speed is associated with screen blanking. It is possible to plot and erase short lines on the screen extremely quickly, so much so, that if this process is repeated in a FOR NEXT loop the line may appear to be plotted in slow motion due to the blanking effect. The following program illustrates the problem (on a 4 Mhz Nascom 2).

10 CLS : STARTAT 48,23 ; PENFLIP 20 FOR A=1 TO 400 30 DRAW 8,8 : PR: NEXT

Insert extra colons before the PENRET command to vary the timing and observe the results.

PLOTTING ON THE SCREEN

Graphic co-ordinates have been changed slightly while using Nas-Graphpac. "Y" co-ordinates 45, 46 and 47 no longer appear on the top unscrolled line of the screen but are found in their correct positions near the bottom of the screen. This should not affect existing software as SET, RESET and POINT are unchanged and use the old graphics co-ordinates. X,Y co-ordinates are still numbered in the usual way. co-ordinate 0,0 is found in the top left hand corner and 95,47 is found in the bottom right corner. An option is available whereby attempting to plot at X,Y co-ordinates off of the screen will not cause an FC error. With this facility it is quite possible to place the CAP at X,Y co-ordinates 200,23 and draw a circle using the CIRCLE command with a radius of 175. Part of the circle will appear on the screen. Arguments given to Nas-Graphpac commands must not exceed 32767 or BASIC will cause an FC error.

The location which has to be PEEKed after a PTEST command is executed can be found the the ROM BASIC workspace at 4177 decimal (1051 hex).

\

24


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











Page 24 of 55