Ich möchte eine vorgegebene Anzahl von Byte einlesen und nicht bis zum ende.
Wer kann das mal umstellen.
Gruss
Code
org &4000
.cas_in_open equ &bc77
.cas_in_close equ &bc7a
.cas_in_char equ &bc80
ld hl,&c000
push hl
ld b,end_filename-filename
ld hl,filename
ld de,two_k_buffer
call cas_in_open
pop hl
.next_byte
call cas_in_char
jr nc,not_eof
jr nz,not_eof
cp &f
jr nz,not_eof
jr eof
.not_eof
ld (hl),a
inc hl
jr next_byte
.eof
call cas_in_close
ret
.filename
defb "test.bin"
.end_filename
.two_k_buffer defs 2048
Alles anzeigen