Last active
August 29, 2015 14:21
-
-
Save luizamboni/0569a644c3634e1b428d to your computer and use it in GitHub Desktop.
atribuição e soma de variáveis
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
;--------------------------------------------------- | |
; Programa: attribuição e soma de variãveis | |
; Autor: Luiz Carlos Zamboni | |
; Data: 25/05/2015 | |
;--------------------------------------------------- | |
LDI 0 ; zerar o acumulador | |
X EQU 80 ; variavel 1 128 em decimal | |
Y EQU 81 ; variavel 2 129 em decimal | |
Z EQU 82 ; variavel 3 130 em decimal | |
LDI 10 ; 10 em 000A em hexadecimal | |
STA X | |
LDI 5 ; 5 em 0005 em hexadecimal | |
STA Y | |
LDI 0 | |
LDA X ;carrega X no acumulador | |
ADD Y ;soma Y ao acumulador | |
STA Z ;transfere do acumulador para Z | |
OUT 0 | |
HLT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment