sfl-examples/slide-examples/ex06.asm

17 lines
344 B
NASM
Raw Normal View History

2023-12-14 14:12:51 +01:00
bits 64
SECTION .data
; empty
SECTION .text
global _start
_start:
%include "header.asm.inc"
mov ax, -1 ; initialize with negative value (-1)
mov ebx, eax ; ---> ebx = 0x0000ffff, i.e., positive!
movsx ebx, ax ; ---> ebx = 0xffffffff, i.e., negative (-1)
%include "sysexit.asm.inc"