2014-12-16 04:53:56 +00:00
|
|
|
; int __pascal pi_slot_free(int slot)
|
2014-11-18 16:56:13 +00:00
|
|
|
func pi_slot_free
|
|
|
|
@@slot = word ptr 4
|
|
|
|
|
|
|
|
mov bx, sp
|
|
|
|
mov bx, ss:[bx+@@slot]
|
|
|
|
mov ax, bx
|
|
|
|
shl bx, 2
|
2015-02-21 13:12:22 +00:00
|
|
|
add bx, offset _pi_slot_buffers
|
2014-11-18 16:56:13 +00:00
|
|
|
cmp dword ptr [bx], 0
|
|
|
|
jz short @@ret
|
|
|
|
imul ax, size PiHeader
|
2015-02-21 13:12:22 +00:00
|
|
|
add ax, offset _pi_slot_headers
|
2014-11-18 16:56:13 +00:00
|
|
|
push ds
|
|
|
|
push ax
|
|
|
|
push word ptr [bx+2]
|
|
|
|
push word ptr [bx]
|
|
|
|
mov dword ptr [bx], 0
|
|
|
|
call graph_pi_free
|
|
|
|
@@ret:
|
|
|
|
ret 2
|
|
|
|
endfunc
|