我有汇编代码,我想将它实现到 C 程序中。我一直在使用 masm 来使我的汇编代码正常工作,并且我正在使用 gcc 来编译 C 代码。
我在 Windows XP 中使用 NetBeans。
我想让命令提示符进入全屏,然后画一条线,就像这样:
.model small
.stack
.code
main proc far
mov ax,@data
mov DS,ax
mov ah,00h
mov al,12h
int 10h
mov ah,02h
mov dh,14
mov dl,37
int 10h
mov di,65
mov ah,0ch
mov bh,00h
mov al,09h
mov Cx,290
mov dx,200
arriba: int 10h
inc cx
dec di
Jnz arriba
mov di,65
mov ah,08h
int 21h
mov ax,4c00h
int 21h
main endp
end main
如果我使用 masm,该代码可以工作,但我不知道如何让它在我的 C 程序中工作...提前致谢!
最佳答案
您不能将 DOS 中断与 Windows API 混合使用。您可能需要使用 DirectX 的 full screen mode相反。
关于c - C程序中的汇编代码(为masm编写)(用gcc编译)......怎么样?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8378358/