Jump to content
danwinslow

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

Recommended Posts

OK, so I feel like a dummy, but does Atari Basic really not have any way to delete lines in immediate mode other than typing empty line numbers one after the other? I know you can fool around and delete lines programmatically, but wow, I had forgotten how primitive atari basic was I guess.

Share this post


Link to post
Share on other sites

There is no keyword to delete lines but you can LIST "D1:LINESX.LST",lineno,lineno+n. That saves a block(s) of line numbers that can be ENTERed into a NEW program.

 

Best solution is to use BASICXL for editing your program.

 

Bob

  • Like 1

Share this post


Link to post
Share on other sites

From my experience, most BASIC's of the time were like that... I certainly don't remember a way to delete a line in Spectrum or Oric BASIC other than the way you described.

Share this post


Link to post
Share on other sites

I ditto bob1200xl's BASIC XL suggestion. BASIC XL is totally compatible with Atari BASIC and includes the "Del" command you're looking for. 99% of the time I'm working with BASIC I'm using BASIC XL instead of Atari's BASIC.

Share this post


Link to post
Share on other sites

Basic XL is the best solution, but others, including Turbo Basic XL (and Frost) + lots of add-ons have DEL built in. Didn't Altirra Basic get a DEL command? Amazing what Phaeron was able to add and keep it at a romable 8K.

 

-Larry

Share this post


Link to post
Share on other sites

If you have an 800 with the right slot, "The Monkey Wrench II" has the ability to delete lines as well.

  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Looking back, it would have been much nicer to have a smaller, leaner OS with more RAM available, and a larger BASIC cartridge that included all those routines that probably rarely got used by anyone but BASIC programmers anyway.

Share this post


Link to post
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.

  • Like 1

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

BBC Basic is one of the best for 8-bit computers, and fairly fast as well.

 

Porting might have it's problems, a good deal of functionality is provided by the OS. Though really all that means is a bit of reverse engineering and maybe 24K worth of flashcart instead of 16.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Can't beat pen and paper when working through doubly linked list node insertion and deletion code or similar in assembler. I have many sheets with numbered rows of cells and arrows on them. :)

  • Like 1

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

One thing I have always loved about Atari BASIC is that you don't have to use EDIT to change a line. The full screen editor made up for a lot of other shortcomings.

Share this post


Link to post
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.

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...