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
// | |
// run.java | |
// Compile: javac run.java | |
// env LC_ALL=en javac run.java mac | |
// javac -J-Dfile.encoding=UTF-8 run.java mac | |
// Run: java run [file name] -> run mode | |
// java run -d [file name] -> disassemble mode | |
// | |
/* |
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
// | |
// test.java | |
// Compile: javac test.java | |
// Run: java test -t/-b [file name] | |
// | |
// env LC_ALL=en javac test.java :mac | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.FileWriter; |
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
Dim strTmp,regTmp | |
strTmp = "/a/bb/ccc/file.txt" | |
Set regTmp = New RegExp | |
regTmp.Pattern = "(^\/.*\/)([^\/]+\.\w+$)" | |
Set matches = regTmp.Execute(strTmp) |
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
/* | |
Compile : cc runrun.c -o runrun | |
Execute : ./runrun a.out -> run mode | |
./runrun -d a.out -> disassemble mode (not run) | |
*/ | |
/* | |
usage: 7run [-p] [-d|-v/-s] cmd [args ...] | |
-p: PDP-11 mode | |
-8: 8086/V6 mode | |
-d: disassemble mode (not run) |
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.IO | |
open System.Text | |
let mem = Array.zeroCreate<byte>(0x10000) | |
mem.[0] <- 0x10uy | |
mem.[1] <- byte 0x20 | |
printfn "0:%d %02x" mem.[0] mem.[0] | |
printfn "1:%d %02x" mem.[1] mem.[1] |
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
/* | |
cc header.c -o header | |
*/ | |
#include <stdio.h> | |
#include <stdint.h> | |
uint8_t mem[0x10000]; | |
/**************************************************/ |
NewerOlder