Questions tagged [mic-1]

The MIC-1 is a processor architecture invented by Andrew S. Tanenbaum to use as a simple but complete example in his teaching book Structured Computer Organization.

From the MIC-1 Wikipedia page:

It consists of a very simple control unit that runs microcode from a 512-words store.

The Micro-Assembly Language (MAL) is engineered to allow simple writing of an IJVM interpreter, and the source code for such an interpreter can be found in the book.

15 questions
3
votes
1 answer

Mic1, Micro-assembly language, creating a multiplier

I'm currently working with micro-assembly language (MAL) and using the Mic1mmv simulator to test it. I'm trying to figure out how to make a program that multiplies two numbers, but I'm struggling with figuring out how to do so. Here is the following…
user3470173
  • 61
  • 1
  • 2
  • 6
2
votes
1 answer

IJVM is IRETURN equal to HALT ? Because both stopps the interpreter?

I think IRETURN and HALT are the same commend in IJVM. Because I tried both and both stopped the interpreter.
1
vote
0 answers

shifting registers to right in the mic-1 without fetches

this is the first time I post a question here so feel free to give me some feedback were something not described in the proper manner. To the actual question: I was wondering if there was a way to shift a word in one of the registers TO THE RIGHT by…
Tripparsugo
  • 11
  • 1
  • 4
1
vote
1 answer

How to negate a number in IJVM?

I was thinking of a way to implement a NOT operation/instruction for IJVM so that I could write a multiplication JAS method, but I'm having trouble trying to implement a negation method. Can anyone help out with a way to go about doing this?
1
vote
1 answer

IJVM exercise, swapping 2 elements in a 4 elements stack

i'm trying to create a microprogrammed function that, given 4 values in the stack, swaps the 3rd and the fourth. I called it "mswap", this is the microcode so far: mswap1 SP = SP - 1 mswap2 SP = SP - 1 mswap3 MAR = SP - 1 mswap4 rd mswap5 MAR =…
1
vote
0 answers

Implementing min of 3 numbers in Mic-1 macro code

I have the following algorithm to find a minimum of three input numbers: min(a,b,c): x := a if b < x then x := b if c < x then x := c return x end min(a,b,c) I'm trying to implement a Mic-1 micro code following the algorithms…
Bun
  • 3,037
  • 3
  • 19
  • 29
1
vote
1 answer

Carry bit of addition in IJVM

The IADD instruction in IJVM adds two 1-word numbers. When I add EEEEEEEE to itself I get DDDDDDDC. What happens to the carry 1? How can I get it? Is it saved in a register?
0
votes
0 answers

Micro-assembly language how to do loop arithmetic shift right

ixor1 MAR = SP = SP - 1; rd // takes next to word on stack ixor2 OPC = TOS // OPC is number of bits to shift 2 ixor3 H = MDR // H is the number to be shifted 5 // What i need to do is…
0
votes
0 answers

IJVM, what means the numbers next to the method names?

I have the IJVM Simulator I got with the download example code. I don't understand what the numbers next to the methods mean. First example Second example I understand that I am calling the add method above, but then what are those 3 and 1 next to…
0
votes
3 answers

Constructing a hex number by shifting, inverting and adding +/- 1

I'm trying to save a number 0xFD00 in a register (MIC-1 architecture). There are registers: 0 +1 -1 AMASK: 0x0FFF SMASK: 0x00FF I can do left, right bit shifts and inverses. It is also possible to add values like SMASK + SMASK or AMASK + (-1). I…
GeoCap
  • 505
  • 5
  • 15
0
votes
1 answer

Changing,deleting or adding something to the ALU mic-1 architecture

Hey im struggling with a Task. Anyone here to help me to solve this question? Consider the appearance of the Mic-1 and discuss the following changes. Go For example, ask whether the micro-architecture is still fundamentally working and which…
0
votes
0 answers

How to output a number over 9 in IJVM?

i have searched a lot, but unsuccessful. Maybe you can help me, give some advice or source where i can find the answer. I can not understand how to output a number if it is more than 9 in IJVM architecture with MIC-1 simulator, I have a simple 2…
Ign434
  • 1
  • 1
  • 2
0
votes
1 answer

How to create a IUSHR4 on IJVM?

i need to create an extension of MAL. So, first i had tried to add on mic1sim.mal MAR = SP = SP + 1; rd // read top of the stack H = TOS // H will be a SP MDR = H = H >> 1; wr // SHIFT 1 and write…
Paolo
  • 1
-1
votes
1 answer

MIC-1 Simulation how to get started

Not sure how to start this.. For the given high-level code: c = b - a; a = a * 2; complete the tasks: create corresponding ijvm hexcode store into appropriate cells simulate the instructions show changing contents of each data cell using "/",…
-2
votes
1 answer

Meaning of this set of instructions in Mic-1 [MAL Language]

The sequence of Mic-1 instructions below realize a new instruction bish8pu x (x is an offset in 8 bit in binary code). What is the meaning of this set of instructions? bish8pu1 MAR=SP bish8pu2 H=TOS << 8 bish8pu3 TOS=MDR=MBRU OR H;wr…
rammar
  • 11
  • 1