Re: Multi-Platform Support

new topic     » goto parent     » topic index » view thread      » older message » newer message

Bernie wrote:
>  If Euphoria uses the flat address model then can you tell me what
>  segment address it uses ? Also if I allocate_low some bytes what
>  segment address this uses. If these are always the same then
>  why isn't there a CONSTANT for these magic numbers in Euphoria.
>  All I want is:
>  An allocate_low function to return a sequence with { segment, offset }

  Here:

function alloc_low(atom amount)
-- allocates some amount of low memory and returns { segment, offset }
  atom lmem
  lmem = allocate_low(amount)
  return { floor(lmem / #10000), and_bits(lmem, #FFFF) }
end function

>  A match function that searchs for a BINARY sequence in a memory block

Use the Euphoria match function, but peek out the memory block first:
   match(some_seq, peek({some_mem, mem_size}))

Later,
 _______  ______  _______  ______
[    _  \[    _ ][ _   _ ][    _ ]
[/| [_] |[/| [_\][/ | | \][/| [_\]
  |  ___/  |  _]    | |     |  _]
[\| [/]  [\| [_/] [\| |/] [\| [_/]
[_____]  [______] [_____] [______]
xseal at harborside.com  ICQ:13466657
http://www.harborside.com/home/x/xseal/euphoria/

Linux + GNOME = Windows++++

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu