flat assembler
Message board for the users of flat assembler.
Index
> DOS > some help in c to asm please |
Author |
|
windwakr 19 Feb 2005, 15:02
I found some code in c++ and dont know what these functions would be in asm. How would I do these in asm? malloc, memset, and free.
Thanks |
|||
19 Feb 2005, 15:02 |
|
Dilshod 11 Mar 2005, 08:57
For DOS you must use Int 21h functions:
48h - memAlloc, Enter: BX- memSize(in parags), Exit: AX-Segment 49h - memFree, Enter: ES- Segment 4Ah - memset, Enter: BX-newsize(in paragraphs) Example: mov ah,48h mov bx,100h ;size=256*16bytes int 21h jc Error mov es,ax ... mov ah,49h int 21h and do not forget for COM files befor MAlloc set the new size of current using of COM mem to that you need with 4Ah functions. |
|||
11 Mar 2005, 08:57 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.