Hi everyone
The computer was a disaster for the instruction set was just too poor, si i have designed a new one:
BINARY OPCODE DESCRIPTION
00000 nop
00001 add add register n to a
00010 sub subtract register n from a
00011 and and logic on a
00100 exor exlusive or logic on a
00101 or or logic on a
00110 not not logic on a
00111 load load value n into register defined by m
01000 loadreg load value at n reg into m reg
01001 jump jump to address nm
01010 compare compare reg a with reg n or word m
01011 jump a<b jump if less flag on
01100 jump a=b jump if equal flag on
01101 jump a>b jump if greater flag on
01110 jump a<>b jump if greater and less flag on
01111 stop stop progam
10000 display display reg n at location m
10001 call nm jump to nm and note the return line
10010 ret return
INSTRUCTION : 5 BITS
NOTHING YET
WORD N : 4 BITS
WORD M : 4 BITS
the memory chips accept 8 bits in one go.
So a full line of code takes 2 bytes.
The first byte stores a 5 bit instruction code
THe second byte stores two four bit words, n and m
i want to make this computer very flexible
dont ask about carries, im not having them (i dont think anyway)
is this flexible enough to make programs?
there are 16 registers, 0 to F
if the description says register n it means the register at location n,
so if n was 1111, the register is F
the computer can only do one subroutine,ie no subroutines inside a subroutine
there are a few digit displays
also, can someone help me with this SRAM:
http://www.farnell.com/datasheets/63505.pdf
I want to know what to do when to do, like a list:
clock cycle
1) set addres
2) set data
3) set pin one high
Thanks, you guys rock!!!
The computer was a disaster for the instruction set was just too poor, si i have designed a new one:
BINARY OPCODE DESCRIPTION
00000 nop
00001 add add register n to a
00010 sub subtract register n from a
00011 and and logic on a
00100 exor exlusive or logic on a
00101 or or logic on a
00110 not not logic on a
00111 load load value n into register defined by m
01000 loadreg load value at n reg into m reg
01001 jump jump to address nm
01010 compare compare reg a with reg n or word m
01011 jump a<b jump if less flag on
01100 jump a=b jump if equal flag on
01101 jump a>b jump if greater flag on
01110 jump a<>b jump if greater and less flag on
01111 stop stop progam
10000 display display reg n at location m
10001 call nm jump to nm and note the return line
10010 ret return
INSTRUCTION : 5 BITS
NOTHING YET
WORD N : 4 BITS
WORD M : 4 BITS
the memory chips accept 8 bits in one go.
So a full line of code takes 2 bytes.
The first byte stores a 5 bit instruction code
THe second byte stores two four bit words, n and m
i want to make this computer very flexible
dont ask about carries, im not having them (i dont think anyway)
is this flexible enough to make programs?
there are 16 registers, 0 to F
if the description says register n it means the register at location n,
so if n was 1111, the register is F
the computer can only do one subroutine,ie no subroutines inside a subroutine
there are a few digit displays
also, can someone help me with this SRAM:
http://www.farnell.com/datasheets/63505.pdf
I want to know what to do when to do, like a list:
clock cycle
1) set addres
2) set data
3) set pin one high
Thanks, you guys rock!!!