Manual / Guide · 2016
Sharp PC-G850V(S) User Manual (English translation)
An English translation of the manual for Sharp's PC-G850V and PC-G850VS, the last pocket computers.
Manual / Guide · 2016
An English translation of the manual for Sharp's PC-G850V and PC-G850VS, the last pocket computers.
SHARP crc Lu =) QO. = oO oO Lu < oO eo) Oo. G850V(S) USERS GUIDE uc’) £a Copyright © 2018 Jack W. Hsu Version 3.0, 09/2018 All rights reserved. The manual may be freely used as a PDF for non-commercial purposes and posted on the internet. SHARP PC-G850V(S) USERS GUIDE: Table of Contents INTRODUCTION The Pocket PC Sharp PC-G850V(S) is the latest model of a long line of pocket computers that originated in the late 1970s. At the same time, it stands out from the other models because of its special features. As there are no direct ancestors to the G850 series, the basic functionality of the PC-E200 / PC-E220 / PC-G815 was used as a foundation. Functions from the PC-1600 and PC-ESO0S were added. Additionally, some mathematical functions from the PC-14xx models were introduced. A C compiler / interpreter has been integrated in the PC-G850V(S). This is most likely to be compared with the C-interpreter of the Casio Z-1GR. In addition, an integrated CASL assembler and COMET environment have been included. This guide is made for both the Sharp G850V and Sharp G850VS. The difference between the two models is the slightly lower weight (10g) and the location of the operating system of the VS in flash memory. However, since there never was an update for the operating system, this property is irrelevant. This manual should also apply for the G850 and G850S, however, it has not been verified. Unfortunately, Sharp's G models were only distributed within Japan, so they are hard to find in the rest of the world and no official non-Japanese documentation is available. This manual was developed to address the lack of English documentation for this computer. It is based on the German translation of the official Japanese version of the Sharp PC- G850V(S) manual by Jorg Wrabetz. Additional information from the official Japanese version of the manual, the description of the 11-pin interface by Ton Stahl (Appendix A), and the Sharp PC-E500 manual was added for clarification. Thanks to hpmuseum.org forum members SMP, toml_12953, and rprosperi for catching errors and making suggestions for clarifying. Thanks to forplus for additional programming examples. This manual was NOT created by the SHARP CORPORATION and should not be considered official. Distribution of this manual is subject to the friendly (not yet available) permission from Sharp. For errors in the text, in the technical descriptions, etc., as well as their consequences, no liability can be accepted. Jack W. Hsu jwhsu01 @ yahoo.com SHARP PC-G850V(S) USERS GUIDE: Basic Operation BASIC FEATURES OF THE SHARP PC-G850V(S): 1. Built-in assembler: The calculator is equipped with a built-in assembler which allows you to write programs in Z80 machine language. Programming in Basic: The G850V(S) has a powerful basic language similar to the PC- 1600 and has been enhanced with elements of the PC-ESO0S. Programming in C: To do this, the computer has a built-in compiler to execute simple C programs. Programming in CASL: CASL is an assembler language for a COMET virtual machine. This virtual machine and assembler system was created by the Japanese Ministry of Education to provide students and students with consistent training without the need for special hardware. Scientific calculations: Simple and easy execution of scientific calculations. RAM disk: A part of the internal memory can be used like a RAM disk to store programs and data. Serial interface: This makes it possible to exchange programs and data between different pocket computers or even a PC. Connecting programmable PIC microcontrollers. ii SHARP PC-G850V(S) USERS GUIDE: Table of Contents TABLE OF CONTENTS 1. OVERVIEW 1 1.1. PreCaUutiOns............cccscsssesceecesessssssscsscescescessescseescesessessssseeeeeseseusessceauseeseesessonsenaeeeseess 1.2. Using the PC-G850V(S) for the First Time ... 1.2.1. Replacing the Batteries 1.2.2. When to Change the Batteries .... 1.3. Device Overview 2. BASIC FUNCTIONS AND MODES 2.1. Switching on the COMPuter ...........ceccsssecessssecsssteessssseeeesseeessseessssseeesseeeessssceesessseeessees 2.2. Automatic Shutdown 2.3. Setting the Contrast........ 2.4. The SHARP PC-G850 Modes Mode Switching.... 2.5. Basic Operation Cursor control ... 2.6. The Display 3. MANUAL CALCULATIONS 15 3.1. Keypad Operation 3.1.1. Keys for Mathematical Operations. EXP, 10* and e*. DIGIT... USING . MDF (Modification Function) . Sign Change 3.2. Memory Operations.. 3.3. Calculations with Constants .. Using constants... Viewing constants Delete the last constant 3.4. Priority in Direct Input Calculations ... 3.5. Base Conversion (BASE-n) 3.5.1. Value Range 3.5.2. Input Number 3.5.3. Base Conversion ... 3.5.4. Two’s Complement... 3.5.5. Calcuations iii SHARP PC-G850V(S) USERS GUIDE: Basic Operation 4. STATISTICS MODE 4.1. 4.2. 4.3. 4.4. Entering STAT Mode..........ccsssccsssssecsssscessssseeesssneeessseessssceessseeesssseeesssseeeesseaeesssseeeoees One-Variable (Univariate) Statistics... 4.2.1. Data Entry 4.2.2. Univariate Statistical Calculations... 4.2.3. Correcting Errors 4.2.4. Printing Two-Variable (Bivariate) Statistics .. 4.3.1. Bivariate Statistical Calculations Calculation Storage 5. PROGRAM OPERATION 33 5.1. 5.2. 5.3. 5.4. Constants 5.1.1. String Constants .... 5.1.2. Hexadecimal... Variables 5.2.1. Types of Variables .... 5.2.2. Fixed Variables 5.2.3. Simple Variables. 5.2.4. Array Variables... Program and Data Files ... 5.3.1. File Names 5.3.2. File Name Extensions Expressions 5.4.1. Numeric Operators... 5.4.2. String Expressions .... 5.4.3. Relational Expressions. 5.4.4. Logical Expressions 5.4.5. Parenthesis and Operator Precedence ..........cscsscescesecsscesesscceecsecesesessesesesseseeseeeenee 41 6. PROGRAMMING IN BASIC 43 6.1. 6.2. 6.3. 6.4. Programs. .........cccceeeee 6.1.1. BASIC Statements.. 6.1.2. Line Numbers . 6.1.3. Labeled Programs.. BASIC Commands...... 6.2.1. Direct Commanas..... .44 6.2.2. Modes (Operating Modes). Beginning to Program ...........ssseee 6.3.1. Entering and Running a Program. 6.3.2. Editing a Program... 6.3.3. Using Variables in Programming.. 6.3.4. More Complex Programming... : Debugging .........cccsesccssseeeseeseeees 51 6.4.1. Trace Mode.... 6.4.2. Debugging Procedures iv SHARP PC-G850V(S) USERS GUIDE: Table of Contents 7. TEXT MODE 55 8. 7.1. 7.2. 7.3. 7.4. 7.5. 7.6. 7.7. 7.8. Functions in TEXT MOde .........ccccsseseecessecesssseeeescnecesssecesssseeecsscaeeesssceesesseeeesseaeesssseeeeones 55 7.1.1. Editing Programs and Files TEXT Editor Auto. List... Renumber... Delete.. Copy Search.. Replace 7.2.1. The Key... . Delete TEXT Memory (Del) .............ccsssssssscccceseessssssssccceecessessssssaeseesesssssessceeeceesessesenaes Print TEXT Program (Print) ..........csscccssssccsssseecessssecessseeessssseecssceeessseesesseecesseeesesseeeees Serial Input/Output (SIO) 7.5.1. Set |/O Parameters (Format) . Communication Parameters .. 7.5.2. Send Program (Save).... 7.5.3. Receive Program (Load).. 7.5.4, Printing oc Program File Management (File).. 7.6.1. Save TEXT Program (Save) . 7.6.2. Load TEXT Program (Load). 7.6.3. Delete Program File (Kill) 7.6.4. List File Names (Files)... 7.6.5. About TEXT files... BASIC Converter (Basic)... 7.7.1. Conversion of TEXT and BASIC Programs 7.7.2. Out of Memory when Using the TEXT/BASIC Converter.... Data File Management (RFILE) 7.8.1. Create File (Init) 7.8.2. Load Data File (load)... 7.8.3. Delete Data File (Kill) ... 7.8.4. List Data Files (Files) 7.8.5. Save Data File (Save)... mYNO OUDCDYD THE C PROGRAMMING LANGUAGE 71 8.1. 8.2. 8.3. 8.4. 8.5. Properties of the C Programming Language ...........:sssscsssseccssessecsssseesssssecesseseesssseeeenees 71 The C Compiler 8.2.1. Call the Text Editor: .. 8.2.2. Enter the C Source Program: .... 8.2.3. Compile the Source Program.... 8.2.4. Compile 8.2.5. Running the Program 8.3.1. Start TRACE Mode. Functions in Pause Mode: Redirecting Screen Output to the Printer. Functional Diagram of the C Compiiler...........:ccssscccsssscessssscesscseeessseeesssssecesseeeessseeeeeees 76 SHARP PC-G850V(S) USERS GUIDE: Basic Operation 8.6. C Programming Basics ..........ssccccscsssssssssesceeesssesssssnesesceseescessssseeeseesessesscssseeeeseesessonsses 8.6.1. Formatting Options for Output (i.e. printf)... 8.6.2. Variable Types Variable Names .... 8.6.3. Operators .... Comparison Operators .... Arithmetic Operators Assignment Operators Increment / Decrement Operators .. Logical Operators ..... Bitwise Operators. Shift Operators Keywords Escape Control Characters . 8.7. CSYNTAX 8.7.1. Compound Instructions 8.7.2. Conditional Jumps. switch...case .. 8.7.3. Loops.. for. while. do-while 8.7.4. Unconditional Jumps 8.10. Structures... wee 8.11. Compiler Runtime Options. #include “file” #define name [value] #if ... #elif ... #else ... #endif. #ifdef name ... #endif .. #ifndef name ... #endif 8.12. Library Functions 8.12.1.Standard 1/O Functions .. getc, getchar, fgetc gets, fgets scanf, fscanf, sscanf.. putc, putchar, fputc.. puts, fputs.........0... printf, fprintf, sprintf fflush.... clearerr 8.12.2.Character Functions isalnum, isalpha, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit ....... TOIOWEN, LOUPPED oo. eeeeeeceececeeeeseeeeseeseeeeseeacseeseeacseesesaesecsesaesecsesateeesesaesessesaseeesesaeeeseesseeeseesaeeeseetates vi SHARP PC-G850V(S) USERS GUIDE: Table of Contents 8.12.3. String FUNCTIONS oe lee eceeceeeeeeseeeeeeseeseeesecseseeeseecaeeesseaeeaeeseseeeeaesaeseeseassaeeeaesseseaeees 92 strcat ... strchr strcmp . strcpy strlen ... 8.12.4. Memory Functions... asin, acos, atan.. asinh, acosh, atan 8.13. Hardware Interface Functions .... 8.13.1. Mini |/O Functions miniget ... miniput... 8.13.2.8-bit PIO Control via the 11-pin Interface . pioget .. pioput.. pioset... 8.13.3.SIO (RS-232C) Control via the 11-pin Interface fclose ... fopen... 8.13.4. Buffer / Communications Controller ... 8.13.5.1/O port functions. inport 8.13.6. Memory Functions / Program Call... call... peek.. poke.. 8.13.7. Datafile Functions. fclose ... feof... flof.... vii SHARP PC-G850V(S) USERS GUIDE: Basic Operation 8.13.8.Graphic Functions . 99 circle ....... gcursor.... gprint.. line... paint... point... preset . pset.. 8.14. Other Functions.. getch... gotoxy. kbhit.... 8.15. Error Messages 8.15.1.Compiler Error Messages 8.15.2.Run-Time Error Message ........ceceseeseeeeeseeseeeeeeaeeseeeseseceeeseeeseseseeseeeaeeaeseeeeaesaeeneaes 104 9. CASL 105 9.1. The CASL assembler ..........::csscsssessesssssessessssscssesssesessesssescesesssesessessessessessesseneseeesenees 105 9.2. CASL Mode FUNCTIONS ...........csscccssessesesssesessssscssesssesensessseseesssscesessesseeseseessessenseseesonees 105 9.3. CASL Programming Procedure .........csssscccsssscecssseccsssssescessnecessseessssesenseeeesssseeseseeees 106 9.4. Entering / Editing the Source Prograim..........:csscssssssescesssesseesseceseeesseesseeeseeesseeseeeesees 108 9.4.1. Line Format 9.5. The CASL Assembler 9.5.1. CASL Assembler Log 9.5.2. CASL Assembler Error Messages.. 9.6. Simulation............. 9.6.1. Normal Execution 9.6.2. Trace Mode 9.6.3. Trace Error Messages.. 9.7. MOnitor..........cccsccsseeeesseeseeeee 9.7.1. Display Register Contents .. 9.7.2. Set Registers... 9.7.3. Display Object Code. 9.8. Sample CASL Program.. 9.8.1. Operation Example 9.8.2. Trace Example 9.9. COMET Specification. . 9.10. COMET Architecture .........:ccssescscssssesssseecesssnecessscesssseeeesseecesssceessssesesseeeesssceeseseeees 121 Vili SHARP PC-G850V(S) USERS GUIDE: Table of Contents 9.11. Command Summatry........... 122 9.11.1. Registers and Abbreviations.. 123 9.11.2.Commands 123 .123 +123 +123 .123 +123 24 124 24 24 124 .125 .125 1125 1125 .125 125 +126 .126 .126 .126 127 127 .127 127 127 127 9.11.3.Assembler Syntax.. START . END.. DC DS... 9.11.4. Macro Commands. 9.11.5.Sample Program ... 10. MACHINE LANGUAGE MONITOR 129 10.1. Using the MOnitor..........:cccccssccssssssessseccesssecessesesessseeeesssseesssceesessseeesssseeessseeeeesseeeenens 129 10.2. Monitor Commands..... ..130 USER Set User Memory -130 S Update Memory +131 D Display Memory.. +132 E Edit Memory... 133 P Toggle Printer . 111-134 G 1134 R Receive data via the serial interface 135 2135 2135 136 Ww Send data via the serial interface BP Set Breakpoint 10.3. Error Messages in Monitor Mode... 11. ASSEMBLER 137 11.1. Programming with the Assembler 137 11.1.1.Example Program.. 138 11.1.2.Assign Machine Code Area 139 11.1.3. Assemble Source Program. 139 11.1.4.Check Generated Object Program.. 140 11.1.5.Run Object (Machine Code) Program.... ...140 ix SHARP PC-G850V(S) USERS GUIDE: Basic Operation 12. 11.2. 11.3. 11.4. 11.5. PIC Coding / Editing a Source Prograim...........:sssssssscsssssssessseessceessesesceeseseeeesseeesseesseeesees 141 11.2.1.Source Program Format 11.2.2. Line Format (Instructions)... 11.2.3. Deleting a Source Program... 11.2.4. Entering a Source Program Assembler Functions 11.3.1.Assembler Menu 11.3.2. Assembling Successful Assembly... Unsuccessful Assembly Displaying the Object Code Printing the Assembler Log Sending the Assembler Log to the Serial Interface (SIO). Assembler Pseudo-Instructions .. ORG Beginning DEFB/DB/DEFM/DM Define Byte / Message DEFW / DW Define Word..... DEFS/DS = Define Memory EQU- Equal. END End.... Error Messages 13. 12.1. 12.2. 12.3. 12.4. BASIC COMMAND GLOSSARY Defining the Machine Language Area .. Creating / Editing a Source Program .... PIC Assembler 12.3.1.PIC Assembler Directives __ CONFIG Configuration ORG Set Start Address ... EQU Define a Constant .. DW Define a Word. #INCLUDE Insert a File .. 12.3.2.PIC Assembler Error Messages PIC Loader .. 12.4.1.PIC Loader Error Messages... 13.1. Scientific and Mathematical Functions ABS ACS AHC AHS AHT ASN ATN cos CUB CUR DEG dd°mm’ss” > ddd.dddd® DMS ddd.dddd° > dd°mm’ss” SHARP PC-G850V(S) USERS GUIDE: Table of Contents EXP .168 FACT .169 FIX .169 HCS .169 HSN .169 HTN .170 INT .170 LN .170 LOG .171 NCR 171 NPR .171 Pl .171 POL .172 “ (Power) 172 RCP .172 REC .173 SGN .173 SIN .174 SQR .174 SQU .174 TAN .175 TEN .175 &H . .175 13.2. General Commands.. 177 ASC... .177 AUTO .178 BEEP. .178 BLOAD . .179 BLOAD M. .179 BLOAD?. .180 BSAVE.. .180 BSAVE M.. .181 .181 CHRS.... .182 CIRCLE.. .182 CLEAR .. .184 CLOSE .. .185 CLS... .185 CONT .186 DATA.... .187 DEGREE .188 DELETE. .188 -189 190 190 191 191 192 193 GCURSOR. 194 GOSUB ... RETURN 195 196 xi SHARP PC-G850V(S) USERS GUIDE: Basic Operation GPRINT.. . 197 GRAD 198 HEXS . 199 IF ... THEN ... ELSE.. 199 IF... THEN...ELSE...ENDIF 201 INKEYS .. 202 INPUT.... «. 203 INPUT#.. -. 204 KILL... . 205 LCOPY ... . 205 LEFTS .... ... 206 LEN. ... 207 LET. ... 207 LFILES «.. 208 LINE... «.. 208 LIST... 210 LLIST.. «211 LNINPUT# w. 212 w. 212 LOCATE. « 213 LOF.... 214 LPRINT.. 214 MIDS. 215 MON. 215 NEW 215 ON...GOSUB 216 ON...GOTO.. 217 ... 218 w. 219 w. 219 ... 220 ... 220 w. 221 PRESET.. w. 221 PRINT... wu. 222 PRINTH.. 223 223 RADIAN. w. 224 RANDOMIZE ..224 READ..... 225 REM (‘).. 225 RENUM. 226 REPEAT... UNTIL 226 RESTORE .. 227 RIGHTS.. 228 RND 229 RUN... ... 230 SAVE . ... 230 STOP. ..231 «231 w. 232 w. 233 « 234 SWITCH ... CASE ... DEFAULT ... ENDSWITCH. TRON / TROFF. xii SHARP PC-G850V(S) USERS GUIDE: Table of Contents VAL. VDEG .. WAIT... WHILE ... WEND 13.3. 1/0 Commands. APPENDIX A: 11-PIN INTERFACE 243 Signals and Pin-Out... SIO mode..... RS-232 Standard and Conventions. Signal Levels ..... Data Transfer Cable CE-T800 and CE-T801.. USB PC Adapter Cable with Hardware Handshake... RS-232 printer .. we SSIO mode we CE-126P printer protocol LPRT Protocol and Mini I/O Port. PWM Mode.... CE-126P Tape Protocol.. Generic PWM protocol PIO mode PIC mode APPENDIX B: KEYBOARD COMMANDS 263 APPENDIX C: CALCULATION RANGES 265 Numerical Calculations... Functions... Statistical Calculations .... APPENDIX D: SPECIFICATIONS 267 APPENDIX E: RESETTING THE COMPUTER 269 APPENDIX F: SYSTEM BUS 271 APPENDIX G: KANJI CONVERSION CHART 273 APPENDIX H: CHARACTER CODE TABLE 275 APPENDIX I: MEMORY MAP 277 xii SHARP PC-G850V(S) USERS GUIDE: Basic Operation APPENDIX J: ROM ADDRESSES 279 ROM Routines ..........cccccsssssssesseeeescnsssscsceeecessessssscscsnceeeesssscsscssseeeeeeseuscsscnsauseeseesessossoseaeees 279 Confirmed Addresses. 279 BASIC Routines (Unconfirmed) .. 280 Other Addresses (Unconfirmed). . 281 283 285 286 286 287 BASIC Code Table.. 288 APPENDIX K: ERROR MESSAGES 289 APPENDIX L: Z80 PROGRAMMING REFERENCE 291 Z80 registers and flags.. 291 Z80 Instruction set 291 Abbreviations 291 8-bit Load Instructions.. 292 16-bit Load Instructions 293 8-bit Arithmetic and Logic Instructions 294 16-bit Arithmetic Instructions . 296 Register Exchange Instructions .. 296 Branch Instructions 297 Subroutines 298 Shift Instructions 299 Bit Commands 301 CPU Commands 301 Copy/Compare.... 302 Input/Output 303 APPENDIX M: INSTALLING A SPEAKER 305 Xiv SHARP PC-G850V(S) USERS GUIDE: Overview 1. OVERVIEW 1.1. Precautions Please do not press the liquid crystal display. The display may break. Please do not store near heaters or expose to direct sunlight (for example in a car). Due to the high temperatures, deformations can occur. Do not drop, press or expose to any other force - The device may break. Clean the surface with a soft, dry cloth. Do not use solvents such as thinner, gasoline or a wet cloth. Color changes or surface damage may occur. Please do not store with hard or sharp objects in your pocket. The device can be scratched. Always use the cover. The product is not waterproof. SHARP PC-G850V(S) USERS GUIDE: Overview The hardcover serves to protect the computer against damage. Whenever you are not using the pocket computer, please install the hardcover. For example, if you put the calculator in your pocket. Removing the \ protective sleeve: bad dad od Using sansa od oS ad od od ot te! ee ee a ea eee eee acer ee 8 st I od \ epost tsi . ee When not in use: apr eer er © aaa da eee rr fh Od et I od ot SHARP PC-G850V(S) USERS GUIDE: Overview 1.2. Using the PC-G850V(S) for the First Time (1) Insert batteries Please insert the batteries. To do so, remove the cover of the battery compartment on the back as shown in the illustration. Insert the batteries in the correct direction. Follow the pictograms in the battery compartment. Close the battery lid again. (2) Reset Immediately after inserting the batteries into the computer, the internal status of the PC-G850V is not set yet. To do this, the computer must first be initialized. e Press the button and then press the reset button under the {SHIFT) button with a ballpoint pen or similar device. Then release the reset button again. SHARP PC-G850V(S) USERS GUIDE: Overview Immediately after pressing the button, the PC-G850V displays the following screen. If any other indication appears, the above procedure must be repeated. MEMORY CLEAR O.K.? (Y/N) The PC-G850V asks for confirmation to clear the memory: e Press the key. The following message flashes, indicating that the computer has been initialized and all memory contents have been cleared. * * * KKKKKKKKKKKKKKKKKKKKKKKK ALL RESET KKKKKKKKKKKKKKKKKKKKKKKK * * * e Press any key. The following display appears: > RUN MODE (3) Check computer function To ensure normal computer function, press the following keys: (F |[R LE |S RUN MODE FRE 30179 When the above screen appears, the computer is functioning normally and ready for input. The number 30179 represents the storage capacity for programs and data. Note: If the PC-G850V(S) does not show the appropriate display after the above steps, the corresponding step should be tried again with the correct input for the step. SHARP PC-G850V(S) USERS GUIDE: Overview 1.2.1. Replacing the Batteries If BATT is displayed, the batteries must be replaced. The computer uses four AAA batteries for operation. If the batteries are too weak while the CE-126P is being used simultaneously with the computer, it can also be powered by the CE- 126P. This reduces the load on the internal battery. 1.2.2. When to Change the Batteries If the BATT warning light appears in the lower left corner of the display, it means that the batteries are too low. They should be replaced with new ones immediately. If the computer continues to be used, even though BATT is displayed, the computer will turn off after some time. After that, it cannot be turned on by pressing the button again. Note: The Pocket Computer retains its programs and files for a long period without batteries. To be on the safe side, do not remove the batteries from the computer for more than 5 minutes. Caution: NEVER remove the batteries when the pocket computer is switched on, because after reinserting the batteries the computer must always be reset and thus all data is lost. Also, you may want to backup or print all programs and data to a PC first. If an additional peripheral device is connected, the computer can be powered by this device. In this case, the BATT warning indicator does not appear even though the batteries of the computer are too weak. Before use, the peripheral should be disconnected at short notice to check if the BATT warning light appears on the display or not. Furthermore, there is a connection on the rear right side to power the computer with an external power supply (6V, 0.2W). 1.3. Device Overview The SHARP computer consists of a QWERTY keyboard similar to that of a conventional typewriter and an LCD display with adjustable contrast. On the left side is the SHARP 11-pin interface and on the right side the interface to the PIC microcontroller. Top right is a connector for an external power supply with 6V and 0.2W (e.g. power supply Sharp EA- 23E). SHARP PC-G850V(S) USERS GUIDE: Overview tena OC I(=) @, OCOWMHANDNHWNKE eee ee BWNrFO a 1 GRAPHIC )) ssua a SHARP rocker computes rc-cusv _ C-LANGUAGE asa) < Gia j mney x) t Fy B A Ge8:82 Gh ee ERR 2) eer Pere Peer Perey re J as DSO & wo DPQa (i 14) t 5) 5) Display (6 lines, 24 characters / line) 144x48 pixels) SHARP 11-pin interface for printer, serial interface, etc. Reset button (recessed) Space bar Typewriter keyboard Enter key(s) Interface for PIC microcontroller Delete key Power-on/Wake-up button Power-off button Connection for power supply (6V, 0.2W, e.g. power supply Sharp EA-23E). Battery compartment cover (on the back) Mode toggle keys (Basic RUN / PRO, Assembler, C, CASL, Text Editor) Function key SHARP PC-G850V(S) USERS GUIDE: Basic Operation 2. BASIC FUNCTIONS AND MODES There are a number of important letters, numbers and symbols on the PC-G850V. 2.1. Switching on the Computer Press the button on the right side of the computer keyboard. The computer is in RUN mode after being turned on. 2.2. Automatic Shutdown To protect the batteries, the computer automatically shuts itself off if no buttons are pressed after approximately 11 minutes. Press the button to turn it back on after the computer turned itself off. If the computer is executing an INKEYS$ command, the auto power off function is disabled. It is active while the computer is executing an INPUT command. If the computer is not used for a long time while the automatic shutdown is disabled, battery power will be consumed. This can lead to the loss of stored programs or data. 2.3. Setting the Contrast The menu for setting the contrast is called by pressing /SHIFT) and [ANS]. Adjust the contrast so that you can see the display clearly. *** LCD CONTRAST *** a DARK v LIGHT Pressing the cursor keys G) (Increase Contrast) and CW) (Decrease Contrast) adjusts the contrast. If the display is set correctly, the setting can be set by pressing the | BASIC], | TEXT | or | CLS] key. > SHARP PC-G850V(S) USERS GUIDE: Basic Operation 2.4. The SHARP PC-G850 Modes The Sharp PC-G850V has 7 different modes: RUN mode execute BASIC programs or BASIC commands, input of mathematical functions PRO mode writing or correcting BASIC programs TEXT mode entering, editing, deleting and saving (ram disk, SIO), loading (ram disk, SIO) text programs in ASCII format, conversion to BASIC or vice versa, creating and deleting data files ASMBL mode assemble an assembler program (generation of Z80 machine code) (assembler mode) CASL mode translate and execute CASL programs (accessible via ASMBL) PIC mode translate source programs and transmit them to the PIC. (accessible via ASMBL) C mode compile and run C programs. Mode Switching Mode Keys RUN mode PRO mode [BASIC | or [BASIC || BASIC] (to enter PRO mode from outside the RUN mode, press twice) TEXT mode ASMBL mode {SHIFT) + (ASMBL), then CASL mode “SHIFT + (ASMBL), then PIC mode (SHIFT) + (ASMBL), then [P ] C mode (SHIFT) + (C) Instead of /SHIFT) you can press 2ndF) beforehand. SHARP PC-G850V(S) USERS GUIDE: Basic Operation 2.5. Basic Operation Turn on the computer. Pressing will clear the screen and start typing in the upper left corer. Character input ABCDEFG (A j[B|[c¢j/pD [E][F IG} In this way you will get capital letters. Lowercase input ABCDEFGhijk1imn CHEESY J[K JL LM ON Pressing will quit the CAPS mode (always on after power-on) and will allow entering of lowercase letters. Special characters By pressing the SHIFT key and the associated key simultaneously, the corresponding special character is written. Alternatively, press the 2ndF key BEFORE pressing the corresponding key. The following keypress will enter the corresponding special character or mathematical function. ABCDEFGhi}klmn#$% (E|/R|[T | ABCDEFGhijklmn#$3<>@ (2nd [1 | (2nd) | © | 2ndr\ | P | This is how numbers are entered (1 |(2 131415) ] ABCDEFGhij klmn#$%<>@1234 The i3] 56789 Cursor control To change entered characters, use the four cursor keys (@@IG@IO)). If the cursor is at the end of a line, an underscore appears to allow continuation of the line. If the cursor is in the middle of the text field, the corresponding character flashes in black. The SHARP PC-G850V(S) USERS GUIDE: Basic Operation entry of characters overwrites existing characters from this position. When you hold down the cursor key, the cursor moves quickly over the screen. 2.6. The Display The computer has a 6-line liquid crystal display with 24 characters per line and a status bar at the top and bottom. Each character occupies a 5x7 dot matrix. The display shows key names and calculations. The display examples in this manual only reproduce the symbols required for the respective explanation of the function. RUNPRO | TEXT CASL | STAT | | 2ndF CAPS Dr BUSY CEGRAD CONST PRINT In BASIC mode, the display shows: Standby symbol. This icon appears when the computer is ready to accept an y sy! pp ip y p input in BASIC mode. When typing. As you type, the ready icon disappears and is replaced by the cursor The cursor. This symbol marks the location of the next character to be entered. When you start typing, the cursor replaces the standby icon. As a marker symbol, the cursor is also used in conjunction with the INSert and DELete functions. The underscore cursor changes to the block cursor when it is not on a character. The status lines reflect the following: BUSY This word appears on the display when the computer executes a program or command. BATT This symbol indicates that the batteries are weak and need to be replaced. RUN This icon indicates the RUN mode for the computer. PRO This symbol indicates the BASIC programming mode for the computer. TEXT Indicates that the computer is in TEXT mode. CASL This icon indicates the CASL programming mode for the computer. Enter this mode by pressing the key (SHIFT) + followed by [C ). STAT This icon indicates that the computer is in statistics mode. Enter this mode by pressing the key (SHIFT, + [MDF)) 2ndF The display appears when the 2ndF- button has been pressed and disappears with the following key command. Remember that the /2ndF! key must be released before pressing another key when the second 10 SHARP PC-G850V(S) USERS GUIDE: Basic Operation M Indicates that another number other than zero is stored for manual calculations. CAPS Indicates that the computer is in CAPS mode. If this indicator does not appear on the display, all letters of the alphabet are entered as lowercase letters. The key can be used to toggle CAPS mode on and off again. nt If you press the key, you can enter katakana syllables with Latin letters. (See page 11) By pressing this key, you can toggle this feature on and off. ay Indicates that the computer is in katakana mode and you can enter lowercase letters by turning off the CAPS mode. DEG Shows the current angle mode of the computer: RAD DEG (Degree mode) GRAD RAD (Radian mode) GRAD (Gradian mode) CONST Indicates that the computer has a constant set for calculations. When this icon is displayed, the computer performs a calculation with this constant each time the button is pressed. If the constant is no longer needed, it can be deleted with (SHIFT) + [Ca\. PRINT This icon indicates that the computer is ready in RUN mode to send data to the printer. Press {SHIFT + to toggle on and off. (Only possible with an optional printer connected.) The PC-G850V offers you the possibility of Japanese words in Kanji format entry. This function is switched off by pressing the button. (7 | SHARP rocker computer rc-cssov ar mg Se eee Ee val OADM Mw bop U\ (SHED) (2 B50 CB 8 i co cel | Saee J ts IIe) GP Toggle kanji mode ARE . Switch to lowercase letters SHIFT) + Switch to entry of consonants 11 SHARP PC-G850V(S) USERS GUIDE: Basic Operation Examples: Input Character Keyboard Input DYAt —- KATAKANA Wy3a9 — GAKKOU Avhy > HENNKAN GHED +@ AYA — DHISUKU FAAP > HAN GHED+OI ARF DayF + {CAPS OTTI When entering 'n’, if consonants excluding Y come after Shift+U (there is no need to press SHIFT + U. For details on how to write Romani, see page 273. Caution: It is not always possible to display all characters of the entry in the bottom line become: SINJY yy (JY ] 12 SHARP PC-G850V(S) USERS GUIDE: Basic Operation Special kanji symbols: tase @ MONTE prrtad gauG : GHIFD +Gy) Ga :@a :Woa LOr on heya): y 3) nA N+ —~_ weer ~ 13 SHARP PC-G850V(S) USERS GUIDE: Basic Operation 14 SHARP PC-G850V(S) USERS GUIDE: Manual Calculations 3. MANUAL CALCULATIONS The computer can be used as a 10-digit calculator. To do this, the computer must be set to BASIC RUN mode. The RUN indicator will appear on the top right of the display. Math Function Math Operator Input (1) Addition + + (2) Subtraction - - (3) Multiplication x * (4) Division + / (5) Integer Division ¥ (6) Modulo division MOD (7) Sign + or - +,- (8) Perform operation = e=)] Examples: 51¥5 @& > 10 51 MOD 5 @) >1 (51+5=10... 1) 51¥-5.7 @& >-8 51 MOD -5.7 @&) >3 (51 +-6=-8... 3) 87.57 ¥ 5.4 @ > 17 87.57 MOD 5.4 >3 (88 +5=17... 3) 30°36’ ¥ 14°36° 3) 2 30°36’ MOD 14°36’ @) > 1 (31+ 15=2... 1) 30°36° ¥ 4.4 &# >7 30°36° MOD 44@) —>3 (31+4=7...3) 87.57 ¥ 14°36°@) 5 87.57 MOD 14°36’ &) — 13 (88 + 15=5... 13) 5+15*2/4 & > 12.5 3.1. Keypad Operation The cursor key, GO, can be used to edit and change the input. To edit, move the cursor to the appropriate position using the cursor keys and overwrite the character with a new one. If characters are to be inserted, press the [INS | key for insert mode. Insert mode remains active until the [INS] key is pressed again. If the character under the cursor is to be deleted, use (SHIFT) + [INS]. If, on the other hand, the character in front of the cursor is to be deleted, use the key. 3.1.1. Keys for Mathematical Operations ANS If is used when entering a mathematical function, the result of the last calculation is inserted at the current cursor position. Example: 5+15*2/4@& > 12.5 4* (inserts 12.5) @) > 50 15 SHARP PC-G850V(S) USERS GUIDE: Manual Calculations EXP, 10*, and e* Entering the exponent is performed by {SHIFT) + [EXP]. Instead of [EXP], the letter E can also be used. Example: 36 3 > 36E3 & > 36000 52 [10*| @ > 1E52 5[e%| @ — 148.4131591 DIGIT The key, in conjunction with a number key, is used to specify the number of decimal places. If a dot ([. }) is used instead of the number key, the display is reset to the default number of decimal places. Use the key to switch between fixed and scientific mode. Example: andr) [DiciT] 2 = 5/8 > 0.63 “2ndF- 5@ 0.62500 2ndF [| Ss) > 0.625 USING Format: USING [format-string] USING allows formatted data output. The format is determined by a format-string, which consists of a series of characters enclosed in quotation marks. The format-string is composed of the following characters: # right-justified character of a numeric field delimiter between the integer and fractional part of a number , comma as separator after 3 digits in numeric fields ‘display the number in scientific notation For each # contained in format-string, a digit of a numerical value or the sign can be displayed. All other format symbols are used to describe numeric formats in more detail. Both positive and negative values can be represented, however, the sign is only displayed for negative values. The format for USING corresponds to the BASIC command USING (see page 234). USING without parameters resets the output format to default. Example: USING "#tHt. Ht" & 8/3—) 2.66 17/3 @ 5.66 16 SHARP PC-G850V(S) USERS GUIDE: Manual Calculations If the result is greater than that permitted by the output format, an error (ERROR 70) is displayed. USING "#tHt. Ht" & 17865 /3 & — ERROR 70 MDF (Modification Function) With [DIGIT], the computer displays only the specified number of decimal places, but internally it always stores all digits. Therefore, the displayed data may differ from the internal data. To match the internal and the displayed data, the modification function is used. Example: Without MDF Keystrokes Output (2ndF (ca) @) 55.4, /|9 @& 6.155555556 [*]9 6.155555556*9_ ic) 55.4 with MDF Keystrokes Output DIGIT | 3) @&) 6.156 6.156 [*]9 6.156*9_ (e=) 55.404 Sign Change The sign (—) ((2ndF! | = |) reverses the sign of the displayed result (from plus to minus and vice versa). 3.2. Memory Operations Independent memory can be selected with the keys [M+ |, [M-] and [R-CM]. Shows the contents of the memory and inserts it into the calculation. If is pressed twice, the contents of the memory will be erased. The M symbol clears. Adds the displayed result or result of a mathematical function to the memory. If the memory was empty before (i.e. 0) the M symbol appears [M-] Subtracts the displayed result or result of a mathematical function from the memory. If the memory was empty before (i.e. 0) the M symbol appears 17 SHARP PC-G850V(S) USERS GUIDE: Manual Calculations 3.3. Calculations with Constants The key can be used to apply constants to basic arithmetic operations as described below. Using constants Addition: [| + ] a [CONST] or a [+ | [CONST] Subtraction: — [=| a [CONST] or a | - | [CONST] Multiplication: [*] a or a Division: a or a where "a" means the constant. After pressing [CONST |, CONST appears on the bottom right of the display. Note: If the constant function is not used, make sure that the CONST indicator does not appear on the display. Viewing constants To view the last entered constant, press [2ndF) + (SHIFT) + [CONST]) while CONST is displayed. Delete the last constant To delete the last entered constant, press /2ndF) + (SHIFT) + [CA)). It can also be deleted by switching off the device. The CONST indicator should be off. Example: Store "+ (4.8 + 3.6)" as a constant and calculate "24 —18.5 + (4.8 + 3.6)" and "8.2 x 6+ (4.8 + 3.6)" Enter: +4.84+3.6 (Parenthesis not required) Enter: 24-185 @& Result: 13.9 Enter: 8.2*6@) Result: 57.6 18 SHARP PC-G850V(S) USERS GUIDE: Manual Calculations 3.4. Priority in Direct Input Calculations The PC-G850V(S) uses the following operator precedence when evaluating an expression: Relational expressions Logical expressions =, M+ 1. Variable recall or 1 2. Functions (such as sin, cos, etc.) 3. Power, roots 4. Sign 5. *,/ (operators at the same priority level are executed sequentially from left to right) 6. +,- 7. 8. 9. If parentheses are used in a formula, the operation given within the parentheses has the highest priority. Note: e Composite functions are evaluated from right to left Chained power (3% or 34/2) is evaluated from right to left For items 3 and 4 above, the last entry has the highest priority -2A4 —» -(24) 34-2 > 3° 3.5. Base Conversion (BASE-n) In the ROM of the PC-G850V(S) is a BASIC program which allows for numerical conversion among base2, base10, and base16 systems. It also computes the 2 compliment allows basic arithmetic and logical operations. To access this program, press ‘SHIFT + [BASE-n]. You will then receive the following prompt asking to clear the BASIC program memory space (effectively deleting all your basic programs). BASIC DELETE OK? (Y) Pressing will load the BASE-n program into memory and execute the program. Pressing any other key will return you to RUN mode and leave any BASIC programs in memory intact. Note: The BASE-n program requires 2794 bytes of free memory plus an additional 167 bytes for variable storage. If not enough memory is available to run the program, the process is aborted and BASIC program memory is left intact. This is true even if you see the above prompt to clear memory and press { Y |. The computer will return to RUN mode. 19 SHARP PC-G850V(S) USERS GUIDE: Manual Calculations Attempting to run the program with |SHIFT) + [BASE-n] with insufficient memory will return you to RUN mode. If variables cannot be allocated at runtime, you will receive an ERROR 60 message. In this case, clear the variable memory or delete a TEXT program to free up more memory space. Please make sure that at least 2961 (2794 + 167) bytes are available prior to starting BASE-n. To exit the program. , press |BREAK |. To restart the program, you can RUN in RUN mode provided no alterations were made in the BASIC program memory space. Using ‘SHIFT + to restart the program will reload BASE-n from ROM and execute the program. Upon starting BASE-n, you will be presented with the following screen: KKKKK n vy mVy y KKKKK 1:2429U89 2:avaAy 32mkAD 4:744r (1,2,3,4)? The four available options are: 1) Input: 2) Convert: enter numeric value for conversion. convert numbers from one base to another. It also toggles between input and calculation. 3) Complement: finds the two’s complement of the number 4) Calculation: 3.5.1. Value R allows calculation with basic arithmetic operators (+, —, *, /) and logical operators (AND, OR, NOT, XOR). ange The program is limited to the following range limits Binary Hexadecimal Decimal :16 bits. The most significant (leftmost) bit is the sign bit. If more that 16 bits are entered, the first 16 bits are used as the input value. If the result of a calculation exceeds 16 bits, the results is truncated to the least significant 16 bits. : 0000-FFFF (8000—7FFF) If more than 4 hexadecimal numbers are entered, the value is truncated to the 4 least significant 4 hexadecimal digits. : -32768 — 32767 Decimal values are converted to the corresponding hexadecimal number then truncated to the least significant 4 hexadecimal digits if it has more than 4 digits. This means that any decimal value entered will always fall within the above decimal range. 20 SHARP PC-G850V(S) USERS GUIDE: Manual Calculations 3.5.2. Input Number Pressing [1 | allows entry of a number for conversion or calculation. The program prompts for numeric entry. For example, to enter the decimal number 1230 for conversion: KKKKK n vy my y KKKKK 1:249U4a9 2:AvAv [1] 32nhay 4:744y (1,2,3,4)? KKKKK n vy my y KKKKK 1:=49Ya