Revision 36,
1.1 KB
checked in by pntsvt00, 14 years ago
(diff) |
modificati i file per la compilazione. boot.s linkato a 0xFFF0000020
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | #!/usr/bin/php -q |
---|
2 | <?php |
---|
3 | |
---|
4 | // Open the stdin |
---|
5 | $fp = fopen("php://stdin", "r"); |
---|
6 | |
---|
7 | // Discard first lines |
---|
8 | for($i=0; $i<7; $i++) fgets($fp); |
---|
9 | |
---|
10 | // instruction start at address 10h |
---|
11 | //echo "@ 10\n"; |
---|
12 | echo "// inserisco 16 ff per partire da 10h e scrivo op4,op3,op2,op1 \n"; |
---|
13 | echo "0001\n"; |
---|
14 | echo "0000\n"; |
---|
15 | echo "0001\n"; |
---|
16 | echo "0000\n"; |
---|
17 | echo "0001\n"; |
---|
18 | echo "0000\n"; |
---|
19 | echo "0001\n"; |
---|
20 | echo "0000\n"; |
---|
21 | echo "0001\n"; |
---|
22 | echo "0000\n"; |
---|
23 | echo "0001\n"; |
---|
24 | echo "0000\n"; |
---|
25 | echo "0001\n"; |
---|
26 | echo "0000\n"; |
---|
27 | echo "0001\n"; |
---|
28 | echo "0000\n"; |
---|
29 | |
---|
30 | // Print only the opcodes to stdout |
---|
31 | while (!feof($fp)) { |
---|
32 | $line = fgets($fp); |
---|
33 | $opcode1 = substr($line, 14, 2); |
---|
34 | $opcode2 = substr($line, 17, 2); |
---|
35 | $opcode3 = substr($line, 20, 2); |
---|
36 | $opcode4 = substr($line, 23, 2); |
---|
37 | $caratteri = strlen($opcode1); |
---|
38 | if($caratteri != 0){ |
---|
39 | echo $opcode2.$opcode1; |
---|
40 | //echo $opcode1.$opcode2; |
---|
41 | echo "\t //".$line; |
---|
42 | echo $opcode4.$opcode3."\n"; |
---|
43 | //echo $opcode3.$opcode4."\n"; |
---|
44 | } |
---|
45 | else{ |
---|
46 | echo "//".$line; |
---|
47 | $line = fgets($fp); |
---|
48 | echo "//".$line; |
---|
49 | } |
---|
50 | } |
---|
51 | |
---|
52 | // Close the input file |
---|
53 | fclose($fp); |
---|
54 | |
---|
55 | ?> |
---|
56 | |
---|
Note: See
TracBrowser
for help on using the repository browser.