> How does someone implement keyboard interrupts in UserRPL?
> The manual mentions commands INTON and IN[T]OFF,
> but they apparently aren't in UserRPL.
Do you mean to mask interrupts off,
or to inquire whether a key has been pressed?
(the UserRPL KEY command does the latter).
Machine-language commands can be issued only
from programs containing ML code; you can of course
make a simple program, store it, then call it from UserRPL.
SysRPL programs will not be interrupted by keypresses
(even ON/CANCEL) unless they (or functions which they call)
test for it (including the ATTN? test for ON/CANCEL).
[r->] [OFF]
... Exactly what I needed to know!
thanks!
>
> [r->] [OFF]
1) Highlight a line in the LCD display. I'm using "HELLO" 5 DISP type
commands to put text on the display. How do I highlight (reverse
video) a line?
2) Use the 12th line of the display. If you do "HELLO" 12 DISP,
nothing happens. The bottom line stays blank.
3) Change the active menu from within a program without stopping it.
The selected menu only shows up after the program stops... when I want
it to go back to CST.
> The next "wish list" is:
> Highlight a line in the LCD display.
> I'm using "HELLO" 5 DISP type commands to put text on the display.
> How do I highlight (reverse video) a line?
Perhaps make the text a "grob" using \->GROB,
NEG it, and REPL it on the stack grob.
Your question inspired the following quirky program
(note that the exact address is critical,
always make a backup first):
@ "Night vision" preserver for HP49/50 series *only*
\<< DROP #2EF67h SYSEVAL LCD\-> NEG \->LCD
0 FREEZE \>> '\GbENTER' STO -63 SF -62 SF
> Use the 12th line of the display.
12th line? With what font size?
> If you do "HELLO" 12 DISP,
> nothing happens. The bottom line stays blank.
Do you mean the menu area? When is it blank?
The menu area is a different grob, but you can
turn the menu off using (system entry) TURNMENUOFF
and *then* write to it
(although not with user DISP command, IIRC;
system entries DISPN and Disp5x7 can do it,
but you'd better first find out how to use them properly).
> Change the active menu from within a program without stopping it.
> The selected menu only shows up after the program stops...
If you are using WAIT (for a key), then use -1 WAIT;
otherwise call system function DispMenu.1
If you keep going like this, you're either going to need
to write SysRPL programs or use SYSEVAL a lot in UserRPL.
[r->] [OFF]
> How do I highlight (reverse video) a line?
Oh, I forgot that the HP49/50 series has something simpler:
Do HOME 256 ATTACH, then:
\<< "314031" H\->S SWAP OVER + + \>> 'INVTXT' STO
"Hello" INVTXT 4 DISP 0 FREEZE
There you go -- displays in "reverse video"!
[r->] [OFF]
@ Applies inverse video to a text string
\<< "314031" H\->S SWAP OVER + + \>> 'INVTXT' STO
Articles about applying "styles"
(Bold, Italic, Underline, Inverse)
within HP49/50 series text strings:
http://groups.google.com/group/comp.sys.hp48/msg/c9a3996e757abcbe
http://groups.google.com/group/comp.sys.hp48/browse_thread/thread/257882eb53db3e15
You can also simply pre-edit your string in the built-in editor,
using Begin/End to highlight text, then TOOL NXT NXT Style
to apply styles to the selected text;
the User Guide actually almost explains this,
in Appendix L: Line editor commands,
except perhaps about selecting the text first.
[r->] [OFF]
I'm missing something. I take it "H\->S" means H<arrow>S.
I get "H<arrow>S314031H<arrow>S", with no reverse video.
What's the significance of 314031?
Sorry if I seem dense.
Very sorry if I seem dense, but
1) Where can I get a description of "H<arrow>S"?
2) @ does what? How?
3) The text will be generated within the program. Actually, it'll
come in on the serial port. Editing isn't an option.
I actually got the stuff to work, but not from the program. Very
strange. I had to key all of it in...
...yes, I attached 256. :-)
Whoever researched this, it's really cool!!!!
I attached 256 from within the program and it worked.
314031 translates (Hex To String, with big-endian, little-endian
twist) to \019\004\019, which appears to be an escape character of
some sort, followed by the "4" which appears to switch on reverse
video. You sandwich Your Text between that sequence, and it's
reversed.
I think all I have to do is attach 256 one time, store the
"\019\004\019" character, and apply it before and after the string to
be displayed. Really cool!!! All I need now is the replacements for
\004 to give italics, underline, and bold!
-goog49
Here we are:
1:bold (use large characters)
2:Italics
3: Underline
4: inverse
The codes would be
bold: 311031
italics: 312031
Underline: 313031
Inverse: 314031
Do HOME 256 ATTACH, then:
\<< "314031" H\->S SWAP OVER + + \>> 'INVTXT' STO
On Tue, 12 Jun 2007 10:30:48 -0500:
> I attached 256 from within the program and it worked.
Library 256 ("development" library, built into ROM
but by default not automatically attached)
needs to be attached to *compile* the program properly
(when being edited or transferred in text form to calculator),
so that you need to do HOME 256 ATTACH *before*editing*;
once compiled, the library does not need to be attached
for the commands in 256 MENU to execute, but one
might as well leave it attached all the time,
which can be done via 256 ATTACH in your STARTUP program
(if you have one), or by leaving flag -86 set,
which will also be noticed at startup (warmstart).
The APPS menu will list the Development library,
if in fact it is currently attached; commands 256 MENU
will also always show the commands, but they will be compiled
as variable names (rather than as commands) if library 256
is not in fact attached when you press ENTER after editing,
and if so then the compiled program won't function as expected.
[r->] [OFF]
Absolutely wonderous!
Is the Development Library documented anywhere?
Applying anything other than reverse video
to the small font doesn't seem very useful,
as it tends to render the tiny font unintelligible.
[r->] [OFF]
> Is the Development Library documented anywhere?
Chapter 6 of Ye Olde Advanced Users Reference (AUR)
http://www.hpcalc.org/details.php?id=6374
http://www.hpcalc.org/hp49/docs/misc/hp49gpaur.zip
HP provides it also, if you search long enough :)
Even if you find it at HP, the URL is too big
to fit within the margins of any page,
so it will probably be lost to history,
just like Fermat's lost proof :)
[r->] [OFF]