willard, would commented assembly help? I have this working in REX Manager...
On Wed, Oct 25, 2017 at 4:20 PM, Willard Goosey <[email protected]> wrote: > So, there is this (from Mike Nugent's RAM-ROM file) > > ;2239H - Insert entry into directory. > ; Entry: > ; HL - Points to empty directory slot > ; DE - Contains address of file in RAM > ; A - Attribute (80h=.BA, C0h=.DO, A0h=.CO, etc.) > ; Note: Routine gets filename from FC93H, where it must be > ; stored,padded with spaces, no delimiter. > ; Exit: DE - Unchanged > > And I have the ROM call itself working in smallclib... but this is only > part of the story. To use this successfully (ie without causing a cold > start) we need to know more about it. > > I've been trying to create a .DO file. > > 1) Where do yo get a starting address for the file? I've tried every > variant of COSTART (FBB0h) and DOSTART (FBAEh). At best I can get is > intact DO files and the CO file directory entries switched around (using > COSTART-1). DOSTART results in the text files being switched around and > the binary files remaining correct. Anything else (COSTART or > DOSTART-1) leads to file corruption and/or cold starts. > > 2)Is there a second directory-repair routine, besides DIROK (2146h)? > Because DIROK() is not being sufficient. :-( > > Here is the test code. DO NOT USE!!!! > /*tmf.c > *Test MakFil > *test for Model 100 Small C-85 Library > * > *Willard Goosey > *[email protected] > *10/19/2017 > */ > > #include "m100vars.h" > #include "dir.h" > > /*MAKFIL extension bytes: */ > #define BA 0x80 > #define DO 0xC0 > #define CO 0xA0 > > main(char A, char *HL) > { > char *name; > struct dir *slot; > char *start; > int i; > > name= "RTMF1.DO"; > start= COSTART-1; //start at beginning of CO files > > slot=FREDIR(); > > hex16(start);CRLF(); > > prsnam(name,strlen(name)); > > hex16(makfil(slot,start,DO)); CRLF(); > if(makhol(1,start)<0) > { > BEEP(); > MENU(); > } > *start=0x1a; > //makfil doesn't autoinsert EOF > DIROK(); > } > > HELP!!!! > Willard > -- > Willard Goosey [email protected] > Socorro, New Mexico, USA > I search my heart and find Cimmeria, land of Darkness and the Night. > -- R.E. Howard >
