China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-24 01:51
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Original] First Attempt at Drawing Graphics with debug View 3,332 Replies 17
Original Poster Posted 2009-07-11 08:10 ·  中国 北京 海淀区 联通
银牌会员
★★★
Credits 2,098
Posts 566
Joined 2007-09-11 07:27
18-year member
UID 97070
Gender Male
Status Offline
```@more /e +1 "%~f0"|debug>nul&goto:eof
a100
mov al,12
int 10 ;Graphic, 640 * 480, 16
mov ah,c ;Function number to write pixels, default bx=0, which is page number
mov dx,1e1 ;Initial value: row number
mov al,10 ;Initial value: pixel color value (0 - f)
dec dx ;--------10b
test al,al
jnz 112
mov al,10 ;Color cycle
dec al ;--------112
mov cx,280 ;Initial value: column number
int 10 ;--------117
loop 117
test dx,dx
jnz 10b
int 20

g
q
```
Recent Ratings for This Post ( 4 in total) Click for details
RaterScoreTime
moniuming +15 2009-07-11 08:54
yishanju +15 2009-07-11 11:11
zh159 +10 2009-07-12 22:18
523066680 +15 2009-07-13 21:21
Floor 2 Posted 2009-07-11 08:54 ·  中国 广东 东莞 电信
银牌会员
★★★
永远的菜鸟
Credits 1,335
Posts 574
Joined 2007-11-27 12:50
18-year member
UID 103929
Gender Male
From 广西
Status Offline
It's too powerful for me, add points for encouragement!!!
Floor 3 Posted 2009-07-11 11:11 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
I can't understand, so add points

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 4 Posted 2009-07-12 22:18 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
Floor 5 Posted 2009-07-13 10:51 ·  中国 广东 深圳 电信
初级用户
Credits 30
Posts 18
Joined 2008-05-11 01:43
18-year member
UID 118377
Gender Male
Status Offline
Really admire it. Just a small question, where did you learn all these knowledge? If I also want to learn this debug, how should I study?
Floor 6 Posted 2009-07-13 11:34 ·  中国 北京 海淀区 联通
银牌会员
★★★
Credits 2,098
Posts 566
Joined 2007-09-11 07:27
18-year member
UID 97070
Gender Male
Status Offline
Originally posted by heheguai at 2009-7-13 10:51 AM:
Really admire, just a small question, where did you learn these knowledge? If I also want to learn this debug, how should I learn?

Read books on 8086 assembly
Floor 7 Posted 2009-07-13 12:46 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
"Programming in 32-bit Assembly Language under Windows Environment (2nd Edition) by Luo Yunbin" Complete High-Definition PDF Edition.pdf
I read the beginning a bit, it's good. Recommendation

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 8 Posted 2009-07-13 21:21 ·  中国 广东 揭阳 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
Fortunately, I was able to get online today! I didn't miss out on something good.
It seems like I can write special effects now!
Floor 9 Posted 2009-07-13 21:41 ·  中国 广东 揭阳 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
s11ss Can you explain the operations in this regard in detail?
Because the number systems are different, it's more difficult for students who haven't been exposed to this to understand.

Just messed around a bit earlier, only feeling that the column numbering is - the number of columns, and the row numbering is - the number of rows


@more /e +1 "%~f0"|debug>nul&goto:eof
a100
mov al,12
int 10 ;Graphics, 640 * 480, 16
mov ah,c ;Function number to write pixels, default bx=0, that is, page number
mov dx,150 ;Initial value: row number (Determines how many rows)
mov al,10 ;Initial value: pixel color value (0 - f)
dec dx ;--------10b
test al,al
jnz 112
mov al,05 ;Color cycle (Changed randomly to 05 here)
dec al ;--------112
mov cx,100 ;Initial value: column number (Determines how many columns)
int 10 ;--------117
loop 117
test dx,dx
jnz 10b
int 20

g
q



Also messed around a bit, changed the subsequent loop 117 to 101, and then it became a small dot that kept flashing until the end

[ Last edited by 523066680 on 2009-7-13 at 21:46 ]
Floor 10 Posted 2009-07-14 01:26 ·  中国 北京 海淀区 联通
银牌会员
★★★
Credits 2,098
Posts 566
Joined 2007-09-11 07:27
18-year member
UID 97070
Gender Male
Status Offline
s11ss Can you explain the operations in this regard in detail?


1. First set the graphics mode
2. Write pixels
(1) Write row by row from bottom to top, exit when the row number = 0
(2) For each row, write column by column from right to left
(3) For each row, the pixel colors are the same; different rows have different colors, cycling from f to 0. (For which value corresponds to what color, please check color /?)
Floor 11 Posted 2009-07-14 12:07 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
Friend's written VGA graphics mode access (hint version) (1) http://huangxiangkui.spaces.live.com/blog/cns!1A2CBFE8EE1DCCA3!126.entry

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 12 Posted 2009-07-14 12:48 ·  中国 北京 中电华通通信有限公司
中级用户
★★
Credits 216
Posts 129
Joined 2007-02-14 07:26
19-year member
UID 79469
Gender Male
Status Offline
The debug has been deleted by me. Unfortunately, it can't run.
Floor 13 Posted 2009-07-27 04:08 ·  中国 山东 威海 联通
初级用户
Credits 63
Posts 32
Joined 2007-12-21 20:57
18-year member
UID 106402
Gender Male
Status Offline
Now I have motivation to learn assembly!
Floor 14 Posted 2009-07-27 04:09 ·  中国 山东 威海 联通
初级用户
Credits 63
Posts 32
Joined 2007-12-21 20:57
18-year member
UID 106402
Gender Male
Status Offline
Floor 15 Posted 2009-07-31 07:04 ·  中国 北京 联通
银牌会员
★★★
Credits 2,098
Posts 566
Joined 2007-09-11 07:27
18-year member
UID 97070
Gender Male
Status Offline
Does it support paragraph breaking?
?
Forum Jump: