flat assembler
Message board for the users of flat assembler.

Index > MenuetOS > libraries updated

Author
Thread Post new topic Reply to topic
DC740



Joined: 01 Oct 2004
Posts: 74
Location: Argentina
DC740
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 Smile

PD: i built the new msys.h and it compiled with no error... i didn't try it yet...
Post 30 Dec 2004, 17:57
View user's profile Send private message Reply with quote
DC740



Joined: 01 Oct 2004
Posts: 74
Location: Argentina
DC740
and i didn't update the pci support, if someone wants to do it, tell me, i'll send the updated msys
Post 30 Dec 2004, 18:11
View user's profile Send private message Reply with quote
daneel



Joined: 19 May 2004
Posts: 56
daneel
Please, can you send me (or post it in this forum).
My email is gustavo.griecoNOSPAM@gmail.com

Remove: NOSPAM

EDIT:que boludo, no me había dado cuenta que eras "don" del otro foro

Thanks!
Post 30 Dec 2004, 21:40
View user's profile Send private message Reply with quote
DC740



Joined: 01 Oct 2004
Posts: 74
Location: Argentina
DC740
Crying or Very sad well... i've problems posting files in this forum, i'll add it to my website... www.dc740.tk
Post 31 Dec 2004, 01:32
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.