如何在程序集8086中创建位图 [英] how to create a bitmap in assembly 8086

查看:73
本文介绍了如何在程序集8086中创建位图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个作业需要创建一个从屏幕一端到另一端的人.我知道您可以更改像素的颜色(所以我所做的就是使用如下所示的指令将默认的黑色像素更改为红色像素)

i have an assignment where I need to create a person walking from one end of a screen to the other. I know you can change the colour of pixels ( som simply all I have been doing is changing the default black pixel to a red pixel using istructions such as below)

01  mov al,03h
02  mov ah,0
03  int 10h
04  mov al,1100b
05
06  mov cx,50
07  mov dx,20
08
09  mov ah,0Ch
10  int 10h



已经知道这将非常繁琐,因为当该人移动时,我将不得不完全改变其先前的位置,然后在另一个位置(逐个像素)重新绘制(稍加修改以使其看起来像他在跑步).我们的教练说ti可以使用位图,但没有解释如何使用.我想知道是否有人可以向我解释如何使用but按钮,或者为此指向我一个好的教程.

PS以及我使用的是Windows XP SP1,每次我编译带有exe视频中断的obj文件并尝试运行它时,它都无法正常工作,只是向我显示黑屏或一秒钟而死.我使用emu8086(一个可用于8086处理器的仿真器)并且可以工作,我想知道是否有可能使这16个程序使用Windows XP而不是Windows 98或我来运行.



have learned this will be very tedious because when the person moves I will have to change its previous location completly black and redraw (slightly modified to make him look like he is running) in another location, pixel by pixel. Our instructor has said ti is possible to use a bit map but did not explain how. I was wondering if someone can explain to me how to use a but map or point me to a good tutorial for this.

ps as well I am using windows xp sp1 and every time I compile an obj file with video interrupts to a exe and try to run it it does not work, simply shows me a black screen or one second and dies. I use emu8086, an emulator for 8086 processors and works, I was wondering if it is possible to make these 16 but programs to work using windows xp and not reverting to windows 98 or me.

推荐答案

搜索"sprite图形": http://nondot.org/sabre/graphpro/sprite2.html [ ^ ]
Search for "sprite graphics" : http://nondot.org/sabre/graphpro/sprite2.html[^]


这篇关于如何在程序集8086中创建位图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆