I've been an HP calc lover for a long time. (In fact, once upon a time I used to work at HP Corvallis, although on the HP100LX/200LX and not the calcs.) So when I heard about the HP Prime, I pretty much had to order one! I'm living in Canada these days; my order is on its way from HPCalc.org, but I don't expect it for a while. My experimentation to date is limited to emulator and reading the user manual. My last few calcs have been RPL. I never had one of the "BASIC" models. So I have some questions.
1) I have a Mac, so I think I'm stuck with either VMWare or WINE for running the HP Prime emulator. I'd rather not pay for a VM'ed Microsoft just to run the emulator, so I've got it in a WineBottle and it seems to mostly work. However, this simple program doesn't appear to work properly, and I'm wondering--is this an emulator problem, a WINE on Mac problem, or a bug?
EXPORT test()I know there are simpler ways to do this (like with RECT), but this is just a test.
BEGIN
LOCAL c;
c = RGB(0,0,255);
FOR X FROM 0 TO 319 DO
FOR Y FROM 0 to 239 DO
PIXON_P(X,Y,c);
END;
END;
FREEZE;
END;
I would expect the screen to be all blue. I've tried several variants of things within the pixel loop, it's never a color other than black, regardless of what I put into the PIXON_P command. I suspect I'm seeing an artifact of the WineBottle containing the .exe for the Mac, but it'd be great if someone could help verify this. Could be a bug in my code too, but for the life of me I can't figure out what it might be.
2) Another problem that I think is related to WineBottle emulator (and not the Windows emulator) is that the code above partially paints the screen black from the left-hand side, but doesn't finish the whole screen UNTIL the mouse cursor is moved. Many other functions also don't appear to update the screen content until the mouse moves. Does this behavior show up on the Windows emulator too? If not, maybe there are some things I can mess with in the WINE configuration.
3) I'd like to do some significant programming on the Prime, but I think it will be painful to do it on the calc itself. I don't think it would be that much easier on the emulator (although at least you can touch type in the emulator :-). That lead me to wondering about creating an IDE for the Prime. Don't know if I'll get up the will to do this, but I was thinking Eclipse plug-in with syntax coloring for HP BASIC. However, it'd be great to actually connect to the Prime for debugging the program, just like a proper little embedded device. As best as I can tell, there's no way to do I/O over USB on the Prime side. I see people are trying to reverse engineer the PC/Mac side of the USB link, but that effort seems to be limited to duplicating what you could do for the Connectivity kit under Linux. That is, there's no way to build a Prime program that could receive arbitrary data. Is that a correct observation--no USB I/O on the calc itself?
4) Also on the debugging front, I'd need to be able to manipulate programs. That would include things like turning strings into programs, starting program in debug, single stepping program, etc.--all from programmatic control. I'm pretty sure that RPL could have done this--at least part of it--because there are handy to/from string functions that can create executable code. A careful reading of the Prime manual tells me that either those things aren't there, or they're well disguised in some "trick". Can you create a program that can create or debug another program?
5) Last question (for now). Is there any fundamental difference between these two constructs?
Value -> Variable;Where of course, "->" is a two character representation of the solid right-pointing triangle character. The user manual seems to favor the first, but it's a lot less natural for programmer types like myself and just looks odd. Is there some execution speed or byte code size reason to prefer one over the other?
Variable := Value;