Re: A86: Reading files
[Prev][Next][Index][Thread]
Re: A86: Reading files
Muhammed Galadima wrote:
>
> >Muhammed Galadima wrote:
> >>
> >> hello,
> >>
> >> does anyone know how to select a file in the calculator's memory,
> read
> >> it's contents and store it to a register, 1 byte at a time in hex?
> >
> >you cant store a file in a register, registers can only hold 8bits of
> >data, but you can store it after the textmem (gets deleted after
> exiting
> >program) or make a table and store it to that
> >
>
> Do I have to store a prog to a table or to the textmem before using it's
> contents? can't I just use one byte of it at a time as it is being read?
>
> my question was how to read a specified file from the calculator's RAM 1
> byte at a time. ie. how do I know where it starts in the RAM?
>
> Lets say I have aurora on my calc and a few games: pj, tetris, frogger,
> sqrxz, penguins, etc. Now I make a program that copies files to another
> calc. The program looks through the RAM of one calc like hexview/memview
> and displays the files it saw. Now I select tetris and the program reads
> 1 byte of the file starting at the mem address found with the RAM
> viewer. The byte is sent to another calc. The other calc has a prog that
> reads the byte from the link port and puts it into a file. This is
> repeated until the whole program has been transferred.
>
> Or maybe I am overcomplicating this?
o ok, gotcha now, just do like this....
send_loop:
ld hl,start_address
ld a,(hl)
check to see if it has ended
if it has go to the end
send it through the link port (sorry no time to show how this is done)
jr send_loop
References: