Relative Content

Tag Archive for assemblynasm

Assembly Nasm error – zsh: segmentation fault

section .data NULL equ 0 EXIT_SUCCESS equ 0 SYS_exit equ 60 hit db “Hit! etiqueta is already filled”, 0xA hit_len equ $ – hit miss db “Miss! etiqueta will be filled”, 0xA miss_len equ $ – miss etiqueta_igual db “same etiqueta”, 0xA etiqueta_igual_len equ $ – etiqueta_igual indice db 0b0000 masc_etiqueta dw 0b111111111000000 etiqueta dw […]

Assembly Nasm error – zsh: segmentation fault

section .data NULL equ 0 EXIT_SUCCESS equ 0 SYS_exit equ 60 hit db “Hit! etiqueta is already filled”, 0xA hit_len equ $ – hit miss db “Miss! etiqueta will be filled”, 0xA miss_len equ $ – miss etiqueta_igual db “same etiqueta”, 0xA etiqueta_igual_len equ $ – etiqueta_igual indice db 0b0000 masc_etiqueta dw 0b111111111000000 etiqueta dw […]

Loop iteration failing at second iterattion x86 asm, using NASM

Objective: I intend to create a program that appended digits from user input, convert from ascii to number and into an array (intArray) and also get their sum all using a loop that iterates 5 times. I am very new to assembly language programming so I’m having a really difficult time debugging the program.

How do I access the address dynamically in NASM?

loop: mov rax, SYS_WRITE mov rdi, STDOUT mov rsi, newLine mov rdx, newLineLength syscall ; PATIENT 1 mov rsi, 0 ; reset rsi lea rsi, [record + (printLoop * patient_record)] mov r8, rsi call print_detail inc byte[printLoop] cmp byte[printLoop], bl jne loop jmp main_menu I have this code and i keep on getting errors on […]

Jump distance of jz command is short by 1

Jump distance of jz command is short by 1 .lst file resulting from compilation with nasm assembler: 268 00000108 7405 jz _child ; At 7405, it should not be able to jump to 0000010F. 269 0000010A E9F1FEFFFF jmp near _start 270 271 _child: 272 ; Call the getrandom system call 273 0000010F B83E010000 mov eax, […]