- Joined
- Oct 26, 2012
- Messages
- 2,355
- Reaction score
- 1,087
Hello, I want to ask you guys something. I made a Assembly code and I want to know if I really understand it. Can you look at the comments if what I say is correct (like what the line does, whether it's right or wrong)
I'm still learning but I think I start to understand more of it
Code:
org 100h ;This is the address where the program starts
; Start code
mov ecx, 5 ;This moves the int 5 into address ecx, which is used for the amount of times for the loop
.begin: ;Some label
; Message
mov ah,09 ;Puts 09 into ah, this is the index for the print function
mov dx,msg ;Puts the string of variable 'msg' into dx, which is used to be print
int 21h ;Execute the print action
; End Message
loop .begin ;Continues the loop (until address ecx is 0)
mov ah,08 ;Puts 08 into address ah, this is the index for the readkey function (AKA 'pause' keyword for .bat)
int 21h ;Executes the above mov
int 20h ;End of main code
; Some variables?
msg db "Hello world", 13, 10, "$" ;Creates new variable called 'msg' with string 'Hello World' and a line carriage. The $ is used to end the string.
I'm still learning but I think I start to understand more of it

