Applesoft Basic, how to hide the flashing cursor? - 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

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.

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

Related

The difference between the 6 debug function modes of the Pycharm development tool?

Question 1. Details the shortcut keys
(F8): Step by step debugging. What are the special features and scene applications?
(F7): What is the difference between step-by-step debugging and F8 function? What are the special features and scene applications?
(alt+shift+F7): It can also be debugged step by step, as if you can skip the entire loop directly, what special features and scene applications are there.
(shift+F8): It feels like the end function function, but it seems to only end the loop or function, etc., and what special features and scene applications want to inform.
( alt+F9): It should be run directly to the mouse position.
(F9): Code reset, F9 seems to be reset debugging, but some people on the Internet said to enter the next paragraph of code debugging, I tried not seeming.
What is the difference between the above 6 kinds of debugging.... Especially the first two I feel no difference. I hope that good people can introduce through typical code examples and screenshots... Thanks.
Question 2.The (alt+shfit+F7) button is grayed out and cannot be used. Why? This function should be code reverse debugging!
Screenshot of the problem:
enter image description here

How to insert an "—" direclty from my Keyboard without numberpad?

I have searched all corners of the internet, yet to find an answer to my simple question:
How to place, directly from keyboard input, the Em-Dash "—" character onto a code editor such as Notepad++ or Dreamweaver using modern notebooks (such as a dell xps 13" 2015, win10 64bit) without:
any extended keyboard numbpad, obviously;
any third party automation scripting softwares;
any charactermap insertion tools such as windows charactermap
How? Thanks!
I imagine you're asking about how to do it in Windows here.
I assume you know how you'd do it if you had a numeric keypad (Alt + 0151 if as it seems you are on the 1252 code page).
See also Insert Unicode characters via the keyboard? , in order to use the unicode value (Alt + +2014) .
This is an at least related question: How to emulate numpad on a PC laptop?
Possible solutions:
Most notebooks do have an hidden "numpad", accessible through the Fn key (see for example https://www.dummies.com/computers/pcs/the-hidden-numeric-keypad-on-your-laptop/ ).
I couldn't find out for sure if the Dell XPS 13 specifically does, but it is very likely.
This Me and My Dell manual (Using numeric keypad on a laptop) seems to explain its usage for all Dell laptops.
Use copy and paste (copy the character from some place and paste in the editor). A clipboard manager might help you if you choose to go this way.
You might also use some third-party software to have that character emitted when you press a key or shortcut, but I guess that is included in your "third party automation scripting softwares" prescription.
Use the unicode combination! I now found out that with that one you can use indifferently both numbers from the keypad and normal ones !
Unfortunately it still requires the numpad's "plus" (add) key, so you need to be able to type at least that.
See Insert Unicode characters via the keyboard? or https://en.wikipedia.org/wiki/Unicode_input to learn how to enable the combination, if it is not already enabled.
If there indeed exist laptops with no numeric keypad support unfortunately the Windows developers didn't fully anticipate for that; it probably wouldn't take much and wouldn't have negative repercussions for Windows to support the insertion via the normal numeric keys (or the normal + for the Unicode combination), but for now it's not supported (as far as I know).
It would be a bad mistake on the part of the laptops' developers to not include any way to type the numpad keys, though, as they are required by many programs.

Creating your own LaTeX keyboard layout : 1 key = multiple caracters

I've been looking for the answer for quite some time now. This is a project I have but I can't manage to find a way to do it. The main idea would be to plug an additional keyboard on my computer that write multiple letters by hitting only one key. For example, instead of writing down a (when I hit the a key), it would write \textbf{ (for example).
I already manage to find the keyboard layout file under Linux and to switch the a and b keys, but I cannot find a way to print multiple characters.
I know it exist editors (like Texmaker or Kile) that have auto-completion, but I'm most of the time working in project in groups and therefore we use writelatex.com which does not propose auto-completion in it's free user pack ! Besides, I'm doing that for my personal interest.
Thanks a lot.
Have a look at autokey. It can assign phrases to hotkeys. It requires X11.
Another option might be to use a powerful text editor like vim or emacs which both have features like this, and then copy/paste the text into writelatex.com.
Some browsers have add-ons that allow you to edit the contents of a text field on a web page with a chosen text editor.
Edit: In Xorg you can use the X KeyBoard extension to e.g. change the meaning of individual keys. While you can configure the keyboard to generate (multibyte) unicode characters, you cannot assign arbitraty character strings to one key, to the best of my knowledge.

Entering text in Windows 8 in C#/MonoGame app

I'm writing a WinRT game for Windows 8, in C#, using the excellent MonoGame. I've reached the part where the user has achieved a high score and needs to enter their name. This is causing me more pain than I'd anticipated so I thought I'd ask for help.
First of all, is there a simple "enter some text" function that I can call, similar to Guide.BeginShowKeyboardInput in Windows Phone 7, or the ancient InputBox command in VB? I'm using Windows.UI.Popups.MessageDialog for displaying simple dialog messages, but can't find any similar thing for requesting text from the user.
Failing that, is there a way I can easily use a little piece of XAML to present a textbox for the user to use?
If neither of these are possible, I guess I'll have to wire this all up myself... I then would plan to intercept keystrokes and display the required text on screen myself. As I don't have a physical tablet (just the simulator) I'm struggling to start with this. How can I:
Detect whether the device has a physical keyboard, so I know whether or not to display the on screen keyboard?
If there is no physical keyboard, how can I show and hide the on screen keyboard?
Some of these sound like they should be easy to answer, but I've yet to track down answers to any of them.
Many thanks!
Adam.
Hey there is such a way to do this in monogame. There is a new template that allows you to create a XAML + Game game which allows you to use the game class you a used to with the xaml bits as well. These links should get you started. The monogame team rocks.
There are the three game types listed there. You want XAML + Game there is a template for it now if you get the proper version of monogame.
https://github.com/mono/MonoGame/wiki/Windows-8-Project-Types
let me know if you need more help
This is not a cross platform solution but you could use a FlyOut and place the controls for data entry on the window. FlyOut guidelines are here and UI Controls for text input guidelines are here. I have also used MessageDialog in a MonoGame for asking the user simple questions (up to 3 options) or to get a Yes|No response. You can get details of that class here.

Customizing/Replacing the Windows CE 5.0 Taskbar?

I'm currently getting my feet wet with Win CE 5.0 to update some code on an existing platform. We're interested in deploying a custom shell/home screen/application launcher as well and I had a couple questions:
1) We're running the standard CE shell and I'm assuming it can be customized because the source code is made available with Platform Builder. I was wondering how "painful" it would be to completely replace it with something like a status bar at the top of the screen (think iPhone). I was thinking task switching could then be handled by shortcut keys exclusively. I have my doubts about this.
2) If it can't be removed, can the taskbar be resized and moved to the top of the screen? We're basically trying to find a way to reserve the first 20 or so pixel rows at the top of the screen for our own status bar and prevent maximized application windows from drawing over top of it.
Thanks very much for the help.
-ksudeadeye
I was happy and angry when I found the solution because it's more easy than I expect.
For 2) reserve space you need to do this:
RECT rc;
SetRect(&rc, 0, 25, GetSystemMetrics(SM_CXSCREEN),GetSystemMetrics(SM_CYSCREEN));
SystemParametersInfoW(SPI_SETWORKAREA, 0, (void*) &rc, SPIF_SENDCHANGE);
With this code you reserve 25 pixels in the top of the screen.
:D
If you have doubts maybe this can help you or this.
Good luck.
To hide the task bar is a simple registry change:
; Hide the windows tasbar by default.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\AutoHide]
""=dword:1
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\OnTop]
""=dword:0
As far as customizing, your own, that is a little more work, and not something I've attempted.
I have some experience with modifying the taskbar in CE 5.0. It is not an easy task, but the results can really add that personal touch to the device. I was tasked with adding a user mode second taskbar with a password dialog and a second type of shell notification to add icons to the user bar.
In the end, it is just standard Windows CE programming - the taskbar, notification tray, start button, etc. are just like any other windows in the CE environment.
You should start exploring here:
C:\WINCE500\PUBLIC\SHELL\OAK\HPC\EXPLORER\TASKBAR\taskbar.cpp
Be careful, clone your code, and be prepared for lots of debug cycles. This is more than 5000 lines of serious spaghetti code.

Resources