Jump to content
IGNORED

Easy to learn/use program languages


Rocko

Recommended Posts

  • 3 weeks later...

Right, but what I am saying is that most all languages are able to do that. Here is a Basic example:

 

10 X=0:Y=0:GOTO 110

20 D=PEEK(KEYBOARD)

30 X=X+(D=RKEY)-(D=LKEY)

40 Y=Y+(D=DKEY)-(D=UKEY)

50 IF XX=X AND YY=Y THEN 20

60 IF X<0 THEN X=0

70 IF Y<0 THEN Y=0

80 IF X>=CHARLINE THEN X=CHARLINE-1

90 IF Y>=CHARROWS THEN Y=CHARROWS-1

100 POKE SCREEN+XX+CHARLINE*YY,BLANK

110 POKE SCREEN+X+CHARLINE*Y,OBJECT

120 XX=X:YY=Y

130 GOTO 20

 

Varibles that you need to define:

SCREEN is the starting memory location of screen Ram

BLANK is the value of the space character...usually 0 or 32

OBJECT is the value of whatever character you want to move around

CHARLINE is the number of text columns available on the screen

CHARROWS is the number of text rows available on the screen

KEYBOARD is the memory location that holds the value of the key pressed

UKEY, DKEY, LKEY, RKEY are the values of the keys you want to use to move

 

 

This program will work for most Basic versions.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...