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
| import java.io.*; | |
| class Test | |
| { | |
| public static void main(String args[]) | |
| { | |
| int b; | |
| int a=12; | |
| if(a==12) | |
| { | |
| ; |
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
| START 100 | |
| +MOVER AREG 10 | |
| +ADD AREG ='1' | |
| +MOVER CREG 20 | |
| +ADD CREG ='5' | |
| +MOVER BREG 100 | |
| +MOVER AREG 200 | |
| +ADD BREG ='15' | |
| +ADD AREG ='10' | |
| END |
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
| START 100 | |
| M1 10, 20, &B=CREG | |
| M2 100, 200, &V=AREG, &U=BREG | |
| END |
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
| public class MNTEntry { | |
| String name; | |
| int pp,kp,mdtp,kpdtp; | |
| public MNTEntry(String name, int pp, int kp, int mdtp, int kpdtp) { | |
| super(); | |
| this.name = name; | |
| this.pp = pp; |
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
| 04 1 108 | |
| 01 1 109 | |
| 05 1 101 | |
| 10 0 101 | |
| 00 0 000 | |
| 00 0 019 |
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
| import java.io.BufferedReader; | |
| import java.io.BufferedWriter; | |
| import java.io.FileReader; | |
| import java.io.FileWriter; | |
| import java.util.ArrayList; | |
| public class Pass2 { | |
| ArrayList<TableRow> SYMTAB,LITTAB; | |
| public Pass2() |
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
| public class TableRow { | |
| String symbol; | |
| int address; | |
| int index; | |
| public TableRow(String symbol, int address) { | |
| super(); | |
| this.symbol = symbol; | |
| this.address = address; |
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
| (AD,01) (C,100) | |
| (DL,02) (C,3) | |
| (IS,04) 1 (S,03) | |
| (IS,01) 1 (S,04) | |
| (IS,05) 1 (S,05) | |
| (AD,04) (S,1)+1 | |
| (IS,010) (S,05) | |
| (AD,03) (S,6)+1 | |
| (IS,00) | |
| (DL,01) (C,19) |
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
| import java.io.BufferedReader; | |
| import java.io.BufferedWriter; | |
| import java.io.FileReader; | |
| import java.io.FileWriter; | |
| import java.io.IOException; | |
| import java.util.ArrayList; | |
| import java.util.LinkedHashMap; | |
| public class PassOne { | |
| int lc=0; |
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
| import java.util.HashMap; | |
| public class INSTtable { | |
| HashMap<String, Integer> AD,RG,IS,CC,DL; | |
| public INSTtable() | |
| { | |
| AD=new HashMap<>(); | |
| CC = new HashMap<>(); | |
| IS = new HashMap<>(); |