Skip to content

Instantly share code, notes, and snippets.

@kusabanachi
Last active October 18, 2015 03:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kusabanachi/0763408e4397b73036ca to your computer and use it in GitHub Desktop.
Save kusabanachi/0763408e4397b73036ca to your computer and use it in GitHub Desktop.
.globl _main
_main:
.word 0x0000
movl sp, r3
movl fp, r4
movl ap, r5
pushl r3
pushab format1
calls $2, _printf
pushl r4
pushab format2
calls $2, _printf
pushl r5
pushab format3
calls $2, _printf
pushl $0
calls $1, _exit
.data
format1:
.byte 'S, 'P, '=, ' , '%, 'x, 0xa, 0x0
format2:
.byte 'F, 'P, '=, ' , '%, 'x, 0xa, 0x0
format3:
.byte 'A, 'P, '=, ' , '%, 'x, 0xa, 0x0
# simh UNIX/32V での出力
# SP= 7fffffc4
# FP= 7
# AP= 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment