mirror of
https://github.com/pnx/m16vm
synced 2026-06-16 03:44:55 +02:00
adding asm/mov_test.as
This commit is contained in:
parent
2c734dc300
commit
2c1c832493
1 changed files with 15 additions and 0 deletions
15
asm/mov_test.as
Normal file
15
asm/mov_test.as
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
; mov h/l test.
|
||||||
|
; Using 2 instructions to store a 16-bit words is abit tricky to write code for
|
||||||
|
|
||||||
|
; Storing 32767 = (2^15) - 1 (highest value in 2's complement 16-bit).
|
||||||
|
; MSB (signed flag) = 0, rest 1.
|
||||||
|
; H [0111 1111] L [1111 1111]
|
||||||
|
movl $0x0, -1
|
||||||
|
movh $0x0, 127
|
||||||
|
|
||||||
|
; Storing -32768 = (2^15) (highest value in 2's complement 16-bit).
|
||||||
|
; MSB (signed flag) = 1, rest 0.
|
||||||
|
; H [1000 0000] L [0000 0000]
|
||||||
|
movl $0x1, 0
|
||||||
|
movh $0x1, -128
|
||||||
Loading…
Add table
Add a link
Reference in a new issue