M
mohamed saleh
Guest
Ik wil weten hoe je binaire omzetten naar BCD of decimale in assembler ik wil een code dankzij
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
CBLOCK 0x20 BCDvalH BCDvalM BCDvalL MCount NumbHi NumbLo endC,, Binary naar BCD conversie routine; 16 bit getal om te zetten is in NumbHi, NumbLo; resultaat is ingesteld in BCDval HML; HexBCD movlw d'16 'movwf MCount clrf BCDvalH clrf BCDvalM clrf BCDvalL BCF STATUS, C loop16 RLF NumbLo, F RLF NumbHi, F RLF BCDvalL, F RLF BCDvalM, F RLF BCDvalH, F decf MCount, F btfsc STATUS, Z terug adjDEC movlw BCDvalL movwf FSR noemen adjBCD movlw BCDvalM movwf FSR noemen adjBCD movlw BCDvalH movwf FSR noemen adjBCD goto loop16 adjBCD movlw d'3 'addwf INDF, W movwf Temp btfsc Temp, 3 movwf INDF movlw 30u addwf INDF, W movwf Temp btfsc Temp, 7 movwf INDF terug te keren eind