i was learning asm and the first thing i did was update the xs compiler libraries with the new apis (sysfuncs in the main web) but i have a lot of questions, first: this apis are not documented:
/*
06 = OPEN FILE FROM FLOPPY
ebx pointer to filename -> 11 capital letters
ecx set 0x00000000 - reserved
edx set 0xffffffff - reserved
esi read to mem position
ret: nothing changed
*/
/*
19 = START PROGRAM
ebx point to 11 char filename
ecx 0, or point to ASCIIZ start parameters - max 256 bytes
ret: eax 0 successful
eax other error code
*/
/*
30 = READ HD
ebx pointer to file
ecx file lenght
edx block to read, starts from 1, blocksize = 512 bytes
esi reserved, set as 1
edi pointer to return/work area (atleast 20 000 bytes)
return: work_area+1024 <- requested block of 512 bytes
*/
/*
31 = START APP FROM HD
ebx pointer to file
ecx file lenght
edx pointer to return/work area (atleast 20 000 bytes)
ret eax=0 successful, eax<>0 errorcode
*/
/*
33 = SAVE FILE TO FLOPPY IMAGE IN MEMORY
ebx pointer to file name
ecx pointer to data
edx count to write in bytes
esi 0 create new , ( 1 append - not implemented yet )
ret: eax = 0 save successful, eax = 1 ramdisk full
*/
34 = READ DIRECTORY FROM FLOPPY
ebx reserved : set as zero
ecx reserved : set as zero
edx start 512 block to read
esi reserved : set as 1
edi pointer to return area
*/
/*
43 = SEND DATA TO DEVICE
bx : port
cl : data
return : eax = if 0 successful, other = error
*/
/*
49 = DEFINE APPLICATIONS INTERNAL INTERRUPTS
ebx = 0
ecx point to dword x 256 table of interrupt entries
inside the application
return : nothing changed
*/
56 = write file to hd
second: i couldn't update the api 17... i didn't know what to do with the 24 bits... please help... i didn't understand the apis 21 and 26 (the keyboard and country part)
i found this in the old libraries
// Get the I/O address of the SoundBlaster-16 chip
inline int _msys_GetSb16Base()${mov eax,26;mov ebx,4;int 0x40}
// Change the current system language (default English).
inline void _msys_SetSysLanguage(int langid=ECX)${mov eax,21;mov ebx,4;int 0x40;}
this means that ebx is the same in the 2 funcs... so... how do you make this differents... they are the same??
another question about the apis... i don't know what this apis:
22 and 36 do... ¿¿¿???
and the last question... in the api 34... you MUST set xor ebx,ebx;xor ecx,ecx and xor esi,esi??? cause in the api call it says that they are reserved and that they can be set to zero
thanx for your time
PD: i built the new msys.h and it compiled with no error... i didn't try it yet...