This file contains 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
.globl _main | |
_main: | |
.word 0x0000 | |
pushl $11 | |
pushab hello | |
pushl $1 | |
calls $3, _write | |
pushl $0 | |
calls $1, _exit |
This file contains 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
.globl _main | |
_main: | |
.word 0x0000 | |
movl sp, r3 | |
movl fp, r4 | |
movl ap, r5 | |
pushl r3 | |
pushab format1 |
This file contains 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
package mypackage; | |
import java.io.IOException; | |
import java.io.FileInputStream; | |
import java.io.PushbackInputStream; | |
import java.util.*; | |
import static mypackage.OperandType.*; | |
public class VaxDisasm { |
This file contains 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
#!/bin/bash | |
OUTFILE='list' | |
CODE=('mov') | |
SRC=('r0' 'r1' 'r2' 'r3' 'r4' 'r5' 'sp' \ | |
'(r0)' '(r1)' '(r2)' '(r3)' '(r4)' '(r5)' '(sp)' \ | |
'(r0)+' '(r1)+' '(r2)+' '(r3)+' '(r4)+' '(r5)+' '(sp)+' \ | |
'-(r0)' '-(r1)' '-(r2)' '-(r3)' '-(r4)' '-(r5)' '-(sp)' \ | |
'2(r0)' '3(r1)' '1(r2)' '-1(r3)' '0(r4)' '-2(r5)' '-1(sp)' \ |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
enum { | |
NEXPR = 256, | |
BUF_SIZE = 256 | |
}; | |
typedef enum |
This file contains 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
open System | |
open System.IO | |
// 2byteの配列をWord値に変換 | |
let ToWord byteArray = | |
BitConverter.ToUInt16(byteArray, 0) | |
// 4byteの配列をDWord値に変換 | |
let ToDWord byteArray = | |
BitConverter.ToUInt32(byteArray, 0) |