Skip to content

Commit 1b80343

Browse files
committed
-first
0 parents  commit 1b80343

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2663
-0
lines changed

.t1.asm.un~

9.29 KB
Binary file not shown.

.t2.asm.un~

15 KB
Binary file not shown.

.t2.un~

8.23 KB
Binary file not shown.

.t3.asm.un~

25.9 KB
Binary file not shown.

.t4.asm.un~

14.1 KB
Binary file not shown.

ASM.rar

1.38 MB
Binary file not shown.

C13-1.EXE

865 Bytes
Binary file not shown.

C13-1.OBJ

252 Bytes
Binary file not shown.

C19-5.EXE

891 Bytes
Binary file not shown.

C19-5.OBJ

313 Bytes
Binary file not shown.

CH10-5.EXE

574 Bytes
Binary file not shown.

CH10-5.OBJ

168 Bytes
Binary file not shown.

EX10.EXE

744 Bytes
Binary file not shown.

EX10.OBJ

235 Bytes
Binary file not shown.

EX15.EXE

913 Bytes
Binary file not shown.

EX15.OBJ

313 Bytes
Binary file not shown.

EX6.EXE

656 Bytes
Binary file not shown.

EX6.OBJ

263 Bytes
Binary file not shown.

EX7.EXE

1.26 KB
Binary file not shown.

EX7.OBJ

484 Bytes
Binary file not shown.

K1-0.EXE

1.6 KB
Binary file not shown.

K1-0.OBJ

955 Bytes
Binary file not shown.

K1-1.EXE

1.46 KB
Binary file not shown.

K1-1.OBJ

754 Bytes
Binary file not shown.

K1.EXE

717 Bytes
Binary file not shown.

K1.OBJ

198 Bytes
Binary file not shown.

LINK.EXE

63.5 KB
Binary file not shown.

MASM.EXE

101 KB
Binary file not shown.

R1.EXE

780 Bytes
Binary file not shown.

R1.OBJ

300 Bytes
Binary file not shown.

R18-4.EXE

872 Bytes
Binary file not shown.

R18-4.OBJ

266 Bytes
Binary file not shown.

R2.EXE

706 Bytes
Binary file not shown.

R20-4.EXE

935 Bytes
Binary file not shown.

R20-4.OBJ

336 Bytes
Binary file not shown.

R22-2.EXE

834 Bytes
Binary file not shown.

R22-2.OBJ

207 Bytes
Binary file not shown.

R22-3.EXE

49.6 KB
Binary file not shown.

R22-3.OBJ

342 Bytes
Binary file not shown.

R22-6.EXE

1.03 KB
Binary file not shown.

R22-6.OBJ

466 Bytes
Binary file not shown.

SNAKE.EXE

1.48 KB
Binary file not shown.

SNAKE.OBJ

894 Bytes
Binary file not shown.

SS.EXE

900 Bytes
Binary file not shown.

SS.OBJ

316 Bytes
Binary file not shown.

T1.EXE

543 Bytes
Binary file not shown.

T1.OBJ

81 Bytes
Binary file not shown.

T2.EXE

601 Bytes
Binary file not shown.

T2.OBJ

200 Bytes
Binary file not shown.

T3.EXE

596 Bytes
Binary file not shown.

T3.OBJ

197 Bytes
Binary file not shown.

T4.EXE

590 Bytes
Binary file not shown.

T4.OBJ

185 Bytes
Binary file not shown.

c13-1.asm

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
assume cs:code,ds:data,ss:stack
2+
3+
data segment
4+
5+
db 128 dup(0)
6+
7+
data ends
8+
9+
stack segment stack
10+
11+
db 128 dup(0)
12+
13+
stack ends
14+
15+
code segment
16+
17+
start: mov ax,stack
18+
mov ss,ax
19+
mov sp,128;initial stack
20+
21+
call cpy_new_int0
22+
call set_new_int0
23+
24+
int 0
25+
26+
mov ax,4c00h
27+
int 21h
28+
;=============change the int 0 cs:ip================
29+
set_new_int0:
30+
31+
mov bx,0
32+
mov es,bx
33+
34+
cli
35+
mov word ptr es:[0*4],7e00h
36+
mov word ptr es:[0*4+2],0
37+
sti
38+
ret
39+
;===================keyboard interupt===============
40+
new_int0:
41+
push bx
42+
push cx
43+
push dx
44+
push es
45+
46+
mov bx,0b800h
47+
mov es,bx
48+
49+
mov bx,0
50+
mov cx,2000
51+
mov dl,'!'
52+
53+
show_asc: mov es:[bx],dl
54+
add bx,2
55+
loop show_asc
56+
57+
pop es
58+
pop dx
59+
pop cx
60+
pop bx
61+
iret
62+
63+
new_int0_end: nop
64+
65+
;===============modified int 0===================
66+
cpy_new_int0:
67+
mov bx,cs
68+
mov ds,bx
69+
mov si,offset new_int0;set source
70+
71+
mov bx,0
72+
mov es,bx
73+
mov di,7e00h;set determination--which can save code securily
74+
75+
mov cx,offset new_int0_end - new_int0
76+
cld
77+
rep movsb;cpy the code
78+
79+
ret
80+
81+
;==================================
82+
show_char:
83+
ret
84+
85+
code ends
86+
87+
end start

c19-5.asm

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
assume cs:code,ss:stack,ds:data
2+
3+
data segment
4+
db 128 dup(0)
5+
data ends
6+
7+
stack segment
8+
db 128 dup(0)
9+
stack ends
10+
11+
code segment
12+
13+
start:
14+
mov ax,stack
15+
mov ss,ax
16+
mov sp,128
17+
18+
call clean_screen
19+
20+
call init_reg
21+
time:
22+
mov al,9; 读取年
23+
mov di,160*10 + 25*2
24+
call show
25+
mov al,8; 读取月
26+
mov di,160*10 + 28*2
27+
call show
28+
mov al,7; 读取日
29+
mov di,160*10 + 31*2
30+
call show
31+
mov al,4; 读取时
32+
mov di,160*10 + 34*2
33+
call show
34+
mov al,2; 读取分
35+
mov di,160*10 + 37*2
36+
call show
37+
mov al,0; 读取秒
38+
mov di,160*10 + 40*2
39+
call show
40+
jmp time
41+
42+
mov ax,4c00h
43+
int 21h
44+
;================================
45+
clean_screen:
46+
mov bx,0B800H;
47+
mov es,bx
48+
mov bx,0
49+
50+
mov dx,0700H ;空字符串
51+
mov cx,2000
52+
53+
54+
clearScreen: mov es:[bx],dx
55+
add bx,2
56+
57+
loop clearScreen
58+
59+
ret
60+
61+
;=================================
62+
init_reg:
63+
mov bx,0b800h
64+
mov es,bx
65+
66+
ret
67+
68+
;=================================
69+
show:
70+
out 70h,al
71+
in al,71h
72+
73+
mov ah,al
74+
mov cl,4
75+
shr ah,cl
76+
and al,00001111b
77+
78+
add ah,30h
79+
add al,30h
80+
81+
mov es:[di],ah
82+
mov es:[di+2],al
83+
84+
ret
85+
86+
code ends
87+
88+
end start
89+

ch10-5.asm

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
assume cs:code
2+
3+
data segment
4+
dw 0,0,0,0
5+
dw 0,0,0,0
6+
data ends
7+
8+
code segment
9+
start: mov ax,data
10+
mov ss,ax
11+
mov sp,16
12+
13+
mov word ptr ss:[0],OFFSET s
14+
mov ss:[2],cs
15+
16+
call dword ptr ss:[0]
17+
18+
s1: nop
19+
s: mov ax,OFFSET s
20+
sub ax,ss:[0CH]
21+
22+
mov bx,cs
23+
sub bx,ss:[0EH]
24+
25+
mov ax,4C00H
26+
int 21H
27+
code ends
28+
29+
end start

debug.exe

20.2 KB
Binary file not shown.

ex10.asm

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
assume cs:code,ds:data,ss:stack
2+
3+
;编程:在屏幕中间分别显示 绿色、绿底红色、白底蓝色的字符串‘welcome to masm!’
4+
data segment
5+
;0123456789ABCDEF
6+
db 'welcome to masm!'
7+
;0000 0000
8+
; rgb rgb
9+
db 00000010B
10+
db 00100100B
11+
db 01110001B
12+
data ends
13+
14+
stack segment stack
15+
db 128 dup(0)
16+
stack ends
17+
18+
code segment
19+
20+
start:
21+
mov ax,stack ;设置栈段
22+
mov ss,ax
23+
mov sp,128
24+
25+
call setup
26+
27+
call setShow
28+
29+
mov ax,4C00H
30+
int 21H
31+
32+
;====================================================
33+
34+
setup:
35+
mov ax,data ;设置数据段
36+
mov ds,ax
37+
38+
mov ax,0B800H
39+
mov es,ax ;设置显示段
40+
41+
ret
42+
;====================================================
43+
44+
setShow: mov cx,3 ;循环行
45+
46+
mov bx,16;指向颜色
47+
mov di,160*10+30*2 ;显示字符的位置
48+
mov si,0 ;读取字符
49+
50+
showline: push cx
51+
push di
52+
push si
53+
mov ah,ds:[bx]
54+
mov cx,16
55+
56+
showNumber:
57+
58+
mov al,ds:[si]
59+
60+
61+
mov es:[di],ax
62+
63+
inc si
64+
add di,2
65+
66+
loop showNumber
67+
68+
inc bx;换颜色
69+
pop si ;字符读取开头
70+
pop di
71+
add di,160 ;换行
72+
pop cx
73+
74+
loop showline
75+
76+
ret
77+
78+
code ends
79+
80+
end start

0 commit comments

Comments
 (0)