Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I love the structure of the site. You start at the top, and drill down to what you want. Maybe I've been using Unix too long... :-) "

Geography

Where in the world do Tek-Tips members come from?
Roltsuuu (TechnicalUser)
30 Mar 11 9:45
Can someone explain me this ?
I have to know what those lines are doing :(.
I know already that it's something with video memory, and this

CODE

  POKE (i% - 1) * 160 + j% + 1, 128 + 14
is changing text and backgroud color, also &HB800 is something with video ram?
But what does

CODE

FOR j% = 0 TO 158 STEP 2
  POKE (i% - 1) * 160 + j%, ASC(MID$(rida(i%), j% / 2 + 1, 1))
those lines do.
And if someone help, thanks to him.


CODE

DEF SEG = &HB800
FOR i% = 1 TO 20
 FOR j% = 0 TO 158 STEP 2
  POKE (i% - 1) * 160 + j%, ASC(MID$(rida(i%), j% / 2 + 1, 1))
  POKE (i% - 1) * 160 + j% + 1, 128 + 14
 NEXT j%
NEXT i%
END
jknichols (TechnicalUser)
30 Mar 11 14:25
It should be obvious that rida() is an array of strings - 20 strings of 80 characters each. Yeah, right, I spent all morning Google-ing variations of BASIC and rida trying to figure out what the rida function did.

At any rate, this code snippet is pulling 20 line of 80 characters out of the array, applying the 0x8e color attribute to each, and poking it directly into the display memory. Note that there doesn't appear to be any error checking to make sure that the array has 20 strings, nor that each string has 80 characters.  
jknichols (TechnicalUser)
17 Aug 11 12:27
<BUMP>

Was I correct (or even close)???

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close