提交 4171ea7f 创建 作者: 赵鹏翀's avatar 赵鹏翀

init template

上级
/*.img
/bochs
/Debug
/Release
bochsout.txt
\ No newline at end of file
<?xml version="1.0" encoding="gb2312"?>
<ASMProject Version="1.00" Name="Demo033">
<Configurations>
<Configuration Name="Debug" ConfigurationType="2">
<Tool Name="PreBuildEventTool"/>
<Tool Name="CustomBuildTool"/>
<Tool Name="GCCCompilerTool"/>
<Tool Name="JWASMAssemblerTool" ObjectFormate="5" GenerateDebugInformation="-1" VersionDebugInfo="-1" AdditionalOptions="/W0"/>
<Tool Name="PreLinkEventTool"/>
<Tool Name="GCCLinkerTool"/>
<Tool Name="JWlinkLinkerTool" AdditionalOptions="disable 1014"/>
<Tool Name="PostBuildEventTool"/>
</Configuration>
</Configurations>
<Files>
<Filter Name="Դļ" Filter="asm">
<File RelativePath=".\main.asm">
</File>
</Filter>
</Files>
</ASMProject>
添加文件
assume cs:codesg,ss:data
data segment
db 'word', 0
db 'unix', 0
db 'wind', 0
db 'good', 0
data ends
codesg segment
start: ;将字符串全部转化为大写
mov ax, data
mov ds, ax
mov bx, 0
mov cx, 4 ;循环4次
s: mov si, bx
call capital
add bx, 5
loop s
mov ax, 4c00h
int 21h
capital: ;错误的演示
mov cl, [si]
mov ch, 0
jcxz ok
and byte ptr [si], 11011111b
inc si
jmp short capital
ok:
ret
;capital: ;修改后正确的演示
;push cx
;push si
;change:
;mov cl, [si]
;mov ch, 0
;jcxz ok
;and byte ptr [si], 11011111b
;inc si
;jmp short change
;ok:
;pop si
;pop cx
;ret
codesg ends
end start
\ No newline at end of file
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论