Professional Documents
Culture Documents
Orientada a Objeto
Luiz Carlos do Nascimento
e-mail: nascimentolc@ufsj.edu.br
if (tipo == 1)
linha = 3;
return 0;
}
Linguagem Assembler
; Listing generated by Microsoft (R) Optimizing _tipo$ = -17; size = 1 jneSHORT $LN2@main
Compiler Version 19.00.23026.0 _linha$ = -8; size = 4
_mainPROC; COMDAT ;9 : linha = 3;
TITLEC:\Gdrive\Atual\02-
2016\teste1\aula\Source.cpp ;4 :{ movDWORD PTR _linha$[ebp], 3
.686P $LN2@main:
.XMM pushebp
include listing.inc movebp, esp ; 10 :
.modelflat subesp, 216; 000000d8H ; 11 : return 0;
pushebx
INCLUDELIB MSVCRTD pushesi xoreax, eax
INCLUDELIB OLDNAMES pushedi
leaedi, DWORD PTR [ebp-216] ; 12 : }
PUBLIC_main movecx, 54; 00000036H
EXTRN__RTC_InitBase:PROC moveax, -858993460; ccccccccH popedi
EXTRN__RTC_Shutdown:PROC rep stosd popesi
;COMDAT rtc$TMZ popebx
rtc$TMZSEGMENT ;5 : int linha = 2; movesp, ebp
__RTC_Shutdown.rtc$TMZ DD popebp
FLAT:__RTC_Shutdown
movDWORD PTR _linha$[ebp], 2 ret0
rtc$TMZENDS
_mainENDP
;COMDAT rtc$IMZ
;6 : bool tipo = 1; _TEXTENDS
rtc$IMZSEGMENT
END
__RTC_InitBase.rtc$IMZ DD
FLAT:__RTC_InitBase movBYTE PTR _tipo$[ebp], 1
rtc$IMZENDS
; Function compile flags: /Odtp /RTCsu /ZI ;7 :
; File c:\gdrive\atual\02- ;8 : if (tipo == 1)
2016\teste1\aula\source.cpp
;COMDAT _main movzxeax, BYTE PTR _tipo$[ebp]
_TEXTSEGMENT cmpeax, 1
Linguagem Assembler
;5 : int linha = 2;
movDWORD PTR _linha$[ebp], 3
movDWORD PTR _linha$[ebp], 2 $LN2@main:
;6 : bool tipo = 1; ; 10 :
; 11 : return 0;
movBYTE PTR _tipo$[ebp], 1
;7 :
;8 : if (tipo == 1)
;9 : linha = 3;
Processador 8085
Intel 8085 foi um microprocessador de 8 bits produzido
pela Intel em meados dos anos 1970. Ele era compatível
a nível binário com o popular Intel 8080, mas precisava
de menos hardware de suporte, permitindo assim a
construção de sistemas mais simples e menos
dispendiosos. (Fonte wikipedia)
Configuração:
processador
2k bytes de EPROM ou ROM
256 bytes de RAM
1 timer
3 entradas de interrupção
38 linhas de E/S
Processador 8085
Fonte: http://www.dgtal-sysworld.co.in/
Processador 8085
Registradores
Fonte: http://www.dgtal-sysworld.co.in/
Linguagem Assembler
Somar dois números
MVI D, 8BH
MVI C, 6FH
MOV A, C
ADD D
OUT PORT1
HLT
Linguagem Assembler
Definir qual o maior número
MVI B, 30H
MVI C, 40H
MOV A, B
CMP C
JZ EQU
JC GRT
OUT PORT1
HLT
EQU: MVI A, 01H
OUT PORT1
HLT
GRT: MOV A, C
OUT PORT1
HLT
Linguagem Assembler
Definir qual o maior número HLT
MVI B, 30H saida:
MVI C, 40H OUT PORT1
MOV A, B ret
CMP C
JZ EQU
JC GRT
call saida
HLT
EQU: MVI A, 01H
call saida
HLT
GRT: MOV A, C
call saida
Linguagem Assembler – código binário
Fonte: Intel
8080/8085
ASSEMBLY
LANGUAGE
PROGRAMMING
MANUAL