實驗本身並不難,但是值得有兩個點我出現了錯誤:
;獲取格式為年/月/日 時:分:秒
assume cs:code,ds:data
data segment
db '00/00/00 00:00:00','$'
data ends
code segment
start: mov ax,data
mov ds,ax
mov si,0
;進行三次迴圈將數字放在data中,從9號記憶體開始
mov al,9
mov cx,3
s: call fun1
add si,3
dec al
loop s
mov al,4
mov cx,3
s1: call fun1
add si,3
sub al,2
loop s1
mov ah,2
mov bh,0
mov dh,5
mov dl,12
int 10h
mov ax,data
mov ds,ax
mov dx,0
mov ah,9
int 21h
mov ax,4c00h
int 21h
fun1: push ax
push cx
out 70h,al
in al,71h
mov ah,al
mov cl,4
shr ah,cl
and al,00001111b
add ah,30h
add al,30h
mov byte ptr ds:[si],ah
mov byte ptr ds:[si+1],al
pop cx
pop ax
retcode ends
end start
;一定要檢查好暫存器,cx搞錯搞死我乙個小時才找出
王爽 實驗7
搞懂這個題目的意思就花了我半天,只怪本人理解能力太差。題目意思 題目定義了21個 year summ ne 正好是16個位元組,與table中的相對應。首先我還納悶,1995放到4個位元組中還好說,可是5937000如何放到4個位元組中呢?5a9786h要如何放到4個位元組中呢?原來是這樣,00 5...
王爽彙編 實驗14讀取CMOS RAM時間資訊
assume cs codesg data segment db data ends stack segment dw 0,0 stack ends codesg segment start mov ax,data mov ds,ax mov si,0 mov ax,stack mov ss,ax ...
王爽 彙編實驗5
5 5 assume cs code a segment db 1,2,3,4,5,6,7,8 a ends b segment db 1,2,3,4,5,6,7,8 b ends c segment db 0,0,0,0,0,0,0,0 c ends code segment start mova...