@@ -33,22 +33,22 @@ class DisassembledInstruction {
3333
3434export class Disassembler {
3535
36- private uint8Array : Uint8Array ;
37- private current : number = 0 ;
38- private address : number = 0 ;
39- private headerSize : number = 0 ;
36+ uint8Array : Uint8Array ;
37+ current : number = 0 ;
38+ address : number = 0 ;
39+ headerSize : number = 0 ;
4040 public disassembledInstructions : DisassembledInstruction [ ] ;
4141
42- private opcode : number ;
43- private operand1 : number ;
44- private operand2 : number ;
42+ opcode : number ;
43+ operand1 : number ;
44+ operand2 : number ;
4545
46- private codeSize : number ;
47- private dataSize : number ;
48- private entryPoint : number ;
46+ codeSize : number ;
47+ dataSize : number ;
48+ entryPoint : number ;
4949
50- private jumpDestination : number ;
51- private warning : string ;
50+ jumpDestination : number ;
51+ warning : string ;
5252
5353 public static readonly MIN_OBJ_SIZE : number = 1 + 1 + 3 * 4 + 1 ;
5454
@@ -152,26 +152,26 @@ export class Disassembler {
152152 this . disassembledInstructions = [ ] ;
153153 }
154154
155- private get ( ) {
155+ get ( ) {
156156 return this . uint8Array [ this . current ++ ] & 0x0ff ;
157157 }
158158
159- private get2 ( ) {
159+ get2 ( ) {
160160 return ( this . get ( ) << 8 | this . get ( ) ) & 0x0ffff ;
161161 }
162162
163- private get4 ( ) {
163+ get4 ( ) {
164164 return ( this . get2 ( ) << 16 | this . get2 ( ) ) ;
165165 }
166166
167- private jumpOffset ( ) {
167+ jumpOffset ( ) {
168168let displacement = this . operand1 = this . get2 ( ) ;
169169 displacement = displacement << 16 >> 16 ;
170170this . jumpDestination = this . address + displacement ;
171171return displacement + ' (dest: ' + this . jumpDestination + ')' ;
172172 }
173173
174- private put ( instruction : Instruction , bytes : Uint8Array , operands : string = null , isJumpInstruction : boolean = false ) {
174+ put ( instruction : Instruction , bytes : Uint8Array , operands : string = null , isJumpInstruction : boolean = false ) {
175175 if ( this . jumpDestination && ( this . jumpDestination < 0 || this . jumpDestination >= this . uint8Array . length ) ) {
176176 this . warning = 'This instruction is problematic! Destination address does not exist.' ;
177177 }
0 commit comments