Very "Basic" question

Very "Basic" question

Post by John Fens » Sun, 20 Mar 1994 06:33:49



Scuse me for the real simple question here but...

How would one use Basic to patch a few bytes in a file? (if possible)

I want to change (for example) a sys16 file at location

000007D7 from 6C to 3C
00001408 from 0B to 18
00001409 from AF to 6B
plus about 100 more..

Does/Can one use peek or ?  (I last took Basic in College in 1979...)

 
 
 

Very "Basic" question

Post by Victoria M Altho » Sun, 20 Mar 1994 12:45:38




>Scuse me for the real simple question here but...

>How would one use Basic to patch a few bytes in a file? (if possible)

>I want to change (for example) a sys16 file at location

>000007D7 from 6C to 3C
>00001408 from 0B to 18
>00001409 from AF to 6B
>plus about 100 more..

>Does/Can one use peek or ?  (I last took Basic in College in 1979...)

The command is POKE addrs,value.  Remember to use decimal, not hex.  Here's a
BASIC routine to do exactly what you show above...
10 READ A,V
20 IF A=0 THEN 40
30 POKE A,V:GOTO 10
40 END
50 DATA 2007,60,5128,24,5129,107,0,0

The PEEK expression is used to obtain the contents of a memory location.  
Before running the above program, you could do this:
]PRINT PEEK(2007)
and the response would be...
108
After running the program...
]PRINT PEEK(2007)
60

]_
(hey...I can't print a flashing block on the net...so what...you get the point)

--Dave Althoff, Jr.
(Certified Applesoft Ace)

 
 
 

1. Looking for "Serpentine", "Thief", "Cyborg", and "Oo-Topos"

Hi!

I am looking for .dsk or .do files with the games "Serpentine", "Thief",
"Cyborg", and "Oo-Topos". I was on the most excellent asimov site and they
seemed to be about the only games I could not find. "Serpentine" was a maze
where you chased snakes, "Thief" was a berzerk-type arcade game, and "Cyborg"
and "Oo-Topos" were text adventures by Mike Berlyn.

Thanks in advance!

2. Pinnacle Web Support

3. "IIe" and "STM" question

4. add weblink in pdf file using vb

5. "A Touch of AppleSoft BASIC" question

6. Atari "ResEdit" equiv?

7. Looking for a couple of ][ games: "Fix-It", "Alien Encounter"

8. How to change a PC's keyboard to Palm's Keyboard?

9. "ZipGS" or "TransWarp" card

10. Joystick buttons: normally "open" vs "closed"?

11. "640k"; "good software" (was: Byte Magazine: 18 Vintage issues, 1985-1986)

12. Serial adaptor "8 din" to "9 pin"

13. "It's Dead, Jim" or "The Case of the Dead Newsgroup"