Class ProgramAddress
java.lang.Object
svm.value.Value
svm.value.ProgramAddress
- Author:
- S-Port: Definition of S-code, Øystein Myhre Andersen
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault ConstructorProgramAddress(Type type, String segID, int ofst) Construct a new ProgramAddress with the given parameters -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare this Value with the given Value according to the given relation.copy()Returns a copy of this ObjectAddressvoidemit(DataSegment dseg) Add this value to the given DataSegmentvoidexecute()Execute this ProgramSegmentvoidfixupAddress(String segID, int ofst) Fixup this ProgramAddress by the given parametersstatic ProgramAddressCreate a new Fixup address.static ProgramAddressScans the remaining S-Code (if any) belonging to this ProgramAddress Value.static voidprintInstr(String cur, boolean decr) Print a SVM-Instructionstatic voidprintInstr(SVM_Instruction cur, boolean decr) Print a SVM-Instructionstatic ProgramAddressread(AttributeInputStream inpt) Reads a ObjectAddress from the given input.segment()Returns the Segment part of a Segment AddresstoString()voidwrite(AttributeOutputStream oupt) Writes this Value to the given output.
-
Field Details
-
segID
Segment ident -
ofst
public int ofstAddress offset
-
-
Constructor Details
-
ProgramAddress
public ProgramAddress()Default Constructor -
ProgramAddress
-
-
Method Details
-
ofScode
Scans the remaining S-Code (if any) belonging to this ProgramAddress Value. Then construct a new ProgramAddress instance.- Parameters:
type- The address type- Returns:
- that ProgramAddress instance.
-
ofFixup
Create a new Fixup address.- Parameters:
type- The address type- Returns:
- an ProgramAddress
-
fixupAddress
Fixup this ProgramAddress by the given parameters- Parameters:
segID- the segment identofst- the offset
-
segment
Returns the Segment part of a Segment Address- Returns:
- the Segment part of a Segment Address
-
copy
Returns a copy of this ObjectAddress -
emit
Description copied from class:ValueAdd this value to the given DataSegment -
compare
Description copied from class:ValueCompare this Value with the given Value according to the given relation. -
execute
public void execute()Execute this ProgramSegment -
printInstr
Print a SVM-Instruction- Parameters:
cur- a SVM-Instructiondecr- signals decrement of paddr in the printout
-
printInstr
Print a SVM-Instruction- Parameters:
cur- a SVM-Instructiondecr- signals decrement of paddr in the printout
-
toString
-
write
Description copied from class:ValueWrites this Value to the given output.- Overrides:
writein classValue- Parameters:
oupt- the output stream- Throws:
IOException- if IOException occur
-
read
Reads a ObjectAddress from the given input.- Parameters:
inpt- the AttributeInputStream- Returns:
- the ObjectAddress read
- Throws:
IOException- if IOException occur
-