散人 ![]() | 一點建議,最好對那個組合語言的CPU硬體架構也要有個瞭解會比較好運用。 否則會丈二金剛摸不著頭的感覺。 |
回覆 |
風来坊 | 引用:
因為要去處理interrupt 還有字串及字元的處理方法也不盡相同 不過後來老師改用了這本書就方便多了 Assembly Language for Intel-Based Computers (4th Edition) by Kip R. Irvine ![]() 裡頭有附一個Irvine.inc的檔案 在寫組語時可以include進來後 你要處理input或output時 直接用書上寫的指令函式就可以了 像是: ReadChar WriteChar ReadString WriteString 裡頭也有提供相關函式處理後 要去動哪個register才能找得到資料之類的 有興趣的話 可以買來看看 小弟覺得這本組語原文書蠻不錯的說! 目前全華圖書也有出中譯本了 不過小弟還是建議買原文書啦! | |
回覆 |
會員 ![]() | The following code is just giving you an ideal how to use the program and modify it to fit your needs.check the int 21h, there are at lease more than 100 instructions ( ah = xx , int 21h) you can use to get a char or a string from the key board and output the data to screen. PS : this is the program I wrote in the past. you have to modify it to fit your needs. page 60,132 title program big macro num1,num2 sub ax,ax sub dx,dx mov al,num1 mov dl,num2 .if al >= dl mov temp,al .else mov temp,dl .endif endm print macro mov ah,09h int 21h endm prtch macro mov ah,02h int 21h endm .model small .stack 64 .data data db 0ah x db ? y db ? msg1 db 'Please enter two numbers from 0 to 9',0ah,0dh,'$' msg2 db 'Please enter the second number',0ah,0dh,'$' msg3 db ' ',0ah,0dh,'$' temp db ? msg4 db 'The biggest number is ',0ah,0dh,'$' .code main proc near mov ax,@data mov ds,ax sub ax,ax sub cx,cx lea dx,msg1 mov ah,01 int 21h mov x,al lea dx,msg3 lea dx,msg2 mov ah,01 int 21h mov y,al big x,y mov dl,temp prtch mov ah,4ch int 21h main endp end main |
回覆 |
會員 ![]() | 請問那個是????????? |
回覆 |
會員 ![]() | 請問如果要改成題目原意~ 要怎樣改才正確呢??? 勞請指教 ((這是我自己要問的)) |
回覆 |
會員 ![]() | 我也是用第四英文版的書 |
回覆 |
會員 ![]() | 好像大家都有學過齁~ 好好喔~ 不像我~連改都不會改~ |
回覆 |
|
![]() | ||||
主題 | 主題作者 | 討論版 | 回覆 | 最後發表 |
問題大總合!!!!! [求問] | 聰明的豬 | -- 閒 話 家 常 灌 水 版 | 1 | 2003-09-18 12:32 AM |
求問..WIN ME架設區域網路 | DNAX | -- 網 路 硬 體 版 | 2 | 2001-10-28 08:10 AM |
XML | RSS 2.0 | RSS |
本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。