how to change 'jmp' and 'popfd' to 64-bit code?
问题 when $ nasm -f elf64 -o thisfile.o thisfile.asm it says the line of jmp and popfd "instruction not supported in 64-bit mode" this is the whole code: SELECTOR_KERNEL_CS equ 8 extern cstart extern gdt_ptr [SECTION .bss] StackSpace resb 2 * 1024 StackTop: [section .text] global _start _start: mov esp, StackTop sgdt [gdt_ptr] call cstart lgdt [gdt_ptr] ;lidt [idt_ptr] jmp SELECTOR_KERNEL_CS:csinit csinit: push 0 popfd ; Pop top of stack into EFLAGS hlt 回答1: Since you're in 64-bit mode, you'll