![]() ![]() ![]() Strb r5, /* stockage du signe à la position courante */ Strb r1, /* stockage du byte en début de zone r5 la position r4 */īne 1b /* boucle si quotient different de zéro */ Mvnlt r0,r0 /* et inversion en valeur positive */Īdd r1,#48 /* ajout de 48 au reste pour conversion ascii */ Mov r5,#' ' /* par defaut le signe est */ * r1 contient l adresse de la zone de conversion */ * r0 contains the address of the message */ In ABAP you must first cast the character to a byte field and back to a number in order to get its ASCII value. * for this file see task include a file in language AArch64 assembly */ asciz "The code of character is : \n"īl strInsertAtCharInc // insert result at character * for this file see task include a file in language AArch64 assembly*/ * ARM assembly AARCH64 Raspberry PI 3B */ pushWord D1 CLR.W D1 MOVE.B D0, D1 CLR.L D0 MOVE.B D1, D0 now D0 = D1 = $000000II, where I = input AND.B #$F0,D0 chop off bottom nibble LSR.B #4, D0 downshift top nibble into bottom nibble of the word SWAP D0 store in high word AND.B #$0F,D1 chop off bottom nibble MOVE.B D1, D0 store in low word popWord D1 rts HIGH NIBBLE IN HIGH WORD OF D0, LOW NIBBLE IN LOW WORD. ADDQ.B #1, D1 DBRA D2, PrintAllTheCodes rts UnpackNibbles8: INPUT: D0 = THE VALUE YOU WISH TO UNPACK. jsr PrintAllTheCodes forever: bra forever PrintAllTheCodes: MOVE.B D1, D0 jsr PrintChar print the character as-is MOVE.B #" ",D0 jsr PrintChar MOVE.B #"=",D0 jsr PrintChar MOVE.B #" ",D0 jsr PrintChar MOVE.B D1, D0 get ready to print the code JSR UnpackNibbles8 SWAP D0 ADD.B #$30,D0 JSR PrintChar SWAP D0 CMP.B #10, D0 BCS noCorrectHex ADD.B #$07,D0 noCorrectHex: ADD.B #$30,D0 JSR PrintChar MOVE.B ( softCarriageReturn ), D0 JSR doNewLine2 new line, with D0 as the carraige return point. jsr PrintAllTheCodes jsr ResetCoords MOVE.B #8 ,( Cursor_X ) MOVE.B #'a',D1 MOVE.W #25, D2 MOVE.B #8 ,( softCarriageReturn ) set the writing cursor to column 3 of the screen so we don't erase the old output. JSR ResetCoords RESET TYPING CURSOR MOVE.B #'A',D1 MOVE.W #25, D2 MOVE.B #0 ,( softCarriageReturn ) new line takes the cursor to left edge of screen. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |