[ บทความ : Stack machine ]

Stack machine concept

* Use stack memory-temporary memory, from ALU operator
* Use L/S (Load/Store) Architecture

Sample

	A = 2
	B = 3
	A = A + B

80x86 assembly coding

	MOV	AL,2		; AL = 2
	MOV	BL,3		; BL = 3
	ADD	Al,BL		; AL = AL + BL

My stack machine assembly

	LDI	3	; Push 3
	LDI	2	; Push 2
	ADD		; Pop ordered 2,3 and push the result 2+3 to stack again
	STD	A	; Pop 5 (Result) to memory at A

How it work!

My stack machine goal


* 8 Bit processor : (Compatible to Z80/Z180/MCS51/68HC11 processor. I want to make the virtual machine.)
* 16 KB MEMORY : CODE + DATA - 12 KB , STACK - 4 KB


* Load/Store Architecture
* 8/16 Data processing : Math and Logic. example ... addition, subtract, multiply, divide, and, or, not (complement), xor, shift-LEFT/RIGHT, rotate-LEFT/RIGHT
* Minimum instruction

Instruction design

2 Format - Zero address / 1's Address

Addressing mode

* Immediate
* Direct
* Indirect

How to do it better

* High speed memory / Bus
* Real-time processing
* Pipe-Line 2 state

Next step?

1. Write program-monitor for Z80/Z180, MCS-51, 68HC11
2. Pipe-line processing.

Notice

This paper is Computer Architecure course's assignment (Year 2000 - KMUTT Computer Engineering) .
Instructor : Dr.Prabhas Chongstitvatana , (Department of Computer Engineering Chulalongkorn University)

Download

> Full paper [stack.pdf - 52.3 KB] / [stack.zip - 42.0 KB]
> Source + Execute + Sample [stkmc.zip - 95.0 KB]
> Pico JAVA chip [picojava.pdf - 54.0 KB] / [picojava.zip - 45.1 KB]


เขียนโดย : ศุภชัย บุศราทิจ, สุวัฒน์ เตชะเพชรไพบูลย์
Author : Supachai Budsaratij, Suwat Taechaphetpaiboon
e-mail : raek@se-ed.net, watcom@hotmail.com
วันที่ทำการปรับปรุง :