Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Alpha Assembler???
@ 1996-05-10  4:00 Hermann Schinagl
  1996-05-12  4:00 ` Steve Hobbs
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hermann Schinagl @ 1996-05-10  4:00 UTC (permalink / raw)



Hi

A few days ago I read the alpha architectural maunal, because I have
do so a view lines of code in alpha assembly language. I have done  a
lot of assembly language programming on other plattforms, and this is
my first try on Alpha, so I need your assistance:

1) What a about a processor stack? I couldn't find a stack to which
	I can push, and where I can pop from. 
	( Even in the architectural manual)

2) How do C compilers generate the code for calling a subroutine?
	Normaly the arguments are pushed to a stack, and
	the called procedure takes the arguments from the stack.
	I couldn't find something similar.

3) What about the 't*' registers I found in the disassembly of
	code, a GNU C compiler generated. There is no reference
	to 't*' registers in my architectural manual

4) Please give me some hints to the following piece of code

  C-Code
  ------
  main()
  {
	// func001
	int w=7;
	func001 (w);
  }

  (gdb) disassemble of the above C-Code
  -------------------------------------
  Dump of assembler code for function main:
  0x120001200 <main>:    27bb2000  ldah    gp, 536870912(t12)
  0x120001204 <main+4>:  23bd6e80  lda     gp, 28288(gp)
  0x120001208 <main+8>:  23deffe0  lda     sp, -32(sp)
  0x12000120c <main+12>: b75e0000  stq     ra, 0(sp)
  0x120001210 <main+16>: b5fe0008  stq     fp, 8(sp)
  0x120001214 <main+20>: 47de040f  or      sp, sp, fp
  0x120001218 <main+24>: 47e0f401  mov     0x7, t0
  0x12000121c <main+28>: b02f0010  stl     t0, 16(fp)
  0x120001220 <main+32>: a02f0010  ldl     t0, 16(fp) 
  0x120001224 <main+36>: 44210410  or      t0, t0, a0
  0x120001228 <main+40>: a77d8048  ldq     t12, -32696(gp)
  0x12000122c <main+44>: 6b5b40d8  jsr     ra, (t12), 0x120001590
  0x120001230 <main+48>: 27ba2000  ldah    gp, 536870912(ra)
  0x120001234 <main+52>: 23bd6e50  lda     gp, 28240(gp)
  0x120001238 <main+56>: 47ff0400  clr     v0
  0x12000123c <main+60>: c3e00000  br       0x120001240 <main+64>
  0x120001240 <main+64>: 45ef041e  or      fp, fp, sp
  0x120001244 <main+68>: a75e0000  ldq     ra, 0(sp)
  0x120001248 <main+72>: a5fe0008  ldq     fp, 8(sp)
  0x12000124c <main+76>: 43c4141e  addq    sp, #32, sp
  0x120001250 <main+80>: 6bfa8001  ret     zero, (ra), 1







^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1996-05-14  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-05-10  4:00 Alpha Assembler??? Hermann Schinagl
1996-05-12  4:00 ` Steve Hobbs
1996-05-13  4:00 ` Makoto Shimojima, Univ of Tsukuba/CDF
1996-05-14  4:00 ` Hartmut Streppel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox