Quiz 3 (Total 60 marks)
1.
Show the stack and stack content for the following code:
003B 120300 LCALL DELAY
003E 80F0 BACK: SJMP BACK ;keep doing this
0040
0040 ;----------------------this is the delay subroutine
0500 ORG 500H
0500 DELAY:
0500 7DFF MOV R5,#0FFH ;R5=255
0502 DDFE AGAIN: DJNZ R5,AGAIN ;stay here
0504 22 RET ;return [10 marks]
Ans:
Stack /Stack Content
003B 120300 / 09 / 00 3E
003E 80F0 /07
0040 /?
0040 /?
0500 /09 /00 3E
0500 /09 /00 3E
0500 7DFF /09 /00 3E
0502 DDFE /09 /00 3E
0504 22 /07
2. Find the value (in hex) loaded into TH in each of the following.
(a) MOV TH0,#110
(b) MOV TH0,#-30
[10 marks]
(a) 6EH
(b) E2H
3. Given the LCD command write routine COMNWRT. Assume connections P2.1 = RS, P2.2 =R/W, P2.3 = E, write i) a program to call the display the data and ii) a subroutine to display the data (iii) the data "Hello" is checked again its completion of write by a busy flag connected to P2.7. Use the instruction MOVC.
.
[20 marks]
Ans:
MAIN:
MOV DPTR, #MYDATA
HERE:
CLR A
MOVC A, @A+DPTR
JZ DONE
ACALL DISPLAY_DATA
INC DPTR
SJMP HERE
DONE: SJMP DONE [10 marks]
DISPLAY_DATA:
ACALL READY
MOV P1,A ; port 1 fort DATA
SETB P2.1 ;RS=1 FOR Control DATA
CLR P2.2 ;R/W=0 FOR Control WRITE
SETB P2.3 ;H-TO-L FOR Control Enable
CLR P2.3
RET
READY:
SETB P2.7
CLR P2.1
SETB P2.2
BACK:
CLR P2.3
SETB P2.3
CLR P2.3
JB P2.7, BACK
RET [10 marks]
;P2.7=INPUT TO READ BUSY FLAG
;RS=0
;R/W=-1 FOR READ
ORG 300H
MYDATA: DB "Hello",0
ORG 400H
COMNWRT:
MOV P2,A
CLR P2.1
CLR P2.2
SETB P2.3
CLR P2.3
RET
4. Program Timer 1 to be an event counter. Use mode 2 and display the decimal count on P2, P1, and P0 continuously. Set the initial count to 55.
Ans:
MOV TMOD, #60h ; 0110 0000 [timer 1 c/t = 1 time 1 =1]
MOV TL1, #-55 ; count value
MOV TH1, #-55 ; preload
SETB P3.5
AGAIN: SETB TR1
BACK: MOV A, TL1
ACALL CONVERT
JNB TF1, BACK
CLR TR1
CLR TF1
SJMP AGAIN [10 marks]
;--This will convert from, binary (hex)
;to decimal and send each digit to the port
CONVERT:
MOV B,#10
DIV AB
MOV P0,B
MOV B,#10
DIV AB
MOV P1,B
MOV P2,A
RET [10 marks]
[20 marks]
星期五, 3月 06, 2009
星期六, 2月 28, 2009
如何將獨立伺服器升級為網域控制站?(Windows 2000)
按下開始程式集系統管理工具設定你的伺服器,
[ Active directory ] [ ]在開啓的视窗中按下,再按下啓動。
[ Active Directory ] [ ] 在安裝精靈视窗下,網域控制站類型設定中選擇
[ ]新網域的網域控制站。
[ ] [ 在建立樹狀目錄或子網域設定中選擇建立新的 ]網域樹狀目錄
[ DNS ] ,按下一步進行網域名稱設定,在新網域的完整名稱中輸入完整
DNS (: itehelp.com) 名稱。例
NETBIOS [ ] 下一步便是設定。按下一步後設定資料庫儲存位置。如果伺
DNS 服器中沒有配置好服務,系統便會提示安裝,接着按照指示便完成
[ Active Directory ] 安裝,重新啓動電腦,整個升級程序完成。
[ Active directory ] [ ]在開啓的视窗中按下,再按下啓動。
[ Active Directory ] [ ] 在安裝精靈视窗下,網域控制站類型設定中選擇
[ ]新網域的網域控制站。
[ ] [ 在建立樹狀目錄或子網域設定中選擇建立新的 ]網域樹狀目錄
[ DNS ] ,按下一步進行網域名稱設定,在新網域的完整名稱中輸入完整
DNS (: itehelp.com) 名稱。例
NETBIOS [ ] 下一步便是設定。按下一步後設定資料庫儲存位置。如果伺
DNS 服器中沒有配置好服務,系統便會提示安裝,接着按照指示便完成
[ Active Directory ] 安裝,重新啓動電腦,整個升級程序完成。
星期一, 2月 23, 2009
小學五年級中文科補充工作紙 - 標點符號
小學五年級中文科補充工作紙
標點符號
1. 在適當的位置填上「十一」個標點符號。
我把石榴打開來看,裏面全是種子, 粒粒好像水晶珠子似的,美麗極了!它們擠得緊緊的,長得滿滿的,真好看!那一粒粒的種子吃在嘴裏,又甜又酸,那種味道可真特別!我和弟弟都很喜歡吃它。
2. 在適當的位置填上「十一」個標點符號。
大約二百年前,法國正陷於戰爭狀態中,當時拿破崙很明白行軍作戰時糧食補給的重要,於是決定以獎勵的方法向人民徵求能妥善保存食物的方法。一天,報章上刊登了一則廣告:「誰能研究一種可以長期保存食物的方法,就可以得到一萬二千法郎的獎金。」
3. 在適當的位置填上「十六」個標點符號。
媽媽,一直以來,我覺得您是全世界最慈愛、最偉大的好媽媽;能夠做您的女兒,我感到十分幸福。您把家裏整理得井井有條,好讓家人能夠在舒適的環境中生活;您無微不至地照顧我和弟弟,讓我們能夠健康快樂地成長;每次吃飯時,您總會把最好的菜留給我們;當您帶我們逛街時,雖然捨不得買東西給自己,卻又會給我們買衣服和玩具……您凡事都只為家人着想和付出。
星期日, 2月 22, 2009
星期六, 2月 21, 2009
black magic - 嘩嘩嘩
"嘩 嘩 嘩" 係 M
"嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩" 係 S
咁"嘩 嘩 嘩 嘩 嘩" 又係 M
"嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩" 係咩 ??
=====
解說:
"嘩 嘩 嘩" = March
"嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩" = September
"嘩 嘩 嘩 嘩 嘩" = May
所以...
"嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩" = November
"嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩" 係 S
咁"嘩 嘩 嘩 嘩 嘩" 又係 M
"嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩" 係咩 ??
=====
解說:
"嘩 嘩 嘩" = March
"嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩" = September
"嘩 嘩 嘩 嘩 嘩" = May
所以...
"嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩 嘩" = November
星期五, 2月 20, 2009
EE3120 (B) MP & ASSEMBLY LANGUAGE PROG (02EE3120) Tutorial 1 solution
Chapter 1 Introduction
1. (a) 4
(b) 4
(c) 4
(d) 1048 576, 220
(e) 1024K
(f) 1073 741 824, 230
(g) 1 048 576K
(h) 1024M
(i) 8388608, 8192K
2. 1 million pages
3. (a) 589824 bytes
(b) 576 bytes
4. Data bus is bidirectional, address is unidirectional.
5. PC (Program Counter)
6. ALU
7. Address, control and data
8. EAstands forExternalAccess.WhenEAis 0, itwill access the externalmemory.
9. ALE is being usedwhen the external accessmode is being activated, i.e.EA=0. If aROM
is being accessed, a read operation will be needed, so PSEN is used to activate the ROM
andALEis usedtoactivate the address latchinorder tolet the address get into theROM.
1. (a) 4
(b) 4
(c) 4
(d) 1048 576, 220
(e) 1024K
(f) 1073 741 824, 230
(g) 1 048 576K
(h) 1024M
(i) 8388608, 8192K
2. 1 million pages
3. (a) 589824 bytes
(b) 576 bytes
4. Data bus is bidirectional, address is unidirectional.
5. PC (Program Counter)
6. ALU
7. Address, control and data
8. EAstands forExternalAccess.WhenEAis 0, itwill access the externalmemory.
9. ALE is being usedwhen the external accessmode is being activated, i.e.EA=0. If aROM
is being accessed, a read operation will be needed, so PSEN is used to activate the ROM
andALEis usedtoactivate the address latchinorder tolet the address get into theROM.
星期四, 2月 19, 2009
windows下的EXE文件大揭密
當我們安裝完Windows後,其中的文件到底是執行何種任務?某特定任務又由哪個文件來執行呢? 還有,從“開始”——“程序”——再點擊“我所要執行的任務”,這種套數還真有點繁瑣。 若是知道經常要執行的任務是哪個文件、位于何處?把它在桌面上建立一快捷方式,豈不省時 省力又方便!這就需要對Windows下的可執行文件明明白白。(注:若是以下所述的可執行文件 不在Windows安裝目錄下,可能是因為你沒有安裝,可到“控制面板”——“添加/刪除程序” ——“Windows安裝程序”,選取所要安裝的組件。
本文假設Windows98安裝在“C:\windows”下.
C:\Windows下的可執行文件
accstat.exe windows 輔助狀態指示器
arp.exe tcp/ip地址轉換協議命令
calc.exe 計算器應用軟件
cdplayer.exe cd播放器附件
cleanmgr.exe 磁盤清理程序
clipbrd.exe 剪貼板查看應用程序
command.com ms-dos方式
control.exe 控制面板應用程序
cvt1.exe fat32轉換器
defrag.exe 磁盤碎片整理應用程序
drvspace.exe 磁盤空間管理應用程序
dialer.exe 電話撥號程序
directcc.exe 直接電纜連接
explorer.exe 資源管理器
extrac32.exe windows cab 文件解壓縮應用程序
fontview.exe 字體查看程序
filexfer.exe microsoft文件傳輸應用程序
finger.exe 用于獲得來自于運行標准finger服務的任何系統的用戶信息
freecell.exe 空當接龍遊戲
grpconv.exe 程序組轉換器
hostname.exe 返回tcp/ip配置窗口的dns標題頭窗口中定義的計算機名字
ipconfig.exe 快速瀏覽系統tcp/ip配置應用程序
kodakprv.exe 映像預覽應用程序
mplayer.exe 媒體播放機
mshearts.exe 紅心大戰遊戲
nbtstat.exe 顯示tcp/ip上的netbios(netbt)的狀態
net.exe 一個非常全的網絡配置、顯示網絡信息的命令,有詳細幫助
netstat.exe 用于檢查所有tcp、ip以及udp連接的統計情況
netdde.exe windows 網絡dde(動態數據交換)
netwatch.exe 網絡監視器
notepad.exe 記事本應用程序
packager.exe 對象包裝應用程序
pbrush.exe 畫筆應用程序
ping.exe 檢測網絡遠端主機是否存在及判斷網絡是否正常的檢測工具
progman.exe windows3.x中的程序管理器
qfecheck.exe 更新信息工具
regedit.exe 注冊表編輯器
route.exe 用于管理本地tcp/ip路由表的應用程序
rsrcmtk.exe 顯示資源狀況
rundll32.exe 將dll作為應用程序運行
scandskw.exe 磁盤掃描應用程序
smartdrv.exe smartdrive(dos磁盤緩衝器)應用程序
sigverif.exe microsoft 簽字應用程序
sndrec32.exe 錄音機附件
sndvol32.exe 音量控制
sol.exe 紙牌遊戲
sysmon.exe 系統監視器
taskman.exe 任務執行欄應用程序
taskmon.exe 任務監視器應用程序
telnet.exe 虛擬終端程序
tftp.exe 小文件傳送協議,允許將文件傳送給tftp服務器
tracert.exe 決定用戶的系統與目標系統之間的路徑
tuneup.exe windows 調整向導
vcmui.exe 版本衝突管理器
wangimg.exe 映像應用程序
welcome.exe 歡迎光臨widows實用程序
winfile.exe windows3.x中的文件管理器
winhelp.exe 16位的windows 幫助程序
winhlp32.exe 32位的windows 幫助程序
wininit.exe windows 安裝初始化應用程序
winipcfg.exe tcp/ip 配置實用程序
winmine.exe 掃雷遊戲
winpopup.exe windows 彈出式消息實用程序
winver.exe 顯示windows 版本號
write.exe 寫字板附件
winrep.exe windows 報告工具
winalign.exe 排列本地文件應用程序
wupdmgr.exe windows 更新工具
本文假設Windows98安裝在“C:\windows”下.
C:\Windows下的可執行文件
accstat.exe windows 輔助狀態指示器
arp.exe tcp/ip地址轉換協議命令
calc.exe 計算器應用軟件
cdplayer.exe cd播放器附件
cleanmgr.exe 磁盤清理程序
clipbrd.exe 剪貼板查看應用程序
command.com ms-dos方式
control.exe 控制面板應用程序
cvt1.exe fat32轉換器
defrag.exe 磁盤碎片整理應用程序
drvspace.exe 磁盤空間管理應用程序
dialer.exe 電話撥號程序
directcc.exe 直接電纜連接
explorer.exe 資源管理器
extrac32.exe windows cab 文件解壓縮應用程序
fontview.exe 字體查看程序
filexfer.exe microsoft文件傳輸應用程序
finger.exe 用于獲得來自于運行標准finger服務的任何系統的用戶信息
freecell.exe 空當接龍遊戲
grpconv.exe 程序組轉換器
hostname.exe 返回tcp/ip配置窗口的dns標題頭窗口中定義的計算機名字
ipconfig.exe 快速瀏覽系統tcp/ip配置應用程序
kodakprv.exe 映像預覽應用程序
mplayer.exe 媒體播放機
mshearts.exe 紅心大戰遊戲
nbtstat.exe 顯示tcp/ip上的netbios(netbt)的狀態
net.exe 一個非常全的網絡配置、顯示網絡信息的命令,有詳細幫助
netstat.exe 用于檢查所有tcp、ip以及udp連接的統計情況
netdde.exe windows 網絡dde(動態數據交換)
netwatch.exe 網絡監視器
notepad.exe 記事本應用程序
packager.exe 對象包裝應用程序
pbrush.exe 畫筆應用程序
ping.exe 檢測網絡遠端主機是否存在及判斷網絡是否正常的檢測工具
progman.exe windows3.x中的程序管理器
qfecheck.exe 更新信息工具
regedit.exe 注冊表編輯器
route.exe 用于管理本地tcp/ip路由表的應用程序
rsrcmtk.exe 顯示資源狀況
rundll32.exe 將dll作為應用程序運行
scandskw.exe 磁盤掃描應用程序
smartdrv.exe smartdrive(dos磁盤緩衝器)應用程序
sigverif.exe microsoft 簽字應用程序
sndrec32.exe 錄音機附件
sndvol32.exe 音量控制
sol.exe 紙牌遊戲
sysmon.exe 系統監視器
taskman.exe 任務執行欄應用程序
taskmon.exe 任務監視器應用程序
telnet.exe 虛擬終端程序
tftp.exe 小文件傳送協議,允許將文件傳送給tftp服務器
tracert.exe 決定用戶的系統與目標系統之間的路徑
tuneup.exe windows 調整向導
vcmui.exe 版本衝突管理器
wangimg.exe 映像應用程序
welcome.exe 歡迎光臨widows實用程序
winfile.exe windows3.x中的文件管理器
winhelp.exe 16位的windows 幫助程序
winhlp32.exe 32位的windows 幫助程序
wininit.exe windows 安裝初始化應用程序
winipcfg.exe tcp/ip 配置實用程序
winmine.exe 掃雷遊戲
winpopup.exe windows 彈出式消息實用程序
winver.exe 顯示windows 版本號
write.exe 寫字板附件
winrep.exe windows 報告工具
winalign.exe 排列本地文件應用程序
wupdmgr.exe windows 更新工具
訂閱:
意見 (Atom)