Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:27 17 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : GETCHAR$()

Author Message
romba6

Newbie

Joined: 04/07/2020
Location: United Kingdom
Posts: 37
Posted: 06:22pm 22 Jan 2021
Copy link to clipboard 
Print this post

I have a CMM2 program that uses the command C$ = getchar$() no further usage to it  - it is clearly working within the program, but I can't find any reference to it in any manual or the forum - any help on it please ?


CHAR_OUT$ = INKEY$
if CHAR_OUT$ <> "" then
 if CHAR_OUT$ = chr$(137) then download
   end if
 if CHAR_OUT$ = chr$(136) then upload
   end if
C$ = getchar$() 'not sure what this does
 if altflag% = 1 then 'check for ALT being asserted
 select case lcase$(C$) 'turn all characters to lowercase

Edited 2021-01-23 04:24 by romba6
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1680
Posted: 07:27pm 22 Jan 2021
Copy link to clipboard 
Print this post

Hi,

I (respectively Google) found this :
FUNCTION Getchar(char as integer) as integer
 local as integer i=char<<3
 Getchar=PEEK(WORD AddrOfFont+i)+(PEEK(WORD AddrOfFont+i+4)<<32)
END FUNCTION

An user defined function made by Peter (matherp).

Regards
Michael

Edit:
I would try to replace it with INKEY$ or KEYDOWN(1).
Edited 2021-01-23 05:38 by twofingers
causality ≠ correlation ≠ coincidence
 
frnno967
Senior Member

Joined: 02/10/2020
Location: United States
Posts: 105
Posted: 07:39pm 22 Jan 2021
Copy link to clipboard 
Print this post

  romba6 said  I have a CMM2 program that uses the command C$ = getchar$() no further usage to it  - it is clearly working within the program, but I can't find any reference to it in any manual or the forum - any help on it please ?


It's a function I adapted for Maxiterm  from Rich Martin's esp8266lib that is used to determine the status of ALT and WIN keys along with a key press. The getchar function looks at keyboard characters that are typed, checks for the presence of ALT and WIN keys, then passes that to the select case statement for activating various program features like the help menus and such.
Jay Crutti: Ham Radio Operator, K5JCJ. Computer Enthusiast. Musician. Engineer.
 
romba6

Newbie

Joined: 04/07/2020
Location: United Kingdom
Posts: 37
Posted: 07:45pm 22 Jan 2021
Copy link to clipboard 
Print this post

  twofingers said  Hi,

I (respectively Google) found this :
FUNCTION Getchar(char as integer) as integer
 local as integer i=char<<3
 Getchar=PEEK(WORD AddrOfFont+i)+(PEEK(WORD AddrOfFont+i+4)<<32)
END FUNCTION

An user defined function made by Peter (matherp).

Regards
Michael

Edit:
I would try to replace it with INKEY$ or KEYDOWN(1).


Thankyou Michael for the info, what an interesting link too - I wish I had kept my old Nokia phones !!!
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1680
Posted: 07:57pm 22 Jan 2021
Copy link to clipboard 
Print this post

I think Jay did it!  
causality ≠ correlation ≠ coincidence
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025