Created
June 19, 2014 16:59
-
-
Save mr-fool/af34057559504ca1faeb to your computer and use it in GitHub Desktop.
x86 asm in tasm sytnax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;simple print program | |
;testing variable declaration and simple print | |
;testing print i/o | |
;easiest program to see whether or not it is assembled correct | |
;if it is not assembled correctly, there the output will be wrong | |
;standard header | |
.model tiny | |
.data | |
hello db "hello$" ; creating a variable hello with the string hello | |
.code | |
org 100h | |
Start: | |
mov ax, seg hello ;moves the segment that hello is in into ax | |
mov ds, ax | |
mov dx, offset hello | |
mov ah, 09 ; interupt 21h to print a string | |
int 21h ;terminates the string | |
;exit sequence | |
mov ah, 4ch | |
mov al,00h | |
int 21h | |
END START | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment