Code Monkey home page Code Monkey logo

basic_editor's Introduction

The BASIC Editor

(C) 1984 Acornsoft From the pens of Pete Morris & Chris Gibson. P.S. many thanks Pat!

An updated version of Acornsoft's BASIC Editor ROM for the BBC Micro. Extra functionality, improved usability, better performance, shadow RAM compatibility, a new HIBASIC Editor for use with the 6502 Second Processor, and a new Electron version.

Releases

Instructions, plus link to original manual.

Build instructions.

basic_editor's People

Contributors

mincebert avatar tom-seddon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

basic_editor's Issues

CTRL+up/down???

(The previous CTRL+left/right functionality - move cursor between lines - is replaced by the new CTRL+up/down shortcut. Not exactly the same, just very similar.)

Can't remember what I ended up doing, but at the very least, CTRL+up/down isn't properly discussed in the docs.

Time for a new release?

It's been over 3 years! The editor is fairly stable at this point, but I did a few fixes last year.

Command mode scrolling

Original BASIC Editor set Mode 7 for command mode, and some other mode for edit mode.

Updated version runs command mode in the same screen mode as edit mode, so that any shadow MODE (when selected - which appears to be impossible to detect) is retained when selected. This is fine in MODE 7/135, but the scrolling sucks in the 16K/20K bitmap modes. (The text window is N-3 rows: ~18.5K in MODE 0, ~14K in MODE 3. ~9K in MODE 4, and that ain't brilliant either.)

Assuming a fix for #2, the program name probably won't need a HUD entry. So there's just used bytes/free bytes left. Include this in the prompt instead, there's no need for a text window at all, and it can use hardware scrolling.

Free bytes in the command prompt would probably be enough.

12345>

Would it need something vaguely mnemonic, to indicate that's bytes free?

12345f>
-12345>

Or used/free?

12345u+12345f>

(etc., etc.)

Run/Save+Run from edit mode

Ctrl+f9 and ctrl+shift+f9 are free in edit mode. Use Ctrl+f9 to run (like Turbo C++), and (if there's a REM>) ctrl+shift+f9 to save+run.

Would be nice to be able to do this from command mode too, but it gets input via OSWORD 0, so it seems like it would get a bit too involved...

`sub_ABDB`

Copies 256 bytes using the needlessly generic memmove routine.

sub_ABDB:

Currently 30 bytes of code to make 2 copies - could be 2 little inlined loops, 11 bytes each:

ldx #0
-
lda $400,x
sta $700,x
inx
bne -

Replace program name with `REM>`

Might as well just always use the REM> name, if it's there. Make it work like (I think?) BASIC V - SAVE saves it to the REM> name if there is one, or error if not. SAVE XXX saves it to XXX.

(Just find the REM> suffix, and use that as the file name for OSFILE. It's CR-terminated, and the filing system can check the rest. Save 15 bytes of zero page and a bit of code.)

*BZ and *BR assume PAGE=OSHWM

Should really grab the value of PAGE from BASIC's zero page and use that instead. Then do PAGE=&xxxx|M before the OLD|M. Is there space?

While looking at this code, should probably make sure it's checking that BASIC is the active language first...

Case-insensitive find command

Want this for when working in lower-case assembly language... it's annoying to have to use NOCASE when entering the ROM each time.

CTRL+A and CTRL+B line commands

Does A mean Above, or After? Does B been Before, or Below? I can never remember. There must be a more mnemonic pair of options here. Or maybe I just need to add a little note to my F key strip.

Release process is rubbish

This repo dates from the time before I fully appreciated the benefits of CI. Should get it set up with AppVeyor so there's a proper release list and all that. Downloading individual binary files from inside the repo is a bit tedious, and it'd be much easier if each release had a zip of .rom files.

Mode 2/5

Command mode uses the current mode. At the time, I couldn't figure out how to detect the shadow RAM state properly, so this seemed safest. (Though, this is actually possible! - I think by querying the VDU status byte - there's something on Beebwiki about it.)

This is fine - except if you start in a 20 column mode. Then it sucks. Would be nice to select mode 7/128 (as appropriate) in this case.

(Or maybe be more clever. If you're in mode 2, why not go for mode 0? The program clearly fits, no reason not to have 80 columns. And for mode 5, you could switch to mode 4: same 40 columns as Mode 7, but 32 rows. If in a shadow mode, can do mode 128 in either case.)

ERL support?

Half-formed idea - pick up the value of ERL on entry, so it can be visited easily after discovering there's an error that needs editor work?

Or would it be better to just do this from in BASIC, using *FX138 to insert "*BE"+CHR$13+STR$ERL+CHR$13 in the ON ERROR bit or whatever? That should work already.

Lower case *be not accepted

Looking at the code for the service entry it seems that at some point it was intended to accept the *BE command in either upper or lower case, hence this bit of code:

check_be:
                ; *...
                lda ($f2),Y
                and #$df
                cmp #"B"
                bne ply_and_svc_done

with the and $df to map lower case to upper case before the comparison. After checking the CR, the code to check the 2nd character doesn't do the same, though:

check_command:
                ; *B?|M
                dey
                lda ($f2),y

                ldx #LANGUAGE_MODE_NORMAL
                cmp #"E"
                beq enter_language

With the addition of a similar AND this can be made to accept either case:

check_command:
                ; *B?|M
                dey
                lda ($f2),y
                and #$df

                ldx #LANGUAGE_MODE_NORMAL
                cmp #"E"
                beq enter_language

Hangs/crashes with TUBE 6502 in MODEs other than 7

I don't really know what the cause of this but it appears to be a combination of starting the editor with a TUBE and not being in MODE 7.

I have an BBC Master with an internal PiTubeDirect (running EggEater and upgraded to Fer-De-Lance) โ€” I don't have a real TUBE co-pro and this might be the problem, but I don't get many (if any) other problems with it. If someone has a real TUBE co-pro, they could find out if it's a PiTubeDirect-specific issue, but I'm assuming not as things like ELITE work fine.

If I power on then Ctrl+Break the machine (I have the default MODE as 7) and type *BE, the editor starts up OK.

However, if I type MODE 6 (or any MODE other than 7) then type *BE, I just get "The BASIC Editor" then the machine hangs. Pressing Ctrl+Break recovers, although the TUBE co-pro is disabled. A second Ctrl+Break recovers the TUBE.

It makes no difference if I use the HiBASIC version or the BASIC version. I got this with 1.43 and still get it with 1.44.

It doesn't matter if I pick the various different 6502 processor options in PiTubeDirect (0, 1, 2 and 3 in Fer-De-Lance).

It doesn't matter if I pick a shadow screen mode or a normal screen mode (not that that makes much difference under the TUBE, I suppose).

I'm running MOS 3.50 but it does the same thing under 3.20.

I haven't even remotely tried to debug it, I admit! I'm not sure my EXMON skills are up to it!

Thanks and appreciation for your work on this editor.

Mode Reset error doesn't work very well any more...

The Mode Reset error (caused by loading a program too large for the current screen mode) no longer has any effect, so you're left stuck in the wrong mode with the program all over the screen.

Quick fix would be to select MODE 135 (i.e., MODE 7 on a B), give the error, and cross fingers.

Another option would be to check file size with OSFILE and just not load it if it won't fit. (And something similar should apply to APPEND.)

editor_mode_id

editor_mode_id is 1 (command) or 2 (edit) - but this is a bit daft. It should be 0 (one) or not 0 (t'other), so that the code can do beq/bne after loading the value.

Should this work on an Electron? Can it be made to?

Hello โ€” not sure if this is actually a valid issue, but should this work on an Electron?

If I load in the regular (non-Hi) version 1.44, it sort-of works: I can mostly edit a file, but it hangs if I try scrolling the screen. Oddly the cursor doesn't flash, either.

I haven't done any investigation but I was wondering whether you knew it would be a major piece of work to get it running, or it should work and there are just some potential minor issues that need resolving (not that I'm expecting you to do it, particularly!).

I've also tried the Acornsoft 1.32 and 1.35 versions: 1.32 just hangs when I try to start it; 1.35 seems to show no cursor and hangs when I scroll, in the same way, so I don't think your updates have broken anything!

Thanks!

Slow interactive renumbering in Mode 0

Renumbering with F4 takes ages. Is it doing a load of OSWRCH calls?

Maybe if nothing else it could clear the screen first. Even if that's slower, you've at least got something to watch.

Basic Extensions / HiBasic... eg. While - Endwhile

Hi Folks,

Thanks for an excellent tool!

With PiTube co-pros readily and cheaply available for the beeb, have started experimenting with HiBasic and Advanced Basic so as to take advantage of the likes of While/Endwhile. Does the Basic Editor recognise the 'new' keywords? Using 1.45 it looks to change While to 'LOADACS' and Endwhile to 'EDIT'?

Thanks,
Andrew

Editor only supports 32 rows on screen

Note

get_line_ptr: .proc

There is something at $700, but I've never previously had any reason to wonder what it is, or how much more of it there might be...

More investigation required.

You can get 33+ rows using the pi copro in native frame buffer mode. And I suppose you might be able to get it with !65Host on an Arc too.

Tidy up `SAVE`/`ZSAVE`?

Have plain SAVE (abbreviation S) do a save under the default name, if there is one.

ZSAVE is then redundant.

Still need ZRUN (or equivalent) - does it need a new name? ZRUN now makes no sense, but the abbreviation Z is at least unique.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.