News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

four stack interpretation

Started by 0x401000, January 15, 2010, 02:09:36 PM

Previous topic - Next topic

0x401000

How can I translate this code http://www.jwdt.com/~paysan/4stack.html to assembler? Someone studying similar realization? I would like to make a full emulator of this processor in assembly language. But I do not know where to start.

hutch--

Try writing a single stack first, allocate a block of memory, allocate a pointer to locate it then simulate what a PUSH and POP instruction do, a PUSH writes the data to memory and changes the pointer to point to it, a POP does it in reverse.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

0x401000

Hi! Thank you, from that already started, I'll write here later  :dance:

0x401000

The scheme was not complicated. But questions in the course of programming. How do I connect x86 model and model type VLIW together? This course is already in a certain processor, in which processor core with 4 stack, and the shell of ordinary processors. Thus there is a bridge, which can run as a command processor VLIW, also with the CISC and RISC commands?

Another question, how then can we realize the parallel execution of code, without using the API WIN Threads? How can I choose whether to do a forward one that should be fulfilled now. Thank you!

hutch--

Short of writing uyour own operating system you can't run threads without the Windows API functions to do this.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php


dedndave

it would seem that those functions eventually use API calls, no ?

donkey

I read a bit of the 4 stack model papers (though not much as I find it only moderately interesting) and from what I saw you will probably need to implement it in some flavor of VHDL, not an easy or inexpensive task. You can start looking for a Windows based VHDL compiler at model.com, it may be able to use the Verilog implementation on the site.

http://model.com/

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Slugsnack

Quote from: dedndave on January 25, 2010, 01:44:19 PM
it would seem that those functions eventually use API calls, no ?
Haha.. so it does..

dedndave

it could be written with masm - although - no way to parallel process without using threads
i don't really think that has to be a requirement
it is an emulator, so it is not like you expect it to be fast - lol
i would think it would be very similar to an interpreter
if i had to do it, i think i would get the basics set up with a few instructions (push, pop, add, sub, call/ret, jmp)
once you have that up and running, it is a matter of adding instructions to the list
depending on how large the instruction sets are, it could be quite a task   :bg

FORTRANS

Hi,

   As it is an emulator, you could process things that are
intended to be in parallel processors in a strict round-
robin fashion.  Or you could process multiple results as
a very long array of boolean valuse.  That could simulate
multiple processes in parallel.

Regards,

Steve N.