Fixed: "Press play then any key" with file operations

Amstrad CPC and NC systems
Post Reply
norecess
Member
Posts: 73
Joined: Thu Mar 20, 2008 12:58 am

Fixed: "Press play then any key" with file operations

Post by norecess »

Yop,

The problem : when loading the binary generated by z88dk from BASIC, fopen operations are working OK. But when executing the z88dk binary directly as an executable, it fails its loading by displaying the "press play then any key" message.

The solution :
Got it ! I had to ask to an Amstrad CPC-specialist (Grim from Arkos team) to get the thing working.

To get fopen etc working you need first to initialize AMSDOS before any read-write operations (actually, just at startup is enough).

Source-code :

ld hl,(&BE7D)
ld a,(hl)
push hl
push af
; initialize la ROM7
ld hl,&ABFF
ld de,&0040
ld c,&07
call &BCCE
pop af
pop hl
ld (hl),a

References :
http://grimware.org/doku.php/documentat ... ot.program
http://grimware.org/doku.php/documentat ... os.manager
stefano
Well known member
Posts: 1534
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

Thank you !
Hopefully this answers also to my question on why the newest RSX (BAR commands) interface functions couldn't work if I didn't first execute some disk related command from BASIC.
I thought at some init missing, but the call to kl_rom_walk wasn't enough.
I'll try as soon as possible.
Post Reply