Created
February 11, 2014 12:16
-
-
Save soharu/8933765 to your computer and use it in GitHub Desktop.
명령행 인자를 출력하는 MMIX 코드
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
argv IS $1 | |
t IS $255 | |
k GREG 0 | |
LOC Data_Segment | |
GREG @ | |
NewLn BYTE #a,0 | |
LOC #100 | |
Main SET k,0 | |
Loop LDOU t,argv,k | |
BZ t,Term | |
TRAP 0,Fputs,StdOut | |
LDA t,NewLn | |
TRAP 0,Fputs,StdOut | |
ADDU k,k,8 | |
JMP Loop | |
Term TRAP 0,Halt,0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment