Results 1 to 6 of 6

Thread: MIC-1 Help

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    4

    MIC-1 Help

    Hey guys...I have to write the microcode for floating point add, floating point multiply, and floating point subtraction for the MIC-1...I've been working on this for weeks and I can't figure it out....someone please help

  2. #2
    Lively Member maki's Avatar
    Join Date
    Mar 2006
    Location
    Greece
    Posts
    82

    Re: MIC-1 Help

    Does something like that help you?
    Code:
     ## count.s
                           
    #################################################
    #					 	#
    #		text segment	  		#
    #						#
    #################################################
    
    	.text
    	.globl __start
    __start:
    
            la $t0,array           ##$t0 will hold the elements
            lw $t1,count           ##$t1  will be the count
            lb $t3,int             ##$t3 will hold the integer we are looking for
    
    loop1:  beqz $t1,End           ##if it’s null,exit loop
            lw $t4,($t0)           ##fetch next int
            add $t0,$t0,4
            bne $t4,$t3,con        ##not null;same as int?
            add $t5,$t5,1          ##yes,increment counter
    con:    sub $t1,$t1,1          ##increase index
            j loop1                ##and continue
     
    
    End:    la $a0,ans             ##system call to print
            li $v0,4               ##out a message
            syscall
    
            move $a0,$t5           ##system call to print 
            li $v0,1               ##out the count worked out
            syscall
    
            la $a0,end1            ##system call to print
            li $v0,4               ##out a newline
            syscall
                             
            li $v0, 10
            syscall                ##au revoir..
    
    #################################################
    #					 	#
    #     	 	data segment			#
    #						#
    #################################################
    
    	.data
    array:  .word 1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,0,-1
    count:  .word 20
    int:    .word 1
    end1:	.asciiz "\n"
    ans:    .asciiz "The count of the number is "
    ##
    ##end of file count.s

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    4

    Re: MIC-1 Help

    i appreciate the help...but I need to write it in microcode....i need to use registers like MDR, MAR, SP, TOS, H....and so on.......

  4. #4
    Addicted Member
    Join Date
    Aug 2005
    Location
    York
    Posts
    197

    Re: MIC-1 Help

    most us assemblers are x86 - so you are pretty much stuffed.
    I'm amazed Maki is using RISC there.....

  5. #5
    Lively Member maki's Avatar
    Join Date
    Mar 2006
    Location
    Greece
    Posts
    82

    Re: MIC-1 Help

    Some years ago i've worked using Risc for academic purposes. I do not know very much. I thought that something like that may be helpful

  6. #6
    Addicted Member
    Join Date
    Aug 2005
    Location
    York
    Posts
    197

    Re: MIC-1 Help

    RISC knowledge is great.....though for personal computers ....working with Macs is a very rare ambition . However,its useful if you're working with mainframes lol
    Cheers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width