Bloggo

A GitHub pages blog

View the Project on GitHub mjkkirschner/Bloggo

Command name Micocodes Byte Code Operand Description LOC in byte code.      
               
               
LOADA Loads memory address at second byte into A register 0001x0000 Memory address up to 1 byte 2 lines of code      
1 MI CO Fetch line of code        
2 RO INI CE Store instruction, increment to operand line      
3 MI CO Get next line        
4 RO MI Lookup value at operand address.        
5 RO AI CE Store memory value in A reg. - RAM will now point to the operand we care about as opposed to the address.      
               
               
               
               
OUTA Loads A register into output register and displays it 0010x0000   1 line of code (no operand)      
1 MI CO Fetch line of code NA      
2 RO INI CE Store instruction, increment to next line      
3 AO OI A out, output in        
               
               
               
ADDTOA Adds Value at Location operand to whatever is in A register currently 0011x0000 memory address up to 1 byte 2 lines of code      
1 MI CO Fetch line of code        
2 RO INI CE Store instruction, increment to operand line      
3 MI CO Get next line        
4 RO MI Lookup value at operand address.        
5 RO BI CE store value at operand in B Reg      
6 SUMO AI ADD Store sum in A reg.      
               
               
SUBTRACTFROM_A Subtracts Value at Location operand from whatever is in A register currently 0100x0000 memory address up to 1 byte 2 lines of code      
1 MI CO Fetch line of code        
2 RO INI CE Store instruction, increment to operand line      
3 MI CO Get next line        
4 RO MI Lookup value at operand address.        
5 RO BI CE store value at operand in Instruction Reg      
6 SUMO AI SUB Store sum in A reg.      
               
               
STOREA Stores A register value in memory at address 0101x0000 Memory address up to 1 byte 2      
1 MI CO Fetch line of code        
2 RO INI CE Store instruction, increment to operand line      
3 MI CO Get next line        
4 RO MI Lookup value at operand address.        
5 RI AO CE Store A register value in Ram where MAR currently points.      
               
               
LOADAIMMEDIATE Store operand in A reg. 0110x0000 Value up to one byte. 2      
1 MI CO Fetch line of code        
2 RO INI CE Store instruction, increment to operand line      
3 MI CO Get next line        
4 RO AI CE Store Value from RAM directly in A reg.      
               
JUMP Store operand in ProgamCounter 0111x0000 Address up to one byte. 2      
1 MI CO Fetch line of code        
2 RO INI CE Store instruction, increment to operand line      
3 MI CO Get next line.        
4 RO JE JL JG Set counter to value being pulled from RAM.    
               
JUMPIFEQUAL Store operand in ProgamCounter if A == B register 1000x0000 Address up to one byte. 2      
1 MI CO Fetch line of code        
2 RO INI CE Store instruction, increment to operand line      
3 MI CO Get next line        
4 CE Increment the counter incase we do not jump          
5 RO JE Set counter to value being pulled from RAM.        
               
JUMPIFLESS Store operand in ProgamCounter if A < B register 1001x0000 Address up to one byte. 2      
1 MI CO Fetch line of code        
2 RO INI CE Store instruction, increment to operand line      
3 MI CO Get next line        
4 CE Increment the counter incase we do not jump          
5 RO JL Set counter to value being pulled from RAM.        
               
JUMPIFGREATER Store operand in ProgamCounter if A > B register 1010x0000 Address up to one byte.        
1 MI CO Fetch line of code        
2 RO INI CE Store instruction, increment to operand line      
3 MI CO Get next line        
4 CE Increment the counter incase we do not jump          
5 RO JG Set counter to value being pulled from RAM.        
               
LOADB Loads memory address at second byte into B register 1011x0000 Memory address up to 1 byte 2 lines of code      
1 MI CO Fetch line of code        
2 RO INI CE Store instruction, increment to operand line      
3 MI CO Get next line        
4 RO MI Lookup value at operand address.        
5 RO BI CE Store memory value in B reg. - RAM will now point to the operand we care about as opposed to the address.      
               
LOADBIMMEDIATE Store operand in B reg. 1100x0000 Value up to one byte. 2      
1 MI CO Fetch line of code        
2 RO INI CE Store instruction, increment to operand line      
3 MI CO Get next line        
4 RO BI CE Store Value from RAM directly in B reg.      
               
STOREB Stores B register value in memory at address 1101x0000 Memory address up to 1 byte 2      
1 MI CO Fetch line of code        
2 RO INI CE Store instruction, increment to operand line      
3 MI CO Get next line        
4 RO MI Lookup value at operand address.        
5 RI BO CE Store B register value in Ram where MAR currently points.      
               
UPDATEFLAGSREG Updates the flags register with the latest values from the a and b registers ( A<B, A<B, A>B, etc) 1110x0000 none 1      
1 MI CO Fetch line of code.        
2 RO INI CE Store instruction, increment to operand line.      
3 FLAGIN Update flags register.