assume cs:code,ds:data,ss:stack
stack segment
db 128 dup (0)
stack ends
data segment
db 256 dup (0)
data ends
code segment
start:
mov ax,stack
mov ss,ax
mov sp,128
call copy_Boot
call save_old_int9
mov bx,0
push bx
mov bx,7e00h
push bx
retf
mov ax,4c00h
int 21h
;-----------------------------
Boot:
jmp Boot_start
;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
option1 db '(1) reset pc',0
option2 db '(2) start system',0
option3 db '(3) clock',0
option4 db '(4) set clock',0
address_option dw offset option1 - offset Boot + 7e00h
dw offset option2 - offset Boot + 7e00h
dw offset option3 - offset Boot + 7e00h
dw offset option4 - offset Boot + 7e00h
timestyle db '00/00/00 00:00:00',0
timeadress db 9,8,7,4,2,0
string_stack db 12 dup ('0'),0
;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Boot_start:
call init_reg
call show_option
jmp short choose_option
mov ax,4c00h
int 21h
;-----------------------
choose_option:
call clear_buff
mov ah,0
int 16h
cmp al,'1'
je choose1
cmp al,'2'
je choose2
cmp al,'3'
je choose3
cmp al,'4'
je choose4
jmp ch
王爽《汇编语言》课程设计2(不涉及软盘版本)
最新推荐文章于 2021-10-12 17:42:11 发布
该博客介绍了使用汇编语言实现BIOS中断,包括时钟显示、选项选择等功能。通过设置中断处理程序,展示了如何在屏幕上显示时间,并提供了字符串处理和键盘输入的代码示例。
摘要由CSDN通过智能技术生成