Mostrar mensagens com a etiqueta electronica. Mostrar todas as mensagens
Mostrar mensagens com a etiqueta electronica. Mostrar todas as mensagens

sábado, 29 de agosto de 2015

EN:  Electronic components
FR:  Composants électroniques
PT:  Componentes para electrónica

terça-feira, 18 de agosto de 2015



ASSEMBLER ADITION BCD

EN: Program to add the contents of the BC and DE records pairs in BCD and   place the result in result

PT:   Programa para somar os conteudos dos pares de registos BC e DE em BCD e colocar o resultado em result

FR: Programme pour adictioner les paires de registres BC et DE en BCD et placer le résultat dans result



inic:   mov a,e
          add c
          daa
          sta result
          mov a,d
          adc b
          daa
          sta result+1
          mvi a,0
          adc a
          sta result+2
         
          rst 1

_____________EXAMPLES_______________________

when the program run, if BC=2749 and DE=6448,  at the end of program
execution    result has 97, result+1 has 91 and result+2 has  0

_____________

when the program run, if BC=9052 and DE=2914, at the end of program
execution    result has 66, result+1 has 19 and result+2 has 1

  :)


sábado, 25 de julho de 2015

Assembler 8085 String Copy

Assembler 8085     String Copy


 ;    PROGRAM STRING COPY   STRCPY DO C++

DADOS         EQU 2000h
CODIGO       EQU 3000h

        ORG DADOS
SDEST           DS 10  ; HL  String target
SFONTE        DS 6   ; BC  String source

        ORG CODIGO
BEGIN:       LXI H,SDEST;
                   LXI B,SFONTE

STRCPY:     LDAX B
                   ANA A
                   MOV M,A
                   JZ FIM
                   INX B
                   INX H
                   JMP STRCPY
FIM:           RST 1

_______________________________
              SYMBOL TABLE
 
 BEGIN           3000
 FIM                3011
 SDEST           2000
 SFONTE        200A
 STACK        S 0000
 STRCPY        3006


The string ends at the value 0.
at the following example x means d'ont care.

If the string SFONTE='John'
means SFONTE memory 200A= 'J' , 'o' , 'h' , 'n' , 0 , x
              SDEST memory 2000= x , x , x , x , x , x , x , x , x , x

after we run the program the memory is:
   string SFONTE='John'
   string  SDEST='John'
means SFONTE memory 200A= 'J' , 'o' , 'h' , 'n' , 0 , x
              SDEST memory 2000 = 'J' , 'o' , 'h' , 'n' , 0 , x , x , x , x , x

cool!

quarta-feira, 22 de julho de 2015

ASSEMBLER 8085

;FR    La multiplication par additions successives
;PT    MULTIPLICACAO POR SOMAS SUCESSIVAS
;EN   Multiplication by successive additions

;FR    Le résultat est valable uniquement si moins d'un octet
;PT    O RESULTADO NAO PODE EXCEDER 1 BYTE
;EN   The result is only valid if less than one byte    

DADOS        EQU 2000h
CODIGO       EQU 3000h

                   ORG DADOS
NUM1:        DB 1    
NUM2:        DB 1   
   
       
                  ORG CODIGO
BEGIN:            LXI H,NUM1       ; HL APONTA NUM1
                        LDA NUM2;
                        CMP M                ; instrucctions to put
                        JC CONDICAO    ; the counter
                        MOV A,M            ; with the less number that we have
                        LXI H,NUM2       ; to multiply
CONDICAO:    MOV C,A   
                        INR C   
                        MVI A,0
LOOP:              DCR C
                        JZ FIM
                        ADD M
                        JMP LOOP
          
FIM:                RST 1



EN: The result of multiplying NUM1 by NUM2 is in the accumulator now at the end
FR: Le acumulateur va rester avec le resultat de la multiplication de le NUM1 e NUM2
PT: O resultado da multiplicação de NUM1 pelo NUM2 fica no acumulador 

means:         ça veux dire:          quer dizer:

A=NUM1xNUM2

very nice!



A lampada acesa     :)
     The lit lamp      
La lampe allumée   

It's very nice!   It's simple, ok. I intend to publish more interestings. its the begin.

quarta-feira, 20 de maio de 2015

EN

Welcome to the blog. I intend to publish this blog with various topics utilities (and curiosities) in various fields (mathematics, electricity, electronics, physics, programming, crafts ....) and I will support in the English French and Portuguese where possible. I will make an effort to bring information to people who do not speak more than one language and I apologize for my language errors ....

I hope soon start posting topics I'm already preparing. Go following the blog at any time there will be news.


____________________________________________________
PT

Bem vindos ao blog. Pretendo neste blog publicar temas diversos com utilidades (e também curiosidades ) em vários domínios (matematica, electricidade, electrónica, fisica, programação, trabalhos manuais....) e vou tentar dar suporte nas línguas Inglesa Francesa e Portuguesa. Vou fazer um esforço para levar a informação a pessoas que não falam mais que uma língua e peço desculpa nos meus erros de linguagem....

Espero dentro em breve começar a postar os temas que já estou a preparar. Vá seguindo o blog a qualquer momento haverá novidades.


_____________________________________________________
FR

Bienvenue sur le blog. Je compte publier ce blog avec de "choses" utiles (et curiosités) dans divers domaines (mathématiques, l'électricité, l'électronique, la physique, de la programmation, de l'artisanat ....) et je vais essayer de soutenir dans les langues anglaise français et portugais. Je vais faire un effort pour apporter des informations aux personnes qui ne parlent pas plus d'une langue et je excuses dans mes erreurs linguistiques ....

Je l'espère bientôt commencer à poster des sujets que je suis déjà en préparation. Aller suivant le blog à tout moment, il y aura des nouvelles.