Another way to see the stack-manipulation instructions is to look at
the output of 8l -a; here's the start of it using Brantley's example:

: cpu; 8l -a t.8|p
001020  (776)   TEXT    put+0(SB),$12
001020 83ec0c   (776)   SUBL    $12,SP
001023 b80c690000       (778)   MOVL    $.string<1>+0(SB),AX
001028 890424   (778)   MOVL    AX,(SP)
00102b 8b442410 (778)   MOVL    x+16(FP),AX
00102f 89442404 (778)   MOVL    AX,4(SP)
001033 e86e010000       (778)   CALL    ,11a6+print
001038 83c40c   (778)   ADDL    $12,SP
00103b c3       (778)   RET     ,
00103c  (782)   TEXT    main+0(SB),$16
00103c 83ec10   (782)   SUBL    $16,SP
00103f b102     (786)   MOVB    $2,CX
001041 0fbec1   (787)   MOVBLSX CX,AX
001044 890424   (787)   MOVL    AX,(SP)
001047 b803000000       (787)   MOVL    $3,AX
00104c 89442404 (787)   MOVL    AX,4(SP)
001050 e8cbffffff       (787)   CALL    ,1020+put
001055 83c410   (787)   ADDL    $16,SP
001058 c3       (787)   RET     ,

Reply via email to