Re: Rob: questions
Rob writes:
> low_buff = allocate_low(100)
>
> reg_list[REG_DS] = floor(low_buff / 16) -- segment
> reg_list[REG_SI] = remainder(low_buff, 16) --
> offset...dos_interrupt(....)
Ohhhh, yeah.... seeing this completely disagrees with the code I posted
earlier today, I think I had better revise the alloc_low function.
function alloc_low(atom amount)
-- allocates some amount of low memory and returns { segment, offset }
atom lmem
lmem = allocate_low(amount)
return { floor(lmem / #10), and_bits(lmem, #F) }
end function
Segments are aligned on 16-byte boundaries, not 64k... even though a
segment can address a total of 64k bytes.
Sorry about the stupid mistake.. wonder where my brain went on that one..
I really hope I don't do stuff like this on upcoming finals.
Later,
_______ ______ _______ ______
[ _ \[ _ ][ _ _ ][ _ ]
[/| [_] |[/| [_\][/ | | \][/| [_\]
| ___/ | _] | | | _]
[\| [/] [\| [_/] [\| |/] [\| [_/]
[_____] [______] [_____] [______]
xseal at harborside.com ICQ:13466657
http://www.harborside.com/home/x/xseal/euphoria/
|
Not Categorized, Please Help
|
|