Hi
I am newbie here
I am a glad to see some friends with same interst.
In the past I wrote a small program under dos to format a floppy disk with unusual track size (like 128)
I used turpo pascal with its inline assembler
Modern programming languages doesn't suport to call asembly inside your code.
I want to do the same thing with 32bit assembly in old int13 calls fashion.
Is this possible in win32 asembly to call int 13 and format the floppy.
THX
Posted on 2003-10-24 14:51:48 by seezar
Hi seezar,

Welcome to Win32Asm Community board, :)

You can make with DeviceIOControl API function. But just you can use just under win9x. I never try DeviceIOControl with VWIN32_DIOC_DOS_INT13 parameter but below code is (for int25) work under w98. This operation possible just only int 25h,26h,13h and int21-IOCTL (only ah = fn47 others not work) functions.

Other way is VXD, look Iczelion Tutors for VXD programming basics:
http://win32asm.cjb.net

Regards,





.586p
.model flat, stdcall
Locals
jumps
UNICODE=0

include w32.inc

Extrn DeviceIoControl:near

VWIN32_DIOC_DOS_IOCTL equ 1
VWIN32_DIOC_DOS_INT25 equ 2
VWIN32_DIOC_DOS_INT26 equ 3
VWIN32_DIOC_DOS_INT13 equ 4
VWIN32_DIOC_DOS_DRIVEINFO equ 6

readbyte equ 7*4
drive equ 0h ; (c:\)

.data

vxdfn db '\\.\VWIN32',0
vxdhand dd 0
readsr dd 0
datbuf dd 0
;----------------------------------
buffer label dword
regebx dd 0 ; buffer addr
regedx dd 0
regecx dd 0 ; read len
regeax dd 0
regedi dd 0
regesi dd 0
regflg dd 0
;------------------------------------
rbuf label dword

inflevel dw 0
serial dd 0
volume db 11 dup (0)
filesys db 8 dup (0)
buf2 db 1024 dup (0)
;------------------------------------
.code

temp:

call CreateFileA, offset vxdfn,GENERIC_READ,FILE_SHARE_READ or FILE_SHARE_WRITE,\
0,0,FILE_FLAG_DELETE_ON_CLOSE,0
mov [vxdhand],eax

; here interrupt parameters,

mov [regeax],0003
mov [regebx],offset buf2
mov [regecx],1
mov [regedx],1

call DeviceIoControl, vxdhand, VWIN32_DIOC_DOS_INT25,\
offset buffer,readbyte,\
offset buffer,readbyte, offset readsr,0

call CloseHandle, vxdhand


call ExitProcess,0

end temp
Posted on 2003-10-24 16:27:27 by CYDONIA
THX CYDONIA
Realy Iczelion is a good resource.
Firstly,I need to dive into his tutorials.
THX alot.
Posted on 2003-10-25 08:56:44 by seezar