MASM x86 Assembly Crash - Access Violation

0

Im just trying to get the basics of assembly and just wanted to test adding two number together, however when i compile it and run the executable it crashes and returns the error:

Unhandled exception at 0x00401005 in AddNums.exe: 0xC0000005: Access violation reading location 0xFFFFFFFF.

This is my code:

.386
.model flat, C
option casemap :none

.data

.code
main:
 mov eax, 10
 int 21h

 mov ebx, 5
 int 21h

 add eax, ebx
 int 21h
end main

I am using MASM on windows 10

assembly
masm
asked on Stack Overflow Nov 22, 2019 by euandeas

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0