Page 1 of 1

Character map for ORIC

Posted: Wed Jun 06, 2007 9:17 am
by Chris
What are the corresponding three-digit numbers for every key, and how do I use them?
(for example, how in BASIC would I put 'key pressed=enter then goto 5')

Posted: Wed Jun 06, 2007 10:05 pm
by nobbysnuts
Hi Chris if your going to try programming in basic and havent used it before its wise to get yourself a oric basic manual they are cheap on ebay ,there are a few on ebay uk now im sure they would post they contain the basics and all the keywords and codes your looking for otherwise its an uphill battle

Posted: Wed Jun 06, 2007 10:11 pm
by nobbysnuts
Just remembered it character map and all the keywords are downloadable on this site on the manuals page (oric-1 manual) in english

Posted: Thu Jun 07, 2007 12:04 am
by Chris
I downloaded the manual. I just thought since my only other BASIC programming was on a TI 84+, that I thought each key had a number attached to it (like down = some number). For example, if I were to press down, and down's number was 30, I would print something like UNTIL KEY$=30 .

Posted: Thu Jun 07, 2007 10:23 pm
by nobbysnuts
from memory you need to put the key letter or number in inverted commas IF KEY$="Z" THEN X=X+1 :IFKEY$="X"THENX=X-1 ect

if your writing a program with a few key options you could put-
10 A$=KEY$
20 IFA$="Z"THENX=X+1
30 IFA$="Y"THENX=X-1
ECT(saves you writing KEY all the time)
hope this helps

Posted: Thu Jun 07, 2007 10:36 pm
by Pengwin
nobbysnuts wrote:from memory you need to put the key letter or number in inverted commas IF KEY$="Z" THEN X=X+1 :IFKEY$="X"THENX=X-1 ect

if your writing a program with a few key options you could put-
10 A$=KEY$
20 IFA$="Z"THENX=X+1
30 IFA$="Y"THENX=X-1
ECT(saves you writing KEY all the time)
hope this helps
But if you need to detect the cursor keys, I believe you have to use the chr$ function. For example

Code: Select all

110 IF A$=CHR$(8) THEN X=X-1: REM Left
120 IF A$=CHR$(9) THEN X=X+1: REM Right
130 IF A$=CHR$(10) THEN Y=Y+1: REM Down
140 IF A$=CHR$(11) THEN Y=Y-1: REM Up

Posted: Thu Jun 07, 2007 10:37 pm
by nobbysnuts
or of course you can use the ascii code such as
IF A$=CHR$(32) THEN PING
CHR$(32) being the code for space
the cursor keys are LEFT-CHR$(8),RIGHT-CHR$(9),UPCHR$(10),DOWN-CHR$(11)

Posted: Thu Jun 07, 2007 10:39 pm
by nobbysnuts
BEAT ME TO IT PENGUIN MY BRAINS A BIT SLOW TONIGHT(HEAVY DAY)

Posted: Thu Jun 07, 2007 10:41 pm
by Pengwin
LOL...same here. It's just the beer is lubricating the synapses a little for me :D