From a049351c5d512710f557ffb45ee6391fc86a3dc6 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 12 Apr 2026 01:03:47 +0000 Subject: fix table management instructions' ({l,s}{g,i,l}dt) mem_size these instructions, it turns out, have fixed operand size based on CPU execution mode and regardless of prefixes. good to know! --- test/real_mode/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/real_mode/mod.rs') diff --git a/test/real_mode/mod.rs b/test/real_mode/mod.rs index 5fb109f..af8bfaf 100644 --- a/test/real_mode/mod.rs +++ b/test/real_mode/mod.rs @@ -104,11 +104,11 @@ fn test_real_mode() { test_display(&[0x0e], "push cs"); test_display(&[0x0f, 0x01, 0x38], "invlpg byte [bx + si * 1]"); test_display(&[0x0f, 0x01, 0x3f], "invlpg byte [bx]"); - test_display(&[0x0f, 0x01, 0x40, 0xff], "sgdt ptr [bx + si * 1 - 0x1]"); - test_display(&[0x0f, 0x01, 0x41, 0xff], "sgdt ptr [bx + di * 1 - 0x1]"); - test_display(&[0x0f, 0x01, 0x49, 0xff], "sidt ptr [bx + di * 1 - 0x1]"); - test_display(&[0x0f, 0x01, 0x51, 0xff], "lgdt ptr [bx + di * 1 - 0x1]"); - test_display(&[0x0f, 0x01, 0x59, 0xff], "lidt ptr [bx + di * 1 - 0x1]"); + test_display(&[0x0f, 0x01, 0x40, 0xff], "sgdt far [bx + si * 1 - 0x1]"); + test_display(&[0x0f, 0x01, 0x41, 0xff], "sgdt far [bx + di * 1 - 0x1]"); + test_display(&[0x0f, 0x01, 0x49, 0xff], "sidt far [bx + di * 1 - 0x1]"); + test_display(&[0x0f, 0x01, 0x51, 0xff], "lgdt far [bx + di * 1 - 0x1]"); + test_display(&[0x0f, 0x01, 0x59, 0xff], "lidt far [bx + di * 1 - 0x1]"); test_display(&[0x0f, 0x01, 0x61, 0xff], "smsw word [bx + di * 1 - 0x1]"); test_display(&[0x0f, 0x01, 0x71, 0xff], "lmsw word [bx + di * 1 - 0x1]"); test_display(&[0x0f, 0x01, 0x79, 0xff], "invlpg byte [bx + di * 1 - 0x1]"); -- cgit v1.1