0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

paiza.ioでaarch64アセンブラ その8

0
Posted at

概要

paiza.ioでaarch64アセンブラやってみる。
bss、使ってみた。

投入したソースコード

sys_exit   = 93
sys_write  = 64
std_input  = 0
std_output = 1
rep_count  = 60

.bss
        .lcomm buff, rep_count     

.text
.global main               
main:
        ldr     x1, =buff   	
        mov     x2, #rep_count         
        mov     w3, #'*'               
_loop:
        strb    w3, [x1], 1            
        sub     x2, x2, #1             
        cbnz    x2, _loop               
        mov     x8, #sys_write         
        mov     x0, #std_output        
        ldr     x1, =buff            
        mov     x2, #rep_count         
        svc     0                      
        mov     x8, #sys_exit          
        mov     x0, #0                 
        svc     0                      

実行結果

************************************************************

成果物

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?