Jump to content
IGNORED

Atari basic...no 'delete line' keyword?


Recommended Posts

Yep, Atari BASIC sacrificed much to stay within its 8KB design contraint. Avery Lee is to be commended on how much he squeezed into his Altirra 8KB BASIC. But if you want much more capable BASICs, use OSS's BASIC-XL or BASIC-XE. There is also Turbo BASIC-XL (not by OSS, just named similarily) which is nearly as good as the OSS products but is PD and even has a compiler and run-time. OSS BASICs are bank switching cartridges so they are 16KB but only map in 8K at a time.

Link to comment
Share on other sites

I remember that there was a poke where the cursor goes from its position to the bottom and enters all the text on the screen. You can delete a line by putting the line number with nothing extra on the screen. IMHO the bottom line was a continue.

But that is also programmatically.

I have never heard of that functionality. And I never really missed it.

How does it work in other basics?

Edited by 1NG
Link to comment
Share on other sites

POKE 842,13 sets the E: device #0 to forced input which allows you to setup commands you want entered - so equally you can delete lines.

 

In essence Atari Basic is actually 10K because most other Basics have the FP routines embedded. You could even say it's bigger than that because other computers with graphics commands often have them within the Basic rather than OS as well.

 

An alternate to deleting lines can be to just LIST "D:file.bas",start,end

Save the parts of the program you want in seperate files with the LIST command, then NEW and ENTER them back from the files.

Long way about it, but it acheives the missing Delete function, plus does the variable name and wasted space cleanup at the same time.

Link to comment
Share on other sites

I noticed that the 6502 source for BBC BASIC (with inline assembler) is up on the Internet. That compiled to 16K, and would probably port quite nicely to banked cartridge.

 

What is "BBC BASIC?" I haven't heard of that one before, and I've heard of a lot of them: MGM, Advan MS, TBXL, BXL, BXE, Atari A, B & C, Altirra, and others I know I have forgotten.

Link to comment
Share on other sites

I remember a lot of OS* type statements tied into the operating system, but these presumably got jettisoned or repurposed when the language was ported innumerable times to all manner of different platforms. It does have an in-line assembler, and I remember this BASIC being bloody quick on the Model B when I was at school (although I know the Beeb's CPU was clocked fast anyway). Probably a version of Altirra BASIC which completely relieved itself of FP (or had room to implement INTs simultaneously) would be similarly cool... and would fly.

Edited by flashjazzcat
Link to comment
Share on other sites

There is one cool way to do line delete in Atari BASIC:

10 GRAPHICS 0:POSITION 0,0
20 REM THIS LINE WILL BE DELETED
30 REM SO WILL THIS ONE
40 REM AND THIS ONE
50 REM THIS LINE WILL NOT BE DELETED
60 PRINT 20:PRINT 30:PRINT 40
70 PRINT "POKE 842,12:CONT"
80 POSITION 0,0:POKE 842,13:STOP
90 LIST

How it works: POKE 842,13 puts the Atari into forced read mode, as though you were continually pressing the RETURN key. You PRINT the commands you want to execute, making sure you include a POKE 842,12:CONT at the end, and including the line numbers you want deleted, then home your curor and issue a STOP command. It also works if you need to ENTER a .LST file from disk, since that cannot be done normally without interrupting program execution.

Link to comment
Share on other sites

There is one cool way to do line delete in Atari BASIC:

10 GRAPHICS 0:POSITION 0,0
20 REM THIS LINE WILL BE DELETED
30 REM SO WILL THIS ONE
40 REM AND THIS ONE
50 REM THIS LINE WILL NOT BE DELETED
60 PRINT 20:PRINT 30:PRINT 40
70 PRINT "POKE 842,12:CONT"
80 POSITION 0,0:POKE 842,13:STOP
90 LIST

How it works: POKE 842,13 puts the Atari into forced read mode, as though you were continually pressing the RETURN key. You PRINT the commands you want to execute, making sure you include a POKE 842,12:CONT at the end, and including the line numbers you want deleted, then home your curor and issue a STOP command. It also works if you need to ENTER a .LST file from disk, since that cannot be done normally without interrupting program execution.

 

 

This is sure the usual way to do it with standard Atari basic, though, to be honest with you, I personally never did need the use of a Delete program line function. I used to use Turbo Basic XL, which at the time was a really good advancement.

As to programming, I don't use Basic or even Assembly, I generally create my programs with Turbo Basic XL in mind, you know, all the added functions this offers including the structured Basic commands etc.. & I fuse some Assembly to this & some general English words, but only when I key my program into the Atari, then I make the necessary changes so that it follows the language I'm programming it in.

So just to say, careless of what programming environment I'm in, virtually everything is done on paper first, do other people still do it this way, as before, this used to be good practice, but with all the programmed utilities these days, I imagine most people start programming their software, using, utility software.

You can't beat good 'ole pen and paper.

Link to comment
Share on other sites

BBC has the 2 MHz CPU with supposedly no DMA steals, so it's about 40% or so faster than the Atari in it's default graphics setup, and about double the speed of a Vic-20 or C64.

 

No DMA steals. Doesn't that mean the CPU has to do overhead stuff that Antic on the A8 does? On the A8 I know the CPU could do more if it didn't have Antic doing cycle stealing for DMA, but how much CPU would be available for actual computational work? I'm guessing the work that Antic saves the CPU more than makes up for the losses incurred from DMA. Still though, 2 is greater than 1.79.

Edited by fujidude
Link to comment
Share on other sites

BBC BASIC sounds pretty cool for a retro BASIC. I still think Action! is da bomb though, as it's output is pretty reasonably tight/efficient 6502 machine code, and it is a structured high level language. Admittedly, it can be a bit obtuse using reals/floats in Action! with the toolkit. But it is available, and a lot of programming for the 8 bits never requires reals anyway.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...