Character map for ORIC

Everything related to BASIC version 1.x (Oric 1 and Atmos) or HYPERBASIC (Telestrat).
Don't hesitate to give your small program samples, technical insights, or questions...
Post Reply
Chris
2nd Star Corporal
Posts: 29
Joined: Tue Jun 05, 2007 1:45 am
Location: Oregon, United States
Contact:

Character map for ORIC

Post by Chris » Wed Jun 06, 2007 9:17 am

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')

nobbysnuts
Pilot Officer
Posts: 69
Joined: Thu Dec 28, 2006 11:07 pm
Location: SOUTH WALES UK

Post by nobbysnuts » Wed Jun 06, 2007 10:05 pm

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
ONLY DEAD FISH GO WITH THE FLOW

nobbysnuts
Pilot Officer
Posts: 69
Joined: Thu Dec 28, 2006 11:07 pm
Location: SOUTH WALES UK

Post by nobbysnuts » Wed Jun 06, 2007 10:11 pm

Just remembered it character map and all the keywords are downloadable on this site on the manuals page (oric-1 manual) in english
ONLY DEAD FISH GO WITH THE FLOW

Chris
2nd Star Corporal
Posts: 29
Joined: Tue Jun 05, 2007 1:45 am
Location: Oregon, United States
Contact:

Post by Chris » Thu Jun 07, 2007 12:04 am

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 .

nobbysnuts
Pilot Officer
Posts: 69
Joined: Thu Dec 28, 2006 11:07 pm
Location: SOUTH WALES UK

Post by nobbysnuts » Thu Jun 07, 2007 10:23 pm

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
ONLY DEAD FISH GO WITH THE FLOW

User avatar
Pengwin
Pilot Officer
Posts: 67
Joined: Sun Jan 07, 2007 11:03 pm
Location: Scotland
Contact:

Post by Pengwin » Thu Jun 07, 2007 10:36 pm

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

nobbysnuts
Pilot Officer
Posts: 69
Joined: Thu Dec 28, 2006 11:07 pm
Location: SOUTH WALES UK

Post by nobbysnuts » Thu Jun 07, 2007 10:37 pm

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)
ONLY DEAD FISH GO WITH THE FLOW

nobbysnuts
Pilot Officer
Posts: 69
Joined: Thu Dec 28, 2006 11:07 pm
Location: SOUTH WALES UK

Post by nobbysnuts » Thu Jun 07, 2007 10:39 pm

BEAT ME TO IT PENGUIN MY BRAINS A BIT SLOW TONIGHT(HEAVY DAY)
ONLY DEAD FISH GO WITH THE FLOW

User avatar
Pengwin
Pilot Officer
Posts: 67
Joined: Sun Jan 07, 2007 11:03 pm
Location: Scotland
Contact:

Post by Pengwin » Thu Jun 07, 2007 10:41 pm

LOL...same here. It's just the beer is lubricating the synapses a little for me :D

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests