Integer Basic

The Program They Said Couldn’t Be Written

The Aldrich brothers strike again.  Remember, folks, you read it first in Call-A.P.P.L.E..  “Convert”, by Ron Aldrich using the disk, will create a text file from an Integer BASIC program listing, call Applesoft, and presto, your program has been converted.   After Conversion, list it out and note all the lines that need to be changed to conform to the Applesoft format.

This means that the Integer commands that are not compatible with Applesoft must be changed.  For example:  TAB must be changed to HTAB and commas in INPUT statements must be changed to semicolons, etc.  The program listing is show below:

o REM “CONVERT” BY RON ALDRICH
1 REM PROGRAM LOADS INTEGER BASIC PROGRAM FROM DISK, SAVES TO A TEXT FILE ON DISK
2 REM THEN EXECUTES THAT FILE IN APPLESOFT
3 REM SOME COHMANDS WHICH ARE LEGAL IN INTEGER BASIC WILL NOT WORK IN APPLESOFT II (TAB,INPUT ••• )
10 POKE 76, PEEK (202): POKE 77, PEEK(203 )
20 DIM A$( 35 ):D$=”" : REM D$=”( CTRL) D”
30 PRINT D$;”NOMON C,I,O”
40 TEXT: CALL -936: VTAB 3: PRINT “A.P.P.L.E. PRESENTS:”: PRINT: PRINT “APPLE INTEGER BASIC – APPLESOFT II” : PRINT “CONVERSION PROGRAM”
50 PRINT: PRINT: INPUT “PROGRAM TO BE CONVERTED ?”,A$
60 PRINT D$;”LOAD “;A$
65 PRINT DS
70 POKE 33,33
80 PRINT D$;”OPEN “;A$;”FILE”: PRINT OS; -WRITE • ;A$; MFILEM
90 LIST
100 PRINT D$;”CLOSE “;A$;”FILE”
105 PRINT D$
110 PRINT D$;”OPEN I-A FILE”: PRINT D$;”WRITE I-A FILE”: PRINT “FP”: PRINT “EXEC “;A$;”FILE”
120 PRINT D$;”CLOSE I-A FILE” : PRINT D$;”EXEC I-A FILE”
130 END

WELL, RANDY???

And Now, The ROM…

By Val J. Golding

Here is a quickie about setting up the APPLESOFT ROM card.  First, as the instructions indicated, this card will function only in Slot #0 of your Apple ][.  This card allows you to make a choice of whether you want Integer BASIC or APPLESOFT to be called with Control-B after you power up.  If the switch is in the down position, APPLESOFT will be selected.  In addition, it is not necessary to change the switch position to call the non-default BASIC.  If the switch is up, hit “reset” and type C081 followed by Control-B to get Integer BASIC.  If the switch is down, hit “RESET” and type c080 followed by Control-B and return to APPLESOFT.

Write-A.P.P.L.E.


Dear Call-A.P.P.L.E.

I am writing to say I am very impressed with the Call-A.P.P.L.E. newsletter.  It is not only informative, it is also very useful, particularly the section dealing with the System Monitor and Mini-Assembler, since I am especially Interested in Assembly Language.  How about making an Assembly Language Tutorial tape.  Also, how would I go about getting a copy of the listing for Integer BASIC?

Linda Egan

6471 E. Nixon Street

Lakewood, CA 90713

 

 

Dear Linda,

if you had made a killing in the stock market, me might be able to get that listing for you.  Seriously, that is one very closely guarded secret.  And we are looking into the possibility of an Assembly Language Tutorial.

–Editor

Write-A.P.P.L.E.

Dear Mr. Golding

I recieved my July issue of Call-A.P.P.L.E. after joining the group.  I think you are doing a great job on Call-A.P.P.L.E.!  In Stopwatch (Library Pak 1A), the display flickers, this can be fixed by changing line 190:

Change POKE 34,22 to POKE 34,24.

I also have a question that others might be interested in too:

How do you use HI-RES with Integer Basic >LOAD without asking the operator to manually enter >HIMEM: 8192?  By listing your program, I see a BASIC line “5 HIMEM:16384″;  What does this do?

 

S.H. LAM

256 Hartley Avenue

Princeton, NJ 08540

 

 

Mr. Lam,

Thanks for your kind comments.  This is not easy to answer in a short space.  In fact, if space permits, we will reprint, elsewhere in this issue, an article from Apple’s newsletter CONTACT, issue 1, which explains in detail, just how to manipulate the program pointers to load a HI-RES program in BASIC, which is just about what we did in our HI-RES demo.  What you did not notice was line 0, which disappears, once the program has been run.  Line 0 reads:  HIMEM:8192, and if you try to enter it normally, you will get a ***SYNTAX ERR.  It was accomplished by first entering the line as “0 PRINT 8192″ and then locating the line in memory and changing the print byte ($63) to HIMEM: ($10).  Our Programmer’s Workshop II is helpful for this, in that is has a routine to locate and display a BASIC line as viewed by memory.  The HIMEM: 16384 you referred to would have been in the Softcore Software program, which in truth is not a program but merely a screen display that has been saved on tape.

To be continued!

–Editor

A Patch For Double Loops

By Bob Huelsdonk

When inputting to a double loop by row, then jumping out to a double loop to total by column, it is necessary to revers the subscript order.

This will not work in Applesoft BASIC because the right counters do not reset.  The following simple example will demonstrate:

80 PRINT  “INPUT ‘-1′ TO TERMINATE INPUTS”
100 FOR R = 1 TO 3
120 FOR C = 1 TO 3
140 INPUT A(R,C)
160 IF A(R,C) = – 1 THEN 300
180 NEXT C
200 NEXT R
300 FOR C = 1 TO 3
320 FOR R = 1 TO 3
340 PRINT A(R,C)
360 NEXT R
380 NEXT C

If the following changes are made, this problem is overcome:

160 IF A(R,C)=-1 THEN 250
250 FOR R=0 TO 0 : NEXT R

The empty ‘R’ loop resets the counter.

Routine to Print Free Bytes

By Bob Huelsdonk

Only line 30001 is required for less than 32K of Memory.  The first GOTO 30000 shows result with  greater than 32K of Memory. The second GOTO 30000 shows the result with less than 32K of memory.

30000 IF PEEK (203)>128 THEN 30002
30001 PRINT PEEK (202)+ PEEK (203)*256- PEEK (204)- PEEK (205 )*256;” BYTES FREE”: END
30002 PRINT 32767-( PEEK (204)+ PEEK (205)*256);” BYTES + “; PEEK (202)+( PEEK< (203)-128)*256 +1;” BYTES FREE”: END

>GOTO 30000

30719 BYTES + 16226 BYTES FREE
>GOTO 30000

27193 BYTES FREE

BASIC Programming Classes

Don Williams will be our instructor again for two levels of Integer Basic Programming classes available to our members.   Beginning and Intermediate classes will be available, with the beginning class starting sometime in August. Details will be available in the next issue of Call-A.P.P.L.E.

HIRES Capabilities and Limitations

By Darrell Aldrich

While written for Applesoft II, this article is also applicable to Integer Basic HIRES graphics mode. The High Resolution Graphics screen is composed of 280 vertical bars (X coordinates), by 160 units high (Y coordinates). The even-numbered bars are violet in color, while the odd-numbered bars are green. The color white is produced by plotting adjacent green and violet bars. (Green+Violet=White. )

By plotting only on even bars, (even X coordinates), violet plots can be made. However, since we are plotting only 50% of the points on the screen, horizontal resolution decreases to 140 points. Plotting green is exactly the same as plotting violet, except plotting is done on the odd-numbered bars (odd X coordinates ).

The HIRES routines produce the four available colors, (green, violet, white and black) by allowing us to mask off either the green or violet bars. Remember, when you set the HCOLOR variable (or location 81210) for green, that a point may not be plotted on a violet bar, and the inverse is true for plotting violet on a green bar.

Apple ][ Integer Basic Interpretation of Memory