peek for bload program

Page 1/3
| 2 | 3

By serge

Supporter (13)

serge's picture

20-08-2003, 17:40

Hi,

In "the old days" there was a peek for if you have load a bload"program" without the ,r you could see the begin adress + the end adress of the program, and also the adress where to start the program.
It was once publishd in a wellknow dutch magazine (msx magazine i think)
My question is does anybody know this peek ?

Login or register to post comments

By ro

Scribe (4696)

ro's picture

20-08-2003, 18:04

no.
you have to open the file and read the header (7 bytes) first
header contains:

#FE (telling it's a bin file)
#xxxx start adr.
#xxxx end adr / length (dunno anymore)
#xxxx xqt adr

how to do that in basic?
I forgot... sorry.

in WBASS2 is't like this:
addr "file.ext"

hope this helps!?

By Guillian

Prophet (3502)

Guillian's picture

20-08-2003, 18:15

You can read addresses #FCBF & #FCC0 to know execution address. So you can load a file with BLOAD"xxxx" and then execute it with:

defusr=peek(&hfcbf)+peek(&hfcc0)*256:?usr(0)

By BiFi

Enlighted (4348)

BiFi's picture

20-08-2003, 18:47

how to do that in basic?
I forgot... sorry.

10 OPEN "program" AS #1 LEN=1: FIELD #1,1 AS A$
20 GET #1,1: IF A$<>CHR$(254) THEN CLOSE #1: PRINT "No binary": STOP
30 GET #1: B$=A$: GET #1: AD=ASC("&h"+A$)*256+ASC("&h"+B$)
40 PRINT "Start: "; RIGHT$("0000"+HEX$(AD),4)
50 GET #1: B$=A$: GET #1: AD=ASC("&h"+A$)*256+ASC("&h"+B$)
60 PRINT "End: "; RIGHT$("0000"+HEX$(AD),4)
70 GET #1: B$=A$: GET #1: AD=ASC("&h"+A$)*256+ASC("&h"+B$)
80 PRINT "Exec: "; RIGHT$("0000"+HEX$(AD),4)
90 CLOSE #1: END

should do the trick.

By serge

Supporter (13)

serge's picture

20-08-2003, 19:21

heb je programma geprobeer bi fi maar ik krijg als foutmelding "input past end in 20".
fout op regel 20 dus.

Heb je een idee wat er zou mis zijn ?

By serge

Supporter (13)

serge's picture

20-08-2003, 19:23

heb je programma geprobeer bi fi maar ik krijg als foutmelding "input past end in 20".
fout op regel 20 dus.

Heb je een idee wat er zou mis zijn ?

better do this in englisg i guess...sorry

i have typt your program and have "bload" a program but i get an error "input past end in 20" when i run the program...
any idea why thats happend ?

By BiFi

Enlighted (4348)

BiFi's picture

20-08-2003, 19:33

better do this in englisg i guess...sorry

i have typt your program and have "bload" a program but i get an error "input past end in 20" when i run the program...
any idea why thats happend ?Did you replace the "program" by the name of your .bin file in line 10? The program opens the bin-file to read the header data.

If you didn't you might have a new file called "program" with filesize 0.

By ~mk~

Champion (304)

~mk~'s picture

20-08-2003, 20:00

I used to have a cool program that did this, it was called A-Linea. It was very useful when I bought my disk-drive and had to copy all my games from cassette to diskette.

By serge

Supporter (13)

serge's picture

20-08-2003, 20:11

I used to have a cool program that did this, it was called A-Linea. It was very useful when I bought my disk-drive and had to copy all my games from cassette to diskette.

that's the reason i want sutch peek or program. so the picture is this: i have a wave file that i maked from a rom file with waver, i want to load them in the memory of the msx via the tape port (what's working fine btw) an then i need the adresses to save them om my ss 360k disk. (try pc to msx programs for msx disk but nothings works)
the other program doent work because i changed line 10 as:
10 open "cas:" ........etc.... but i get an syntax error then.
hope things are more clear now

By ~mk~

Champion (304)

~mk~'s picture

20-08-2003, 22:56

Ok I have just tried the program after ~10 years and the correct name is "R.Bit Alineador". Let me know if you can't find it. I don't think it is copyrighted software so there would be no trouble to post here, right?

By serge

Supporter (13)

serge's picture

20-08-2003, 23:00

Ok I have just tried the program after ~10 years and the correct name is "R.Bit Alineador". Let me know if you can't find it. I don't think it is copyrighted software so there would be no trouble to post here, right?

can you send this program over e-mail to me ?

matteeuws.serge@pandora.be

Page 1/3
| 2 | 3