News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Ast

M4 directories access

Started by Ast, 11:05, 22 November 19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ast


Hi,


I'm still working on iMPdraw v2 fixing.
All seems working well except cpc+ features and m4 directories.


Concerning cpc+ access, i will try with new fixed m4rom soon, but i need help about asm directories access on m4. (Duke if you read it!)
What works perfectly on xmass Doesn't work with m4.


here is the sample code i used



enterrepm4
;
ld   de,filename
ld   (&B07F),de
ld   a,endf-filename
ld   (&B07E),a
;
ld   hl,rsxCD
call &BCD4
jr   nc,beep
;
jp   &1B
;
beep ld a,7
jp #bb5a
;
rsxCD byte "CD"+&80
filename
byte "m4"
endf
;
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

SOS

You need to build an RSX-Buffer first and then call the CD-Command.
The following example code (similar) from YANCC works with M4DOS, ACMEDOS + CUBEMDOS:

ld   hl,rsxCD
call &BCD4
jr   nc,beep
;

ld a,l
ld (CHDIR_command_),a
ld a,h
ld (CHDIR_command_+1),a
ld a,c
ld (CHDIR_command_+2),a


ld ix,buffer_fn
push ix
pop hl
inc hl
inc hl
ld (ix+0),l
ld (ix+1),h
ld   a,endf-filename
ld (ix+2),a

ld hl,filename
ld (ix+3),l
ld (ix+4),h

ld a,1


defb &df    ;  RST 3   (=RST &18)   KL FAR CALL
defw CHDIR_command_
ret
;
rsxCD defm "C","D"+&80
CHDIR_command_: defs 3
buffer_fn: defs 5
org &a100
filename
byte "TMP",0
endf

Ast


It works ! Thank you very much @SOS !


Here is iMPdos m4 routine. I hope that will help you if you need about it.



;
; Enter in iMPdos m4 directory
; AsT/iMP4CT -> Thanks to SoS for help.
;
          ld   hl,rsxCD
          call &BCD4
          jp   nc,beep
;
          ld   ix,(&B07F)
          push ix
          pop  de
          inc  de
          inc  de
          ld   (ix+0),e
          ld   (ix+1),d
          ld   a,endf-filename
          ld   (ix+2),a
          ld   de,filename
          ld   (ix+3),e
          ld   (ix+4),d

          ld   a,1
          jp   &1B
;
rsxCD BYTE "CD"+&80
      ORG &A500
filename
      BYTE "impdos",0
endf


beep      ld   a,7
          jp   &BB5A


_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

Ast


I found a Strange bug in the directories accesses.


To reproduce it easily :
|MKDIR,"123456789"


call &bc9b,&4000


then just look at #4000 you could see 12345679 -> 8 is missing strangely ???


It seems your Cat routine is buggy @Duke ! Any idea ?


Secondly, when you do


ùcd,"toto" then cat M4dos displays :


Drive a:/toto


Where can i find toto ? I think it's saved in the m4 card, but where ???


Thanks for your reply.
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

Duke

Quote from: Ast on 18:53, 24 November 19
To reproduce it easily :
|MKDIR,"123456789"


call &bc9b,&4000


then just look at #4000 you could see 12345679 -> 8 is missing strangely ???
Thanks for reporting, will check it out and fix soon.

Quote
ùcd,"toto" then cat M4dos displays :


Drive a:/toto


Where can i find toto ? I think it's saved in the m4 card, but where ???
Not sure I follow, when I type |cd,"toto" it says unknown directory.
So if you have a directory named toto, it will cd into it and CAT will display the path as "Drive a:/toto"  the location would be a sub directory to the root ?

Ast

My question was Where in memory can i found these data??? (If the sub directory exists of course!)
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

Duke

Quote from: Ast on 10:00, 25 November 19
My question was Where in memory can i found these data??? (If the sub directory exists of course!)

Ah ok.
There is a special RSX called |GETPATH that @SOS added.
Check under "Special RSX Commands" -> http://www.spinpoint.org/cpc/m4info.txt   (almost at the end)

Ast

_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

roudoudou

My pronouns are RASM and ACE

Ast

_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

Ast


@all : It's working now !!!

_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

Powered by SMFPacks Menu Editor Mod