.code16
|
.code16
|
start:
|
start:
|
|
|
# rcl word operations
|
# rcl word operations
|
movw $0x3b5e, %ax
|
movw $0x3b5e, %ax
|
movw $0xc8a7, %bx
|
movw $0xc8a7, %bx
|
movw $0x2072, (0)
|
movw $0x2072, (0)
|
movw $0x3e79, (2)
|
movw $0x3e79, (2)
|
|
|
movw $160, %sp
|
movw $160, %sp
|
|
|
rcl %ax # (1)
|
rcl %ax # (1)
|
pushf
|
pushf
|
mov %ax, (32)
|
mov %ax, (32)
|
|
|
rclw (0) # (2)
|
rclw (0) # (2)
|
pushf
|
pushf
|
|
|
movw $0x100, %cx
|
movw $0x100, %cx
|
rcl %cl, %bx # (3), zero bit shift
|
rcl %cl, %bx # (3), zero bit shift
|
pushf
|
pushf
|
movw %bx, (34)
|
movw %bx, (34)
|
|
|
movw $0xffff, %cx
|
movw $0xffff, %cx
|
movw %bx, %dx
|
movw %bx, %dx
|
rcl %cl, %dx # (3), -1, result 0
|
rcl %cl, %dx # (3), -1, result 0
|
pushf
|
pushf
|
movw %dx, (36)
|
movw %dx, (36)
|
|
|
movb $0x8, %cl
|
movb $0x8, %cl
|
rcl %cl, %bx # (3) normal
|
rcl %cl, %bx # (3) normal
|
pushf
|
pushf
|
movw %bx, (38)
|
movw %bx, (38)
|
|
|
movb $0x4, %cl
|
movb $0x4, %cl
|
rclw %cl, (2) # (4)
|
rclw %cl, (2) # (4)
|
pushf
|
pushf
|
|
|
# rcl byte operations
|
# rcl byte operations
|
movw $0x5904, %dx
|
movw $0x5904, %dx
|
movw $0xbe7c, %ax
|
movw $0xbe7c, %ax
|
movw $0xd62f, (4)
|
movw $0xd62f, (4)
|
movw $0x6fd8, (6)
|
movw $0x6fd8, (6)
|
|
|
rcl %ah # (5)
|
rcl %ah # (5)
|
pushf
|
pushf
|
mov %ax, (40)
|
mov %ax, (40)
|
|
|
rclb (5) # (6)
|
rclb (5) # (6)
|
pushf
|
pushf
|
|
|
movb $0x7, %cl
|
movb $0x7, %cl
|
rcl %cl, %dl # (7)
|
rcl %cl, %dl # (7)
|
pushf
|
pushf
|
movw %dx, (42)
|
movw %dx, (42)
|
|
|
rclb %cl, (6) # (8)
|
rclb %cl, (6) # (8)
|
pushf
|
pushf
|
|
|
# rcr word operations
|
# rcr word operations
|
movw $0x15d6, %ax
|
movw $0x15d6, %ax
|
movw $0x8307, %bx
|
movw $0x8307, %bx
|
movw $0x9ab7, (8)
|
movw $0x9ab7, (8)
|
movw $0x28b6, (10)
|
movw $0x28b6, (10)
|
|
|
rcr %ax # (9)
|
rcr %ax # (9)
|
pushf
|
pushf
|
mov %ax, (44)
|
mov %ax, (44)
|
|
|
rcrw (8) # (10)
|
rcrw (8) # (10)
|
pushf
|
pushf
|
|
|
movw $0x100, %cx
|
movw $0x100, %cx
|
rcr %cl, %bx # (11), zero bit shift
|
rcr %cl, %bx # (11), zero bit shift
|
pushf
|
pushf
|
movw %bx, (46)
|
movw %bx, (46)
|
|
|
movw $0xffff, %cx
|
movw $0xffff, %cx
|
movw %bx, %dx
|
movw %bx, %dx
|
rcr %cl, %dx # (11), -1, result 0
|
rcr %cl, %dx # (11), -1, result 0
|
pushf
|
pushf
|
movw %dx, (48)
|
movw %dx, (48)
|
|
|
movb $0x5, %cl
|
movb $0x5, %cl
|
rcr %cl, %bx # (11) normal
|
rcr %cl, %bx # (11) normal
|
pushf
|
pushf
|
movw %bx, (50)
|
movw %bx, (50)
|
|
|
movb $0x4, %cl
|
movb $0x4, %cl
|
rcrw %cl, (10) # (12)
|
rcrw %cl, (10) # (12)
|
pushf
|
pushf
|
|
|
# rcr byte operations
|
# rcr byte operations
|
movw $0x7eaa, %dx
|
movw $0x7eaa, %dx
|
movw $0x3a8d, %ax
|
movw $0x3a8d, %ax
|
movw $0xa414, (12)
|
movw $0xa414, (12)
|
movw $0x2838, (14)
|
movw $0x2838, (14)
|
|
|
rcr %ah # (13)
|
rcr %ah # (13)
|
pushf
|
pushf
|
mov %ax, (52)
|
mov %ax, (52)
|
|
|
rcrb (13) # (14)
|
rcrb (13) # (14)
|
pushf
|
pushf
|
|
|
movb $0x7, %cl
|
movb $0x7, %cl
|
rcr %cl, %dl # (15)
|
rcr %cl, %dl # (15)
|
pushf
|
pushf
|
movw %dx, (54)
|
movw %dx, (54)
|
|
|
rcrb %cl, (14) # (16)
|
rcrb %cl, (14) # (16)
|
pushf
|
pushf
|
|
|
# rol word operations
|
# rol word operations
|
movw $0x020d, %ax
|
movw $0x020d, %ax
|
movw $0x8d5a, %bx
|
movw $0x8d5a, %bx
|
movw $0x28dd, (16)
|
movw $0x28dd, (16)
|
movw $0xd74a, (18)
|
movw $0xd74a, (18)
|
|
|
rol %ax # (17)
|
rol %ax # (17)
|
pushf
|
pushf
|
mov %ax, (56)
|
mov %ax, (56)
|
|
|
rolw (16) # (18)
|
rolw (16) # (18)
|
pushf
|
pushf
|
|
|
movw $0x100, %cx
|
movw $0x100, %cx
|
rol %cl, %bx # (19), zero bit shift
|
rol %cl, %bx # (19), zero bit shift
|
pushf
|
pushf
|
movw %bx, (58)
|
movw %bx, (58)
|
|
|
movw $0xffff, %cx
|
movw $0xffff, %cx
|
movw %bx, %dx
|
movw %bx, %dx
|
rol %cl, %dx # (19), -1, result 0
|
rol %cl, %dx # (19), -1, result 0
|
pushf
|
pushf
|
movw %dx, (60)
|
movw %dx, (60)
|
|
|
movb $0x4, %cl
|
movb $0x4, %cl
|
rol %cl, %bx # (19) normal
|
rol %cl, %bx # (19) normal
|
pushf
|
pushf
|
movw %bx, (62)
|
movw %bx, (62)
|
|
|
movb $0x4, %cl
|
movb $0x4, %cl
|
rolw %cl, (18) # (20)
|
rolw %cl, (18) # (20)
|
pushf
|
pushf
|
|
|
# rol byte operations
|
# rol byte operations
|
movw $0x9d09, %dx
|
movw $0x9d09, %dx
|
movw $0xc948, %ax
|
movw $0xc948, %ax
|
movw $0x0b80, (20)
|
movw $0x0b80, (20)
|
movw $0x48e8, (22)
|
movw $0x48e8, (22)
|
|
|
rol %ah # (21)
|
rol %ah # (21)
|
pushf
|
pushf
|
mov %ax, (64)
|
mov %ax, (64)
|
|
|
rolb (21) # (22)
|
rolb (21) # (22)
|
pushf
|
pushf
|
|
|
movb $0x7, %cl
|
movb $0x7, %cl
|
rol %cl, %dl # (23)
|
rol %cl, %dl # (23)
|
pushf
|
pushf
|
movw %dx, (66)
|
movw %dx, (66)
|
|
|
rolb %cl, (22) # (24)
|
rolb %cl, (22) # (24)
|
pushf
|
pushf
|
|
|
|
|
# ror word operations
|
# ror word operations
|
movw $0xf25e, %ax
|
movw $0xf25e, %ax
|
movw $0x2eb5, %bx
|
movw $0x2eb5, %bx
|
movw $0x0151, (24)
|
movw $0x0151, (24)
|
movw $0x7237, (26)
|
movw $0x7237, (26)
|
|
|
ror %ax # (25)
|
ror %ax # (25)
|
pushf
|
pushf
|
mov %ax, (68)
|
mov %ax, (68)
|
|
|
rorw (24) # (26)
|
rorw (24) # (26)
|
pushf
|
pushf
|
|
|
movw $0x100, %cx
|
movw $0x100, %cx
|
ror %cl, %bx # (27), zero bit shift
|
ror %cl, %bx # (27), zero bit shift
|
pushf
|
pushf
|
movw %bx, (70)
|
movw %bx, (70)
|
|
|
movw $0xffff, %cx
|
movw $0xffff, %cx
|
movw %bx, %dx
|
movw %bx, %dx
|
ror %cl, %dx # (27), -1, result 0
|
ror %cl, %dx # (27), -1, result 0
|
pushf
|
pushf
|
movw %dx, (72)
|
movw %dx, (72)
|
|
|
movb $0x4, %cl
|
movb $0x4, %cl
|
ror %cl, %bx # (27) normal
|
ror %cl, %bx # (27) normal
|
pushf
|
pushf
|
movw %bx, (74)
|
movw %bx, (74)
|
|
|
movb $0x4, %cl
|
movb $0x4, %cl
|
rorw %cl, (26) # (28)
|
rorw %cl, (26) # (28)
|
pushf
|
pushf
|
|
|
# ror byte operations
|
# ror byte operations
|
movw $0x4288, %dx
|
movw $0x4288, %dx
|
movw $0x8bab, %ax
|
movw $0x8bab, %ax
|
movw $0x5dd9, (28)
|
movw $0x5dd9, (28)
|
movw $0xc7f7, (30)
|
movw $0xc7f7, (30)
|
|
|
ror %ah # (29)
|
ror %ah # (29)
|
pushf
|
pushf
|
mov %ax, (76)
|
mov %ax, (76)
|
|
|
rorb (29) # (30)
|
rorb (29) # (30)
|
pushf
|
pushf
|
|
|
movb $0x7, %cl
|
movb $0x7, %cl
|
ror %cl, %dl # (31)
|
ror %cl, %dl # (31)
|
pushf
|
pushf
|
movw %dx, (78)
|
movw %dx, (78)
|
|
|
rorb %cl, (30) # (32)
|
rorb %cl, (30) # (32)
|
pushf
|
pushf
|
|
|
|
|
hlt
|
hlt
|
|
|
.org 65520
|
.org 65520
|
jmp start
|
jmp start
|
.org 65535
|
.org 65535
|
.byte 0xff
|
.byte 0xff
|
|
|