반응형
.text _start: .global _start mov r0, #0 ldr r1, =buf mov r2, #1 mov r7, #3 swi 0 ldrb r5, [r1] LOOP: CMP r5, #10 BEQ exit CMP r5, #49 BLT LOOP2 CMP r5, #57 BGT LOOP2 mov r0, #1 mov r2. #1 mov r7, #4 swi 0 LOOP2: mov r0, #0 ldr r1, =buf mov r2, #1 mov r7, #3 swi 0 ldrb r5, [r1] B LOOP exit: mov r0, #0 mov r7, #1 swi 0 .data .align buf: .skip 4 .end |
반응형
'IT이론 > arm' 카테고리의 다른 글
[ARM] 입력받은 숫자의 합을 2진수로 출력하기 (0) | 2014.01.23 |
---|---|
[ARM] Hello World 출력하기 (0) | 2014.01.23 |