HWK#3 Write a SISC program which can read 2 integers m, n, and 
      then print out the answer of m*n in this format:
        m = ...
        n = ...
        m*n = ...
    Your program should repeat until m and n are all zero. 
    Use SISC Emulator to run your program.
  **繳交心得以及 Running Script :  SISC.log 
  
  注意: 本題請用 E-mail 繳交寄:  introcs.nctu@gmail.com
        信件標題(Subject:) 像這樣: HWK03 from 學號姓名(你學號接著姓名)
        注意 HWK03 五個字要連著不要有空格! 
        信件內容是你的心得, 其他要放一個壓縮檔作及夾檔副件:
        要先建立一個用你學號+題號名稱的子目錄,
         把你所有檔案放在該子目錄內, 然後壓縮成 .zip 或 .rar 檔案,
         這個 .zip 檔或 .rar 檔當作你這次 mail 的夾檔 

Due: 2010/04/20 (Tuesday)  

  Hint: Write it in assembly language format first.
        And then translate it into SISC machine code manually.
       (Because we don't have an assembler for this language:-)


其實這有一個你們學長用 PERL 寫的 assembler:  siscasm.txt 

  
 http://www.csie.nctu.edu.tw/~tsaiwn/sisc/asm/perl_SISC_assembler/  

裡面有個檔案 siscasm.txt
那個就是啦, 可直接在系上 Unix 上執行
或是抓回 PC , 並抓 Active PERL 5.x 來安裝好, 設好 PATH, 例如:
PATH c:\PERL\BIN;%path%
(已經幫你抓回 sisc/asm/perl_SISC_assembler/PERL_for_Windows/ 目錄中)
然後打 perl siscasm.txt your_asm_file mc_object_output_file 阿就可以了!

不過注意這時 .asm 檔案的語法略有不同: MOV 要寫 MOVE 暫存器名稱要寫 R0, R1, ... RA, .. RF 所有常數都要寫 16 進位 自己看裡面範例 batnum22.asm perl siscasm.txt batnum22.asm batnum22.mc 翻譯後答案是 batnum22.mc
註: 我已經改成 MOV 與 MOVE 同, 暫存器的 R 也可不寫了 :-)
ALL homeworks can be found here: http://www.csie.nctu.edu.tw/~tsaiwn/introcs/00_CS2/03_HomeWorks/
ALL course material can be found here: http://www.csie.nctu.edu.tw/~tsaiwn/introcs/00_CS2/ 請注意是 http://www.csie.nctu.edu.tw/~tsaiwn/introcs/00_CS2/
You are the -th visitors to this page.
SISC Emulator can be found here:
http://www.csie.nctu.edu.tw/~tsaiwn/sisc/
      其實只要抓 sisc.zip 就可以了:-)
以前你們學長用 perl 寫的 SISC assembler
回作業目錄       回課程目錄             Goto 物件導向課程(OOP)目錄