Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UEVENT ON: ON UEVENT GOSUB EventISR
- ' *** Create ISR code for events ***
- DIM iSeg AS INTEGER, iOff AS INTEGER
- lPev = AddrOfSetUEvent 'lib call to get ptr for qb internal func
- IF lPev = 0 THEN PRINT "addr of SetUEvent failed...": END '<- safety
- lSeg = (((lPev AND &HFFFF0000) \ &H10000) AND &HFFFF&)
- lOff = (lPev AND &HFFFF&)
- PRINT HEX$(lSeg) + ":" + HEX$(lOff) '<-prints seg:off of SetUEvent
- lSeg = lSeg * 256&: lOff = lOff * 256&
- 'inlined assembly hehe'
- lsr(0) = &H90000068 + lSeg 'push 0000h / nop
- lsr(1) = &H60000068 + lOff 'push 0000h / pusha
- lsr(2) = &H5EFFEC8B 'mov bp,sp / call far [bp+10h]
- lsr(3) = &HE620B010 'mov al,20 / out 20,al
- lsr(4) = &HC4836120 'popa / add sp, 4
- lsr(5) = &HCF04 'iret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement