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?

More than 3 years have passed since last update.

#概要

paizaでアセンブラ、やってみた。
練習問題やってみた。

#練習問題

九九やってみて。

#サンプルコード

.code32
.text
.global main

main:
    mov     $1, %esi
    mov     $1, %edi
loop:
    mov     %esi, %eax
    push    %esi
    mov     %edi, %ebx
    push    %edi
    mul     %bl
    mov     %eax, %esi
	mov 	$fmt, %edi
	mov 	$0, %eax
	call 	printf
	pop     %edi
    pop     %esi
	add     $1, %esi
	cmp     $10, %esi
    jnz     loop
    push    %esi
    push    %edi
    mov	    $cr, %edi
	call	puts
	pop     %edi
    pop     %esi
    mov     $1, %esi
    add     $1, %edi
    cmp     $10, %edi
    jnz     loop
	ret

.data
fmt:
	.asciz 	"%d "
cr:
	.byte   13
	.byte   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?