56 lines
533 B
C
56 lines
533 B
C
#define BOOTSTRAPN 52
|
|
const char* bootstrapcode[BOOTSTRAPN] = {
|
|
"@256",
|
|
"D=A",
|
|
"@SP",
|
|
"M=D",
|
|
"@BOOTSTRAP$ret",
|
|
"D=A",
|
|
"@SP",
|
|
"A=M",
|
|
"M=D",
|
|
"@SP",
|
|
"M=M+1",
|
|
"@LCL",
|
|
"D=M",
|
|
"@SP",
|
|
"A=M",
|
|
"M=D",
|
|
"@SP",
|
|
"M=M+1",
|
|
"@ARG",
|
|
"D=M",
|
|
"@SP",
|
|
"A=M",
|
|
"M=D",
|
|
"@SP",
|
|
"M=M+1",
|
|
"@THIS",
|
|
"D=M",
|
|
"@SP",
|
|
"A=M",
|
|
"M=D",
|
|
"@SP",
|
|
"M=M+1",
|
|
"@THAT",
|
|
"D=M",
|
|
"@SP",
|
|
"A=M",
|
|
"M=D",
|
|
"@SP",
|
|
"M=M+1",
|
|
"@5",
|
|
"D=A",
|
|
"@SP",
|
|
"D=M-D",
|
|
"@ARG",
|
|
"M=D",
|
|
"@SP",
|
|
"D=M",
|
|
"@LCL",
|
|
"M=D",
|
|
"@Sys.init",
|
|
"0;JMP",
|
|
"(BOOTSTRAP$ret)"
|
|
};
|