push and pop

This commit is contained in:
2026-06-06 23:47:38 -04:00
parent 66710370bf
commit a086fa6590
6 changed files with 67 additions and 20 deletions
+3 -1
View File
@@ -22,6 +22,8 @@ pub fn run() {
})]);
let entry = program.func([BInstr::Asm(Asm {
instrs: vec![
mov(di, 39),
push(rdi),
mov(ax, 1),
mov(di, 1),
lea(rsi, text_sym),
@@ -29,7 +31,7 @@ pub fn run() {
Instr::Syscall,
Instr::Call(hello2),
mov(ax, 0x3c),
mov(di, 39),
pop(rdi),
Instr::Syscall,
],
})]);