Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
hi-/lowbyte -> integer function
#11
[syntax="asm"]; STACK:
; +8: lo
; +6: hi
push bp
mov bp, sp
mov ax, [bp+6]
shl ax, 8
or ax, [bp+8]
pop bp
ret 4[/syntax]
Dunno if it works though, but looks "runnable". I only need the opcodes so that you can convert it to a CALL ABSOLUTE routine Smile

*obviously there are a lot of ways to do such a thing Wink*
Reply
#12
PEEK/POKE method is only about 1/2 as fast than just
manipulating the bytes on the integer level.
If you need anything faster than you probablly should
go the ASM route. Although I'd run some bench tests before coding your own ASM routine, it might not be any faster considering
the lag time of having to use QB's CALL ABSOLUTE.

Cya.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)