CPCWiki forum

General Category => Programming => Topic started by: Fran123 on 20:25, 16 October 22

Title: reading a file from disc with asm
Post by: Fran123 on 20:25, 16 October 22
Hello

I want to do a loader calling |cpm, then when the code is executing, I try to read a file from disc with this code:

;; in
;; hl - name
;; b - name length
;; de - destinatin address memory
load_bin:
call &bc77 ;cas in open
ex de, hl
call &bc83 ;cas in direct
call &bc7a ;cas in close
ret

but, when I execute I get "Press PLAY then any key:"

What is happening?    I'm following the book of DATA BECKER   (https://cpcrulez.fr/book_german-floppy_buch.htm)
Title: Re: reading a file from disc with asm
Post by: Squeekboxandj on 20:37, 16 October 22
I'd have to look up the disc routines to really help you but my first observation is that the routines you're calling are cassette routines. 
Title: Re: reading a file from disc with asm
Post by: Fran123 on 20:43, 16 October 22
It seems when you type |cpm roms are deactivated :/
Title: Re: reading a file from disc with asm
Post by: SkulleateR on 21:21, 16 October 22
Disk Rom is also disabled after a normal run"Test" you have to reenable it afaik ....

http://www.cpcmania.com/Docs/Programming/Files.htm
Powered by SMFPacks Menu Editor Mod