![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-14 23:47 |
47,812 topics / 349,917 posts / today 0 new / 48,268 members |
| DOS开发编程 & 发展交流 (开发室) » Assembly language compiler usage 2 |
| Printable Version 2,513 / 10 |
| Floor1 chrise | Posted 2010-04-06 21:33 |
| 初级用户 Posts 32 Credits 88 | |
|
The title is to transfer the data in buff1 to buff2. The source program is as follows:
DSEG SEGMENT buff1 db 0,1,2,3,4,5,6,7,8,9, db 11,12,13,14,15,16,17,18,19,20 buff2 db 20 dup(?) DSEG ENDS CSEG SEGMENT assume cs:CSEG, ds:DSEG MAIN PROC FAR ;Main program entry mov ax, dseg mov ds, ax mov ax,eseg mov es, ax mov cx,20 lea si,buff1 lea di,buff2 cycle:mov al, mov ,al inc si inc di loop cycle mov ax, 4c00h ;Program ends, return to the operating system int 21h MAIN ENDP CSEG ENDS END MAIN After compilation The following error occurs Unable to open input file: transformdata.asmExperts, please give guidance |
|
| Floor2 070 | Posted 2010-04-07 11:59 |
| 高级用户 Posts 218 Credits 663 From 福建 | |
|
The English means: Cannot open input file: transformdata.asm
|
|
| Floor3 070 | Posted 2010-04-07 12:17 |
| 高级用户 Posts 218 Credits 663 From 福建 | |
|
I used MASM 5.0 to compile, and it prompted a.asm(2): warning A4101: Missing data; zero assumed
And where is eseg in the 18th line of the code.. mov ax,eseg? |
|
| Floor4 chrise | Posted 2010-04-07 20:56 |
| 初级用户 Posts 32 Credits 88 | |
|
Is this format correct? I wrote it like this because it's like that in the book, and when entering tables, it's also written like that in the book. Is it that some versions of MASM don't support it?
|
|
| Floor5 本是 | Posted 2010-04-08 09:12 |
| 银牌会员 Posts 790 Credits 2,227 | |
|
As pointed out by building 3, there are 2 errors. Correspondingly, remove the comma at the end of line buff1 and change eseg to dseg. "Cannot open input file: transformdata.asm" indicates that the filename of your source program should not be transformdata.asm, that is, rename it to transformdata.asm, and it will be okay.
|
|
| Floor6 070 | Posted 2010-04-08 12:12 |
| 高级用户 Posts 218 Credits 663 From 福建 | |
|
The original error was at the end, the problem... I didn't notice this.
|
|
| Floor7 chrise | Posted 2010-04-08 21:46 |
| 初级用户 Posts 32 Credits 88 | |
|
Many thanks
|
|
| Floor8 heikebx | Posted 2010-04-20 20:50 |
| 新手上路 Posts 5 Credits 10 | |
| Floor9 chrise | Posted 2010-04-24 22:02 |
| 初级用户 Posts 32 Credits 88 | |
|
Are you also learning assembly?
|
|
| Floor10 070 | Posted 2010-04-25 11:27 |
| 高级用户 Posts 218 Credits 663 From 福建 | |
|
chrise, why are there no new questions recently... I'm not used to it.
|
|
| Floor11 netwinxp | Posted 2010-06-30 16:01 |
| 高级用户 Posts 366 Credits 741 | |
|
Will it be better to write like this? Moreover, it is not easy to have problems when modifying the data.
[ Last edited by netwinxp on 2010-7-6 at 19:39 ] |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |