Applesoft Basic, how to hide the flashing cursor?

applesoft basic programs
applesoft basic permutations
applesoft basic download
applesoft basic save to disk
applesoft company
applesoft basic sound
applesoft renumber
apple iie boot to basic

I’ve finally decided to build a monthly budget program for an Apple //e, coming along nicely. Right now I’m using the AppleWin emulator.

Anyone know how to hide the cursor in Applesoft Basic? I was thinking of either hiding it using a Poke or change the cursor character to a blank space?

I know that VisiCalc does this, when you load the program, there is no flashing cursor until you begin editing. I want to do this same feature in my program.

Note: I don’t want to do it through the emulator as I will eventually move this to Apple hardware.

I found a solution for this here. Terminal control/Hiding the cursor.

I was able to hide the cursor using the WAIT command, then grab the next character with GET.

WAIT 49152, 128
GET I$

More examples here: Applesoft Basic Examples

Terminal control/Hiding the cursor, The task is to hide the cursor and show it again. BASIC. {{works with|QBasic}} '​hide the cursor: LOCATE , , 0 'wait for a keypress SLEEP Applesoft BASIC. = This should be adequate, because the blinking cursor disappears in Word when you start typing, and when you stop, it starts counting the blink interval in the OFF mode. This means you can pause for up to 5 seconds until it blinks back ON.

VisiCalc is written in assembly language, and so is Applesoft BASIC - and so is the firmware routine that Applesoft calls to get a key while flashing the cursor. You can read the keyboard without flashing the cursor from Applesoft or assembly language, but you need to learn the underlying soft-switches used to do this.

Name     Hex    Decimal  Negative
KBD      $C000  49152    -16384
KBDSTRB  $C010  49168    -16368

In summary, you read KBD to get the value of the last key pressed. Bit 8 of that value (the 'strobe') will be set if it's a new key - in which case you need to subtract 128 to get the key value. You then access KBDSTRB to clear the strobe bit of KBD. For more details I refer you to page 5 of the Apple II Reference Manual or page 12 of the Apple IIe Technical Reference Manual.

Another good book which talks about this and many other things is The New Apple II User's Guide.

Here's a simple example of how to use these soft-switches:

10 KEY = PEEK (-16384) : REM READ KEY
20 IF KEY >= 128 THEN PRINT PEEK (-16368) : REM CLEAR STROBE
30 GOTO 10

Finally, consider visiting Retrocomputing for these kinds of questions.

Applesoft BASIC Reference, Apple II Programmer's Reference: Applesoft Commands · Applesoft BASIC VTAB aexpr: Position text cursor vertically (124); INVERSE: Set output mode to black-on-white; FLASH: Set output mode to flashing; NORMAL: Set output mode to white-on-black; TEXT: Set display to text mode CHR$(24), Disable mousetext. 2 Applesoft Basic, how to hide the flashing cursor? Aug 11 '18. 1 Applesoft Basic, how to hide the flashing cursor? Aug 11 '18. Badges (5) Gold

Original answer:

There is a undocumented way to do this on Apple IIe

POKE 2043, ASC(" ") + 128

More info: https://www.atarimagazines.com/compute/issue90/Feedback_Custom_Cursor.php

Update

As @Nick Westgate said. This works for Apple IIc and not for Apple IIe.

More info: https://github.com/AppleWin/AppleWin/issues/135

How can I disable the cursor from blinkin…, Question: Q: How can I disable the cursor from blinking on a global level (mac os x yosemite)?. I've already tried to enter several commands in  More blinking. Still blinking. (It actually looked a bit like this) A bit confused, I dug through the boxes some more and found a book called “A Touch of Applesoft BASIC“. It was a brief tutorial on how to program in BASIC and, as far as I could tell, learning what was in this book was the only way for me to get my new computer to do anything.

C64 BASIC: How to suppress the '?' sign when using the INPUT , Here is a simple one I just threw together: 10 NA$="":PR$="Name:" 20 GOSUB A$;:GOTO 50010. BITD I had a blinking cursor implemented. Applesoft BASIC Quick Reference. This is intended as a quick reference for the Applesoft BASIC in JavaScript by Joshua Bell. Extensions beyond Applesoft BASIC are called out with footnotes. See also: Apple II Programmer's Reference: Applesoft Commands; Applesoft BASIC Frequently Asked Questions (FAQ)

24 hidden settings that can maximize your Mac, Apple prides itself on the polish and slickness of its software, and on the surface, Get the most out of your Mac with these 24 hidden settings *Whole life flashes before my eyes. By hovering your cursor over different corners of the screen, you can launch Nail guns for simple jobs around the house. 'hide the cursor: LOCATE,, 0 'wait for a keypress SLEEP 'show the cursor: LOCATE,, 1 Applesoft BASIC WAIT 49152,128 BBC BASIC . 32-bit BBC BASICs: OFF : REM Hide the cursor WAIT 400 ON : REM Show the cursor again. All BBC BASICs: VDU 23,1,0;0;0;0; : REM Hide the cursor T%=TIME+400:REPEAT UNTIL TIME>T% VDU 23,1,1;0;0;0; : REM Show the cursor again

Disappearing cursor in Text Editor [VS 2019], Using the mouse to place the cursor in the text causes the cursor to become visible again. it is even selected, but the cursor remains blinking in the window in which F12 Your feedback is essential for helping us decide what needs the most I can't just disable 'Preview selected files in Find Results', I have to disable the  Move the cursor to column 3, row 6 and display the word "Hello", so that the letter H is in column 3 on row 6. 5.1 Applesoft BASIC. 5.3 Locomotive Basic. 5.4 ZX Spectrum Basic. 5.6 Commodore BASIC. 16.1 Intel Fortran on Windows. 17.1 External command. 17.2 ANSI escape codes. 18 Icon and Unicon. 23 Liberty BASIC. with Ada. Text_IO;

Comments
  • Yea I’m not using 80-col, this doesn’t seem to work using 40-column.
  • Yes and I found that the emulator doesn't support it either. github.com/AppleWin/AppleWin/issues/135
  • So it looks like the emulator doesn't support the POKE 2043 trick in 40 column. But I am curious how VisiCalc accomplished this, when I load their rom into AppleWin there is not a flashing cursor?
  • I found some details about Visicalc: rmf.vc/implementingvisicalc But none about the hidden cursor.
  • It turns out I investigated this years ago and that feature is specific to the Apple IIc 80-column firmware. It doesn't work on either the original or enhanced Apple IIe.