Réalisées par des traducteurs professionnels, des entreprises, des pages web ou traductions disponibles gratuitement.
the two parts of a byte are called upper and lower nibble.
die beiden teile des bytes werden oberes und unteres nibble genannt.
Dernière mise à jour : 2018-02-13
Fréquence d'utilisation : 1
Qualité :
in our example we need to shift the upper nibble to the lower nibble position. instead of using
wenn man nun mal das obere nibble anstelle des unteren nibble braucht, dann kommt man um vier mal rollen
Dernière mise à jour : 2018-02-13
Fréquence d'utilisation : 1
Qualité :
that isolates the lower four bits (= the lower nibble) is only possible with registers above r15.
die die oberen vier bits des registers auf null setzt und die unteren vier bits beibeh�lt, nur für register oberhalb r15 möglich ist.
Dernière mise à jour : 2018-02-13
Fréquence d'utilisation : 1
Qualité :
the lower of the two nibbles has had an overflow because 9+9=18 and the lower nibble can only handle numbers up to 15.
die untersten beiden ziffern sind beim addieren übergelaufen (9+9=18 = hex 12).
Dernière mise à jour : 2018-02-13
Fréquence d'utilisation : 1
Qualité :
the overflow was added to bit 4, the lowest significant bit of the upper nibble. which is correct! but the lower nibble should be 8 and is only 2 (18 = 0b0001.0010).
folglich ist die oberste ziffer korrekt um eins erhöht worden, aber die unterste stimmt nicht, sie müsste 8 statt 2 lauten.
Dernière mise à jour : 2018-02-13
Fréquence d'utilisation : 1
Qualité :
; bin2tohex4 ; ========== ; converts a 16-bit-binary to uppercase hex-ascii ; in: 16-bit-binary in rbin1h:l, z points to first ; position of the four-character hex-ascii ; out: z points to the first digit of the four-character ; hex-ascii, ascii digits a..f in capital letters ; used registers: rbin1h:l (unchanged), rmp ; called subroutines: bin1tohex2, bin1tohex1 ; bin2tohex4: mov rmp,rbin1h ; load msb rcall bin1tohex2 ; convert byte mov rmp,rbin1l rcall bin1tohex2 sbiw zl,4 ; set z to start ret ; ; bin1tohex2 converts an 8-bit-binary to uppercase hex ; called by: bin2tohex4 ; bin1tohex2: push rmp ; save byte swap rmp ; upper to lower nibble rcall bin1tohex1 pop rmp ; restore byte bin1tohex1: andi rmp,$0f ; mask upper nibble subi rmp,-'0' ; add 0 to convert to ascii cpi rmp,'9'+1 ; a..f? brcs bin1tohex1a subi rmp,-7 ; add 7 for a..f bin1tohex1a: st z+,rmp ; store in target ret ; and return ; ; ******************************************* ; ; package iv: from hex-ascii to binary ;
; bin2tohex4 ; ========== ; wandelt eine 16-bit-binärzahl in hex-ascii ; aufruf: binärzahl in rbin1h:l, z zeigt auf erste position ; des vierstelligen ascii-hex ; rückkehr: z zeigt auf erste position des vierstelligen ; ascii-hex, ascii-ziffern a..f in großbuchstaben ; benutzte register: rbin1h:l (bleibt erhalten), rmp ; aufgerufene unterroutinen: bin1tohex2, bin1tohex1 ; bin2tohex4: mov rmp,rbin1h ; msb in rmp kopieren rcall bin1tohex2 ; in hex-ascii umwandeln mov rmp,rbin1l ; lsb in rmp kopieren rcall bin1tohex2 ; in hex-ascii umwandeln sbiw zl,4 ; zeiger auf anfang hex-ascii ret ; fertig ; ; bin1tohex2 wandelt die 8-bit-binärzahl in rmp in hex-ascii ; gehört zu: bin2tohex4 ; bin1tohex2: push rmp ; rette byte auf dem stapel swap rmp ; vertausche die oberen und unteren 4 bit rcall bin1tohex1 ; wandle untere 4 bits in hex-ascii pop rmp ; stelle das byte wieder her bin1tohex1: andi rmp,$0f ; maskiere die oberen vier bits subi rmp,-'0' ; addiere ascii-0 cpi rmp,'9'+1 ; ziffern a..f? brcs bin1tohex1a ; nein subi rmp,-7 ; addiere 7 für a..f bin1tohex1a: st z+,rmp ; abspeichern und zeiger erhöhen ret ; fertig ; ; *********************************************** ; ; paket iv: von hex-ascii nach binär ;
Dernière mise à jour : 2018-02-13
Fréquence d'utilisation : 1
Qualité :