Home Page

 


EARLIER FEATURES

 


FEATURES CONTENTS

 


LATER FEATURES

 

Features Contents


19th Dec 2003

KEN ABOUT ... OLD, HIDDEN & NEW

Ken Ross

email.gif (183 bytes)
petlibrary@bigfoot.com


 

NOW WITH ADDED PROCEP EDITOR

Back in the 20th century, (always wanted to start an item that way!), there was a reference in Osborne / Strasma's book on the CBM/PET to an item from Commodore France ~ Procep Editor. Upon taking over as CBM librarian I found out that it was lurking on disk B1, but somehow or other it had been missed off the 'list-me' disk descriptor file, which was promptly resolved at that point.

It's a BASIC extension adding some more instructions & commands to BASIC 4 and requires an 8032 or above. It shares some of COMAL's characteristics in formatting etc.
As it's a runtime extension it has to be loaded before its features can be used on other 8000s and while experimenting I found that the Procep's instructions could be called even if I'd put a REM on the line first, (oops what happened there?)

I've mentioned BASIC extensions and Procep Editor in a previous article, in which Mr. Cooley gave a clear explanation of how the built in BASIC is tweaked to use a soft loaded extension. This can be found at:
http://www.icpug.org.uk/national/features/021130fe.htm

PROCEP EDITOR handles both data entry in the form of an INPUT editor and extended precision maths, as decribed in this info file that accompanys the BASIC extension on the disk that was prepared by Joe Griffin.



This document tells how to use new BASIC instructions,
which use the screen in the following ways:
- editing data in any place
- defining bounded data entry fields
- aligning columns of figures

It occupies 4K bytes starting at $7000, & is usable only with 80 column models.

TO LOAD & RUN PROCEP, USE:
dload "procep editor"
sys7*4096

(It's then loaded into the CBM's memory but tucked up out of the way of BASIC, so that all the normal functions & routines can be used but Procep can be called into use.)

INSTRUCTIONS:
- All instructions begin with "&".
- Add ":" after the instruction THEN, if it will be followed by "&".

(THEN : & Procep instruction)

- Parameters shown here in parentheses are optional.
- All parameters may be variables or expressions.
eg.
&line3*i,i,i+2
- If the same instruction will be used more than once before any other instruction, simply add a SPACE character and the next parameters, rather than retyping the "&" and instruction.

eg.
&line80,0,0 80,0,24:rem draws 2 lines
- The notation X,Y shows screen coordinates, with:
- the origin, whose coordinates are 0,0, at the top left corner.
-X is the column number toward the right.
-Y is the row number toward the bottom.
eg.
the bottom right corner is at 79,24

&lineL,X,Y
Draws a horizontal line on the screen.
-L is its length in columns.

&colL,X,Y
Draws a vertical line on the screen.
-L is its height in rows.

EXAMPLE: To draw a screen border,
&line80,0,0 80,0,24:&col25,0,0 25,0,24:rem top, bottom,left & right

&outV,X,Y(,"format")
Displays variable V at X,Y. If it is numeric, it may be formatted.
eg.
&out"this is an example",30,24

&clearL,X,Y(,R)
Erases a horizontal line of length L, starting at X,Y.
If L is a string, enough columns are erased to contain its length. If R is given too, a vertical line is erased instead.

eg.
10 a$="left$it [return] to go on"
20 &outa$,0,24
30 get a$:if a$<>chr$(13) then 30
40 &cleara$,0,24

&sp"(@)d:name"
Saves page to disk, where "name" is the disk file name, "d" is 0 or 1, and "@", if present, overwrites any existing file of that name on disk.
eg.
10 &sp"0:page01"

&lp"(d:)name"
Loads a page from disk, where "name" is the disk file name, and "d" is 0 or 1.
eg.
10 &lp"page01"

(this instruction may look small, but it enables you to create a screen that be saved to disk as a PRG file, to be loaded directly onto screen again when called up. When I explored PROCEP EDITOR some time ago I created a primitive spreadsheet type program with a complete help & instruction system. I used this feature to save the CBM's memory for data, as the program needed a lot of explaining!!)

&scrollX,Y,L,H,S
Scrolls a window up or down, where H is the height in rows, and S is either "u" for up, or "d" for down.
eg.
10 &scroll40,0,40,25,u:rem moves upper right quadrant up

INSTRUCTIONS FOR BOUNDED DATA ENTRY FIELDS
These instructions help you define data entry fields on the screen, and help the user enter the data with a mini-editor.
Characters accepted by the mini-editor:
-either all alphanumerics, or numerics only, as defined.
-horizontal cursor controls, including INST and DEL.
-HOME homes the cursor within the current field.
-CLR erases and restarts the current field.
-RETURN, returns to BASIC.
When a field is filled, it is shown in reverse field. If additional characters are entered:
in an alphanumeric field, the chime is sounded and the character ignored.
in a numeric field, the chime is sounded and the field erased.

&reqzN
Jumps to the mini-editor for entry of field N.

&inzN,V
Fills non-array variable V with the contents of field N.
(To place it in an array, copy it into a temporary variable first.)

&erazN
Erases field N.

&deczN,X,Y,L(,n,r,m,p,"format")
Define a data entry field, where N is its number, from 1 to 127.
"n", if present limits entry to the characters 0 through 9, "+", "-", and ".".
"r", if present, returns to BASIC on any invalid input.
In this case, the offending character is retained in variable "zo$" for testing and further action. Also, on returning to that field, the cursor begins where it found the error.
'p,"format"', if present, specifies a format, and automatically makes the field numeric. The field length must match the format length.
"m", if present, displays alpha characters in all-caps.
eg.
10 &decz1,34,0,20,r:rem define field, and exit on error
50 &out"item:",26,0:rem question
60 &reqz1:rem get a response
61 er=asc(zo$)
62 if er=17 then:&scroll0,12,80,13,d:rem down scrolls parts list down
64 if er=145 then:&scroll0,12,80,13,u:rem up scrolls list up
66 if er<>13 then 60:rem unless field is correct
70 &inz1,a$:rem copy field 1 to a$
120 &eraz1:rem erase field 1

A nice touch in this example is the use of cursor UP and DOWN to scroll a parts list for the user in the bottom half of the screen, while asking for a part number in the top half of the screen.

FORMAT
Formats a number, much as a CBM printer might. The allowed characters are:
-9 specifies a numeric position.
-8 same, except forces a zero in unfilled columns.
-2 specifies sign position, prints "+" if positive.
-1 same, except prints a SPACE if positive.
All other characters display literally, including SPACE.
eg.
10 &outso,0,0,"$1999,999.88"

In case of format overflow:
In a bounded data entry field, the chime sounds, the field is erased and the user must try again.
(Note that the format isn't checked until RETURN is pressed.)
In display mode excess decimal places are truncated. If the integer portion exceeds its bounds, the chime sounds and the area is filled with "***" characters.

MULTI-PRECISION MATH
The usual 4 functions are included, with a precision of 22 significant digits, and an exponent between -64 and +63.

&addV1,V2,V3
Add variables V1 and V2 together and put the result in variable V3. V1 & V2 may be any variable, but V3 must be a string variable, in order to hold a result potentially more precise than numeric variables can accommodate.

&subV1,V2,V3
V3=V1-V2

&multV1,V2,V3
V3=V1*V2

&divV1,V2,V3
V3=V1/V2

eg.
&div1,3,b$
print b$
.3333333333333333333333

As supplied, the display will go into scientific notation if the exponent is greater than 22 or less than -3. Supposedly, one may alter this somehow.



Also with Procep Editor is a small instruction program.

10 dim ref$(22):dim art$(22)
15 print"hit [rvs] to end":fori=1to1999:next
20 print""
30 &line80,0,0:&line 80,0,24
(horizontal line top & bottom of screen)
35 &col25,0,0:&col25,79,0:&col25,20,0:&col25,65,0
(4 vertical lines across screen at 0, 20 ,65 ,79)
40 fori=0to22
50 &decz2*i,4,i+1,7,n,r,p,"9999999"
60 &decz2*i+1,25,i+1,19,r
70 nexti
80 fori=0to22:&outrnd(0)*10000,67,i+1,"$199,998.88":nexti

(next generate some random numbers & format them)
90 i=0
100 if i=46theni=0
110 if i=-1then i=45
120 &reqzi
130 ifasc(zo$)=13theni=i+1:goto100
140 ifasc(zo$)=13+128theni=i-1:goto100
150 ifasc(zo$)=17then:&scroll67,1,12,23,d:&outrnd(0)*10000,67,1,"$199,998.88"
160 ifasc(zo$)=145then:&scroll67,1,12,23,u:&outrnd(0)*10000,67,23,"$199,998.88"
170 ifasc(zo$)<>18thengoto100
180 fori=0to22
190 &inz(2*i),a$:ref$(i)=a$
200 &inz(2*i+1),a$:art$(i)=a$
210 nexti
220 printchr$(147) : rem clr
230 fori=0to22 240 print "ref$("i")="ref$(i),"art$("i")="art$(i)
250 next
260 printchr$(19) : REM HOME
270 end


The end result, (as near as I can get in HTML), looks like this:

ALT=_CBM8000_SCREEN____BELOW_THIS_LINE_USING_HTML_TABLE_GRAPHIC_
   $  7,238. []
$  7,238.63$  7,238.63$  7,238.63
$  7,238.63
$  2,062.63
$  6,533.24
$   ,925.87
$  2,529.11
$   ,220.47
$  4,377.36
$   ,182.69
$  2,260.06
$  7,162.04
$  3,515.42
$  3,201.64
$  8,025.79
$  1,241.36
$  5,869.43
$  4,339.98
$  5,712.44
$  1,595.24
$  5,791.94
$   ,968.28
$  1,046.64
$  1,164.82
$  4,302.12
  
 

AND A BRAND NEW SPECIAL FORMULA

ALT=_CBM8000_SCREEN____BELOW_THIS_LINE_USING_HTML_TABLE_GRAPHIC_

__________________________________

 COMMODORE 8000 SERIES OFFLINE HTML READER

 FIREBALL XL7
__________________________________

 INDEPENDENT COMMODORE LIBRARY

 ken ross

 december 2003

__________________________________


 looking for INDEX.HTM

__________________________________



This is the first public showing of my latest effort for the 8000 series, an offline HTML reader, so now you can get your favourite online journal onto a CBM floppy and read it at your leisure on your 8000!

HOW TO USE IT

FIREBALL XL7 will look for any file called  index.htm   or  index.html  on drive 0 on device 8 upon start up. If it can't find that file, it asks you which file you want to start with.
The files have to be in standard ASCII instead of PETSCII but the display is in PETSCII.
By holding down the space bar it'll scroll through the HTML file.
Links to suitable local files are put into a simple menu list that's presented at the end of the file to choose the next one to be looked at.

HTML tags it knows about

<B> BOLD  tags are displayed in reverse video
<IMG SRC=  ALT="..... labels are shown
It'll have a go at <TABLE's ~ very simple ones may look all right
<HR> ~ a nice simple line across the screen ~ easy
the line break <BR >  tag translates to chr$(13)
as does <P>  </P>   paragraph tags

The file isn't loaded into memory but just read from disk so, in theory, you could use an HTML that fills an entire 8250 disk.

The scrolling is just downward through the file. Reverse scrolling is planned at some point in the future.

Fireball XL7 uses BASIC 4 disk commands, so it may not work on machines using BASIC 2

It's now ready for download with this link to the ZIP'd PRG file:
FIREBALL-XL7


NO ARTIFICAL INGREDIENTS

As from the 11th of December 2003 it's a fineable criminal offence to send unsolicited emails, according to legislation passed in Europe. However, as most of the worlds 200 worst spam merchants live in the USA and the Far East, as yet my inbox has yet to see any downturn in the daily deluge.

Ed: Don't expect any reduction in the future either. Unlike Europe, where you have to opt-in to receive Spam, the recent US anti-Spam law allows unsolicited mail, provided the receiver has not opted out. Since one NEVER responds to a spammer, because it tells them you have a valid e-mail address with the result you get even more spam, you are hardly likely to opt-out. It seems governments on both sides of the pond are equally stupid! Dominic White wrote in the Daily Telegraph that the UK spam laws are enforced by the Office of the Information Commissioner. To report an offence you will have to send a complaint form by SNAIL-MAIL and they will take at least 28 days to respond. Nice to know they are fully up-to-date with modern business practices. Not that much is likely to happen. The Office of the Information Commissioner is, I believe, what used to be the Data Protection Registrar. We have had Data Protection Laws for over 10 years. Do you know of any prosecutions?

Being a moderator on a Mac mailing list that uses Yahoo groups as its home, it amazes me that spammers also go through the business of signing up to the group just to try & post stuff on it!

When I find such things it's a quick trip to non personage for them. I find a Yahoo mailbox and, yes, signs are that they live in the USA.


 

 

 

 


TOP