win64: HIWORD and LOWORD signs

original commit: aa43ba40c72a6f499ff4f4729c787b2975bd29b9
This commit is contained in:
Matthew Flatt 2010-12-11 21:03:56 -07:00
parent f8d1910778
commit 4efe81afff

View File

@ -127,10 +127,15 @@
[time _DWORD]
[pt _POINT]))
(define (short v)
(if (zero? (bitwise-and #x8000 v))
v
(bitwise-ior v (arithmetic-shift -1 15))))
(define (HIWORD v)
(arithmetic-shift v -16))
(short (arithmetic-shift v -16)))
(define (LOWORD v)
(bitwise-and v #xFFFF))
(short (bitwise-and v #xFFFF)))
(define (MAKELONG a b)
(bitwise-ior (arithmetic-shift b 16)