-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding detection of COMP-1 data type
- Loading branch information
1 parent
4d1c42c
commit 8d059df
Showing
7 changed files
with
103 additions
and
33 deletions.
There are no files selected for viewing
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
40 changes: 40 additions & 0 deletions
40
smojol-core/src/main/java/org/smojol/common/vm/type/Comp1DataTypeSpec.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package org.smojol.common.vm.type; | ||
|
||
import org.smojol.common.vm.memory.MemoryAccess; | ||
import org.smojol.common.vm.memory.MemoryLayout; | ||
|
||
public class Comp1DataTypeSpec extends DataTypeSpec { | ||
public Comp1DataTypeSpec() { | ||
super(DataFilter.NO_FILTER); | ||
} | ||
|
||
@Override | ||
public String readRaw(String v) { | ||
throw new UnsupportedOperationException("COMP-1 operations not supported yet!"); | ||
} | ||
|
||
@Override | ||
public Object readPublic(MemoryAccess access) { | ||
throw new UnsupportedOperationException("COMP-1 operations not supported yet!"); | ||
} | ||
|
||
@Override | ||
public Object readFormatted(MemoryAccess access) { | ||
throw new UnsupportedOperationException("COMP-1 operations not supported yet!"); | ||
} | ||
|
||
@Override | ||
public void refresh(MemoryAccess access) { | ||
throw new UnsupportedOperationException("COMP-1 operations not supported yet!"); | ||
} | ||
|
||
@Override | ||
public void set(String s, MemoryAccess access) { | ||
throw new UnsupportedOperationException("COMP-1 operations not supported yet!"); | ||
} | ||
|
||
@Override | ||
public MemoryLayout index(int i, MemoryAccess access) { | ||
return null; | ||
} | ||
} |
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
12 changes: 12 additions & 0 deletions
12
smojol-core/src/main/java/org/smojol/common/vm/type/DataFilter.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
package org.smojol.common.vm.type; | ||
|
||
public interface DataFilter { | ||
DataFilter NO_FILTER = new DataFilter() { | ||
@Override | ||
public String filter(String s) { | ||
return s; | ||
} | ||
|
||
@Override | ||
public int sizeInBytes() { | ||
return 0; | ||
} | ||
}; | ||
|
||
String filter(String s); | ||
int sizeInBytes(); | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
IDENTIFICATION DIVISION. | ||
PROGRAM-ID. HELLO-WORLD. | ||
DATA DIVISION. | ||
WORKING-STORAGE SECTION. | ||
01 EXCHANGE-PART-01 PIC XXXX. | ||
10 LOADBUCKET-LAT-BEGN USAGE COMP-1. | ||
PROCEDURE DIVISION. | ||
SECTION-0 SECTION. | ||
P1. | ||
STOP 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