Tranlated useing asm.e from 
Alexander Toresson's mini debugger.


constant stack = alocate(16)
lock_memory(stack, 16)

constant disksize = allocate(30)
poke(disksize, {
    #60,                    --    0: pushad
    #BD,#00,#00,#00,#00,    --    1: mov ebp, stack (2)
    #B4,#36,                --    6: mov ah, #36
    #B2,#00,                --    8: mov dl, drive (9)
    #CD,#21,                --    A: int #21
    #66,#89,#45,#00,        --    C: mov [ebp], ax
    #66,#89,#5D,#04,        --   10: mov [ebp+4], bx
    #66,#89,#4D,#08,        --   14: mov [ebp+8], cx
    #66,#89,#55,#0C,        --   18: mov [ebp+12], dx
    #61,                    --   1C: popad
    #C3})                   --   1D: ret
poke4(disksize + 2, stack)

function diskinfo(integer drive)

	mem_set(stack, 0, 16)
	poke(disksize + 9, drive)
	call(disksize)
	
	return peek4u({stack, 4})
	
end function
