next up previous contents
Next: Bibliography Up: GAS¸¦ ÀÌ¿ëÇÑ Alpha Assembly Previous: ÄÄÆÄÀÏ ¹æ¹ý

Alpha Assembly ¾ð¾î ÇÁ·Î±×·¡¹ÖÇϱâ

¾ÕÀÇ C¾ð¾î¿¡¼­ ¸¸µé¾îÁø º¹ÀâÇÑ hello.s¸¦ °£´ÜÇÏ°Ô ¸¸µé¾î º½À¸·Î½á Alpha Assembly ¾ð¾î¸¦ ÀÍÇôº¸ÀÚ.

GAS·Î ÇÁ·Î±×·¥À» ÇÒ¶§ ÁÖÀÇÇÒ »çÇ×Àº ÀÎÅÚ°ú °°ÀÌ Instruction´ÙÀ½¿¡ ¸ñÀû Register¿Í ¼Ò½º Register°¡ ÀÖÁö ¾Ê°í Instruction ´ÙÀ½À ¼Ò½º Register¿Í ¸ñÀû Register°¡ ¼ø¼­´ë·Î µÇ¾î ÀÖ´Â AT&T ½ºÅ¸ÀÏ·Î µÇ¾î ÀÖ´Ù´Â Á¡ÀÌ´Ù.

´ÙÀ½Àº hello.s ÀÌ´Ù.

/* add.s
 * Alpha Assembly ÇÁ·Î±×·¡¹Ö ½Ç½À
 * 1998³â 11¿ù 24ÀÏ ssmLUG Á¤º´¼ö
 * Copyright (c) 1998 ssmLUG
 */

$msg:
		.ascii "Hello World!\12\0"
.text
        .align 3
        .globl main
        .ent main
main:
		lda $16, $msg
		jsr $26, printf
		ret $31, ($26), 1
        .end main



Kwon Soon Son
1998-11-25