win64: HIWORD and LOWORD signs

This commit is contained in:
Matthew Flatt 2010-12-11 21:03:56 -07:00
parent 526c700411
commit aa43ba40c7

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)