Sharp PC-G850VS
|
03-19-2020, 09:31 PM
Post: #121
|
|||
|
|||
RE: Sharp PC-G850VS
(03-19-2020 12:24 AM)thenozone Wrote: Android calculator, pocket computer emulator "PockEmul" has an emulation of the sharp Thanks for the info ! At the moment I own a REAL PC-G850V, so I prefer the "real" thing to the virtual one, but I'll do a try to compare the two devices... P.S.: I'm a teacher here, in Italy, but in this moment (COVID-19 pandemie) it is a bit difficult go out home without a reason. School closed until (at least) 6 th April, probably till 15 th April (including Easter holidays) and I need some tools of the school laboratory to build a suitable plug for the 11 pins G850 port... Bye. Luca |
|||
09-09-2020, 09:53 PM
(This post was last modified: 09-10-2020 08:17 PM by robve.)
Post: #122
|
|||
|
|||
RE: Sharp PC-G850VS
(07-11-2018 11:01 PM)jwhsu Wrote: I'm not sure if anyone is interested. I made an English translation of the PC-G850VS Users Guide Thank you so much for the English translation!!! Your User Guide was the deciding factor to go ahead and order a used G850VS from Japan. It arrived in a good shape, almost like new. I now use it regularly to write code in Basic and C, with a tiny bit of Z80 ASM. For what it is worth the PC-G850VS is a great little machine that is pretty quick. It is a nice step up from my older PC-1350, which I bought in the 80s (which came with a German manual). One undocumented feature that I found useful: I discovered that pressing SHIFT-M ("LOAD") when viewing FILES in Basic loads the Basic program selected. This isn't mentioned in the manual, although the TEXT EDITOR mentions pressing SHiFT-M to load a file into the editor. I wonder if anyone has installed a piezo speaker and what type (flat disk or cylinder) fits? I am new to this forum and catching up, so perhaps I've missed this. Thanks! "I count on old friends to remain rational" |
|||
10-03-2020, 03:20 PM
(This post was last modified: 10-19-2020 02:40 AM by robve.)
Post: #123
|
|||
|
|||
RE: Sharp PC-G850VS
I highly recommend searching for a Sharp CE-126P printer and cassette interface for the PC-G850VS, e.g. on eBay. This interface allows you to use your PC or Mac to write programs and load them in the PC-G850VS using the bas2img and bin2wav programs.
For example from a MacOS terminal: $ ./bas2img --pc=G850VS --level=8 program.bas $ ./bin2wav --pc=G850VS program.img $ afplay program.wav This converts the basic program to tokenized form, produces the wav file for the tokenized program, and plays the wav file on the headphone output connected to the EAR port of the CE-126P. Execute BLOAD on the PC-G850VS to load the program then play the wav file. You may have to turn up the volume to make this work, though I have not had any issues or failures to load programs. The bas2img and bin2wav programs are available in source code from: http://www.peil-partner.de/ifhe.de/sharp/ These programs work for a wide variety of Sharp pocket computers. You can also save files to your PC or Mac in binary form with wav2bin. I noticed a minor issue with a missing function. I submitted the fixes to the maintainer. While working on a fix, I found some hidden (undocumented) functions: ' MDF forces truncation of values as specified by USING: 10 USING "###.##": X = MDF 1.23456789: USING: PRINT X ' prints 1.23 ' DMS$ returns degrees, minutes seconds string: 20 PRINT DMS$ 10.12 ' HDCOPY appears to print the screen to a printer (but not the CE-126P) ' https://translate.google.com/translate?h...ch&pto=aue 30 HDCOPY ' SPOUT and SPINP commands 40 SPOUT X,Y,... 50 SPINP X,Y,... I could not find any information on SPOUT and SPINP. Perhaps "SP" refers to "Serial Port"? Any ideas? ==> *EDIT 10/18/20*: in addition, I just found this site https://tmfg.jp/products/detail/84 that sells USB connectors for the PC-G850. "I count on old friends to remain rational" |
|||
11-06-2020, 08:27 PM
(This post was last modified: 12-15-2020 06:43 PM by robve.)
Post: #124
|
|||
|
|||
RE: Sharp PC-G850VS
(10-03-2020 03:20 PM)robve Wrote: $ ./bas2img --pc=G850VS --level=8 program.bas As I explained above, this sends a BASIC program to the PC-G850VS. However, one nagging question that I could not answer until now is how to send C and Z80/PIC/CASL assembly source to the PC-G850VS text editor. This is possible with BLOAD in BASIC mode and then importing the C/ASM program into the text editor. To do so, first run bas2img using --type=asm: $ bas2img --pc=G850VS --type=asm --level=8 program.c $ bin2wav --pc=G850VS program.img In fact, you do not even need to add line numbers to program.c. These are automatically added with option --type=asm. Very handy indeed! Now, before we play the wav file on our desktop machine, we run the BLOAD command on the PC-G850VS to load the program into BASIC, then play the wav file e.g. with afplay program.wav. Press TEXT and select Basic: Text<-basic to import the "BASIC" program (that is actually C/ASM source code) into the text editor. Presto! We can now compile the C program or assemble our assembly program and run it. "I count on old friends to remain rational" |
|||
12-09-2020, 07:03 PM
Post: #125
|
|||
|
|||
RE: Sharp PC-G850VS
Just managed to lay my hands on a PC-G850VS myself and looking forward to taking delivery of it within the next week or so.
Many thanks to 'jwhsu' for producing an English language manual for this machine! There are only 10 types of people in this world. Those who understand binary and those who don't. |
|||
12-15-2020, 04:05 PM
Post: #126
|
|||
|
|||
RE: Sharp PC-G850VS
My PC-G850VS was delivered earlier today and having had some time to play with it, I have to say I'm really impressed with its capabilities.
Its BASIC seems to have quite a few handy features and I really like the way you can program the thing in C and Z80 assembler. I've never used CASL before and I can't see myself needing the PIC assembler. Now to write the N-Queens solver in Z80 assembler to see just how fast this thing is... There are only 10 types of people in this world. Those who understand binary and those who don't. |
|||
12-16-2020, 02:03 AM
Post: #127
|
|||
|
|||
RE: Sharp PC-G850VS
Is there any evidence of a real time clock? The manual I had originally didn’t mention one but I wondered if there was a clever PEEK or some Z80 assembler that could access something?
|
|||
12-16-2020, 07:17 AM
Post: #128
|
|||
|
|||
RE: Sharp PC-G850VS
(12-16-2020 02:03 AM)twdeckard Wrote: Is there any evidence of a real time clock? Not that I've seen. I don't think any of the Sharp pocket computers that I have, have a RTC. In fact, other than calculators that make a big song and dance about having an actual clock as a feature, I think the only ones I've seen with that are several HP machines (41CX, 71B, 48/49/50 series) and some later TI models. There are only 10 types of people in this world. Those who understand binary and those who don't. |
|||
12-16-2020, 08:23 AM
Post: #129
|
|||
|
|||
RE: Sharp PC-G850VS
(12-16-2020 07:17 AM)grsbanks Wrote:(12-16-2020 02:03 AM)twdeckard Wrote: Is there any evidence of a real time clock? At least the Sharp PC-1500 and PC-1600 had a RTC. Additional HP models with RTC: 01, 17B, 17BII, 18C, 19B, 19BII, 20b, 30b, 27S, 94. I'm sure I've forgotten some here. |
|||
12-17-2020, 04:32 AM
Post: #130
|
|||
|
|||
RE: Sharp PC-G850VS
(12-16-2020 08:23 AM)tommi60 Wrote:(12-16-2020 07:17 AM)grsbanks Wrote: Not that I've seen. I don't think any of the Sharp pocket computers that I have, have a RTC. In fact, other than calculators that make a big song and dance about having an actual clock as a feature, I think the only ones I've seen with that are several HP machines (41CX, 71B, 48/49/50 series) and some later TI models. HP Prime has one. Tom L Cui bono? |
|||
12-17-2020, 06:23 PM
Post: #131
|
|||
|
|||
RE: Sharp PC-G850VS
(12-16-2020 07:17 AM)grsbanks Wrote:(12-16-2020 02:03 AM)twdeckard Wrote: Is there any evidence of a real time clock? The Scientific Computer card (OZ-707) for the Sharp Wizard has DATE$ and TIME$ functions. |
|||
12-17-2020, 10:17 PM
Post: #132
|
|||
|
|||
RE: Sharp PC-G850VS
(12-16-2020 07:17 AM)grsbanks Wrote:(12-16-2020 02:03 AM)twdeckard Wrote: Is there any evidence of a real time clock? Given the serial port and the PIC programmer and a programmable WAIT command I would figure there has to be a timer counter in there somewhere that could be used for at least elapsed time. |
|||
12-18-2020, 07:48 PM
(This post was last modified: 01-30-2021 07:48 PM by robve.)
Post: #133
|
|||
|
|||
RE: Sharp PC-G850VS
The PC-G850 can be nicely used as a calculator, albeit in BASIC, which is cumbersome.
Attached is an RPN Complex Calculator I wrote that emulates the HP-15C. The display shows the T,Z,Y,X stack and its "imaginary stack" S,K,J,I. All of the PC-G850 function keys work. Like the HP-15C it has complex arithmetic, 2-var statistics, STO/RCL registers, and can be extended with BASIC programs (see source code). I also threw in some extra features, such as rational approximation by continued fractions. RUN to start, clears registers GOTO*R to resume without clearing registers Keys for operations and functions: A abs, |XI| -> XI C ceiling, ceil(XI) -> XI E x10^ (when entering a number) F fraction, frac(XI) -> XI G GCD, gcd(Y,X) -> X H hyp prefix to [arc]sin,[arc]cos,[arc]tan I enter imag part / back to real part J same as I (for engineers) L linear regression, slope and intercept -> Y,X M mean of y and x -> Y,X N floor, floor(XI) -> XI Q quotient and remainder of Y/X -> X,Y (quotient in X, remainder in Y) R rational, X -> Y,X such that Y/X approximates the given X within 1E-10 S stddev Sy and Sx -> Y,X T truncate, trunc(XI) -> XI V variance of y and x -> Y,X Y linear estimation of r and y given X=x -> Y,X ^ raise, YJ^XI -> XI + add, YJ+XI -> XI - subtract, YJ-XI -> XI * multiply, YJ*XI -> XI / divide, YJ/XI -> XI ! factorial/gamma, fact(X) gamma(X+1) -> X % percentage, X/100*YJ -> XI 2ndF SHIFT SHIFT does not operate CLS clear entry CA clear all, restart SPACE (or SHIFT minus) change sign, -XI -> XI ENTER push on stack BS delete LEFT delete RIGHT swap XI with YJ UP roll stack up DOWN roll stack down RCM last-x, push LM -> XI S-CONST (SHIFT CONST) display registers (press key to continue) CONST STO [+|-|*|/] #register (press digit, or op then digit) ANS RCL [+|-|*|/] #register (press digit, or op then digit) F<->E re<->im, swap X with I, ->DEG hh.mmss X -> degree X ->DMS degree X ->hh.mmss X PI push pi -> X RND random, push random 0<x<1 -> X MDF round towards zero, round(XI) -> XI STAT clear stat registers R2 to R7 M+ stat add Y,X (updates registers R2 to R7 as per HP-15C stat) M- stat remove Y,X = enter Basic expression ... any PC-G850 calculator function key such as SIN The implementation attempts to avoid intermediate overflow and roundoff issues, e.g. Numerical Recipes and "What Every Computer Scientist Should Know About Floating-Point Arithmetic". New and improved version: complex2.txt (Size: 17.45 KB / Downloads: 69) annotated with comments and complex_stripped2.txt (Size: 9.34 KB / Downloads: 41) without comments To extend the program, for example to press Q to produce the quotient and remainder of Y/X, just add an entry for key Q (ASCII 81) line 181: ' Q quotient and remainder of Y/X -> X,Y (quotient in X, remainder in Y) 181 IF A=81 GOTO 1000 1000 IF I<>0 OR J<>0 OR X=0 OR X<>INT X OR Y<>INT Y OR ABS X>=1E10 OR ABS Y>=1E10 GOTO 15 ' error 1010 N=X,X=SGN X*INT(Y/ABS X),Y=Y-N*X: GOTO 40 Enjoy! "I count on old friends to remain rational" |
|||
12-19-2020, 07:52 PM
Post: #134
|
|||
|
|||
RE: Sharp PC-G850VS
Excellent program and easy to use. I like the arithmetic store and recall, as well as the ability to enter a Basic expression. This certainly extends the usefulness of the G850 on the desk. Thanks for posting this work!
~Mark Remember kids, "In a democracy, you get the government you deserve." |
|||
12-27-2020, 06:57 PM
Post: #135
|
|||
|
|||
RE: Sharp PC-G850VS
(12-19-2020 07:52 PM)mfleming Wrote: Excellent program and easy to use. I like the arithmetic store and recall, as well as the ability to enter a Basic expression. This certainly extends the usefulness of the G850 on the desk. Thanks for posting this work! Thank you! Happy to hear that some folks may find this useful. It was fun to write a "calculator inside a calculator". I made a couple of important improvements: SHIFT and HYP annunciation, display registers, more checks to catch entry errors, and added some new functions. I also fixed a bug in Y^X and 1/X for certain complex numbers (darn me for not catching that earlier!) I own a couple of Sharp pocket computers and still use them. The PC-G850 is the fastest and is quote capable (after adding some software.) - rob "I count on old friends to remain rational" |
|||
01-25-2021, 04:09 PM
Post: #136
|
|||
|
|||
RE: Sharp PC-G850VS
Check the flash memory with a PICKit 3 or similar programmer first to see if programming actually took. Also check the config registers for proper oscillator setup. Are you using the programmer design in the manual appendix?
Remember kids, "In a democracy, you get the government you deserve." |
|||
02-22-2021, 12:26 AM
Post: #137
|
|||
|
|||
RE: Sharp PC-G850VS
I'm learning basic C on the PC-G850VS.
Does anyone know how to find the integer or fractional part in the C programming module? There is no modf function (unless I have to invoke a module first). Thanks in advance. |
|||
02-22-2021, 12:38 AM
Post: #138
|
|||
|
|||
RE: Sharp PC-G850VS
The C that is available in those machines is quite limited, it does not include either the full 'standard' C library of functions, nor all the math functions that the underlying BASIC computer has available. "It was intended for learning the basics of C programming, but not for doing numerical analysis in C" - that quote is from the Engineering Manager responsible for developing these machines, when I asked him a similar question. I was disappointed too...
--Bob Prosperi |
|||
02-22-2021, 02:17 AM
(This post was last modified: 02-22-2021 04:44 AM by robve.)
Post: #139
|
|||
|
|||
RE: Sharp PC-G850VS
(02-22-2021 12:26 AM)Eddie W. Shore Wrote: I'm learning basic C on the PC-G850VS. The integer part of a (double) float is found by casting the value to an int or long, like so: float x = ...; // or double x long n = x; Note: - Values are truncated towards zero. - The value of x should not exceed the range of long, otherwise you may end up with garbage (remember, C is not the safest programming language and assumes you know what you are doing!) The range of int (and short) on the G850VS is -32768 to 32767 and long is -2147483648 to 2147483647. - You can also cast values to int or long within expressions, like (long)x casts x to long. To obtain the fractional part: float x = ...; // or double x long n = x; float f = x - n; Note that float on the G850VS is limited to 4 significant digits, best is to use double with 10 significant digits. Basic uses 12 or 13 digits internally for calculations, I don't know if that is true for C on the G850VS. - Rob "I count on old friends to remain rational" |
|||
02-22-2021, 02:53 AM
(This post was last modified: 03-02-2021 10:26 PM by robve.)
Post: #140
|
|||
|
|||
RE: Sharp PC-G850VS
(02-22-2021 12:38 AM)rprosperi Wrote: The C that is available in those machines is quite limited, it does not include either the full 'standard' C library of functions, nor all the math functions that the underlying BASIC computer has available. That is not true IMHO. The C compiler/interpreter has the same math functions as BASIC offers, but no more than that, because there is no <math.h> you can #include. However, you can define your own .h file (e.g. math.h) with extra functions that you often use and save it to the file system. Then simply #include "math.h". The C implementation on the G850VS is complete. I don't find it lacking at all. And I am quite demanding with over 30 years of C programming experience. It offers #include (your own files, i.e. not the standard <math.h>), #define, all standard string functions, and IO with common C functions for IO including printf/scanf with format strings as you would expect, and printing to the stdprn stream (instead of stdout) and SIO RS232 with stdaux and stdaux1 streams. It has #if-#ifdef and it even supports function pointers! The only practical limitation is memory, which is not the largest on this device (I wish it was more like the PC-E500S in that way and the PC-E500S has a more advanced version of BASIC if you care for that sort of thing). Here is a simple math.h to get started: 10 long trunc(double x) { return x; } or one can define this as a macro, but macros are limited in length and the complexity of expressions allowed in macros has some limits. Save this as math.h and add #include "math.h" to your C program. The line numbers in these files don't matter. They are just for editing. Renumber is done with the R command while in TEXT mode. Search with S"something" to find something in your program. The cursor jumps to the match. Where there is a will there's a way! - Rob "I count on old friends to remain rational" |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)