Page 1 of 1

Editing basic on a spectrum

Posted: Wed Aug 09, 2023 6:50 pm
by Wall_Axe
I'm using an emulator.(USP)
I press shift to get the arrows (cursor keys) but often it prints 8 instead. Does the spectrum do this?

I was pressing inv video and some other things I didn't understand while editing a line.

Then it went into something that seemed like a bug.
No matter what I pressed it did low long beep noises,like an error noise.
Does anyone know what it is?
I can't seem to stop editing this line no matter what I press.

Re: Editing basic on a spectrum

Posted: Wed Aug 09, 2023 9:52 pm
by 1024MAK
A rubber key does not mistake the 8 key for the cursor arrow. Well, as long as you are actually pressing the shift key…

The plus and 128K/+2 (gray) machines do sometimes produce the wrong character or action if you don’t quite press one of the “extra” keys “just right”. This is due to these keyboards having to make two sets (pairs) of electrical contacts at the same time.

An emulator may get things wrong if it’s processing speed is too slow.

If you have control characters in a BASIC line (and Inverse Video and the colours are control codes) and then delete part of the control code sequence, the syntax checker will not be happy and will buzz a warning. To get out of this, either work out and delete all the remaining control codes. Or just press the EDIT key again to bring the line back from memory (but you will lose any changes you made).

Mark

Re: Editing basic on a spectrum

Posted: Wed Aug 09, 2023 11:04 pm
by Bubu
In a real 48K Spectrum, if you want to edit a line in BASIC you should press CAPS SHIFT and 1, so you edit the selected line
Or if you want to change the selected line, then press CAPS SHIFT and 6, or 7 (down or up)

Re: Editing basic on a spectrum

Posted: Thu Aug 10, 2023 6:46 am
by Turtle_Quality
I would recommend using BasinC as your Basic editor / monitor - the editor is designed for use on a modern keyboard and it much much easier than using a standard emulator with the original editor (cut and paste helps a lot), plus you can single step through basic programs with windows showing values of variables.

It still insists on correct syntax for a line to be entered though, if you're entering Line 30 and you want to go back to fix a typo in Line 10, well Line 30 needs to be acceptable before you switch line.

Re: Editing basic on a spectrum

Posted: Thu Aug 10, 2023 12:04 pm
by Wall_Axe
Thanks for the answers everyone

Re: Editing basic on a spectrum

Posted: Thu Aug 10, 2023 12:15 pm
by Alessandro
Also consider ZX-Editor, part of the ZX-Modules suite: https://www.alessandrogrussu.it/zx-modules.html

Re: Editing basic on a spectrum

Posted: Fri Aug 11, 2023 2:18 pm
by Wall_Axe
thanks, when i press run it just offers to save the file in its own format and thats it

Re: Editing basic on a spectrum

Posted: Fri Aug 11, 2023 2:25 pm
by Turtle_Quality
What editor are you using now BASINC, ZX-Editor or still a standard Spectrum emulator ? Can you send a screen shot ?

Re: Editing basic on a spectrum

Posted: Sat Aug 12, 2023 3:56 pm
by Wall_Axe
That's in reference to zx-editor

Re: Editing basic on a spectrum

Posted: Sat Aug 12, 2023 9:17 pm
by Alessandro
You must associate an emulator with the file format you wish to open first.

For example: click on the first icon on the left and choose to create a simple TAP file. Select "no loader" (default) and click on "OK", then in the following window, enter a program name in the box on the right and press "OK". Select "autostart header" and then a program line number if you wish to make the program run automatically from that line, as you would do in Sinclair BASIC with a SAVE "name" LINE command.

In "Tools", select "Options", then "Applications". Click on the icon with a red arrow and the yellow "+" symbol, then from "file format" select the first "Simple tape files" option, so that "TAP" will appear on the right. Click on the box on the right in the "Application" column and select the executable of the emulator you want to use by clicking on the icon with the dots ("..."). Then click on "OK".

From this moment on, every TAP file you create with ZX-Editor will be opened in the chosen emulator when you click on the "run" icon.

For further information, consult the program help by pressing F1 while the program window is in focus, as you would do with any Windows application.

Re: Editing basic on a spectrum

Posted: Sat Jan 20, 2024 3:19 pm
by C.Born
you should NOT fear your zx and run off to an emulator

this is correct to start with
Bubu wrote: Wed Aug 09, 2023 11:04 pm In a real 48K Spectrum, if you want to edit a line in BASIC you should press CAPS SHIFT and 1, so you edit the selected line
Or if you want to change the selected line, then press CAPS SHIFT and 6, or 7 (down or up)
editing works a bit different then usual.
in 48k MODE !!!

Code: Select all

  10 LET z$="HELLO": PRINT z$
  20 FOR f=23755 TO 23859: LET p=PEEK f
  30 PRINT f;",";p;" > ";: IF p>31 THEN  PRINT CHR$ p;
  40 PRINT : NEXT f: REM 
run above line FIRST and look at the INSIDE off the basic line

now EDIT line 10

move the cursor to the right until you are at the "H"
make "E" and press a key between 1 to 7
make "E" and now press SHIFT 1 to 7
press enter
run

have fun!!