Category : C Source Code
Archive   : C-AIDS-8.ZIP
Filename : DOSWRITS.ASM

 
Output of file : DOSWRITS.ASM contained in archive : C-AIDS-8.ZIP
Comment *
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³doswrits.asm ³
³Allows direct sector access from 'C' which is not possible using int86 ³
³because this int leaves a word on the stack which would cause int86 to ³
³return to some unknown place. ³
³usage: ³
³char wbuf[512]; at lease 512 bytes for sector buffer ³
³int werror; ³
³ ³
³werror = doswrits(0,0,1,wbuf); writes to drive 'A',sector 0, 1 sector, ³
³ from wbuf ³
³ ³
³ ³
³ (C) JazSoft Software by Jack A. Zucker (301) 794-5950 ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
*
assume cs:_text
_text segment public byte 'code'
public _doswrits

_doswrits proc near

push bp
mov bp,sp
push si ; save user's "C" register variables
push di

mov al,[bp+4] ; drive number
mov dx,[bp+6] ; which sector to write
mov cx,[bp+8] ; amount of sectors
mov bx,[bp+0Ah] ; offset of buffer
int 26h
jc _doswritserror ; if carry then error occurred
mov ax,0 ; else return a zero
_doswritserror:
popf ; int 25h pushes flags
pop di ; restore user's "C" register variables
pop si
pop bp ; restore base pointer
ret
_doswrits endp
_text ends
end


  3 Responses to “Category : C Source Code
Archive   : C-AIDS-8.ZIP
Filename : DOSWRITS.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/