Hello,
the only strange thing that I see is that you jump to spot, even though it arrives there anyway, so at spot, this code will have only have run once.
You probably mean something like:
main PROC
mov si,videoSeg ;set DS to video segment
mov ds,si...
Hi,
to place it back, you do exactly the same, set DS:SI to the source, ES:DI to the target, cx to the number of words, and then repsw. Since you want to place it back now, the source is the buffer, and the target is the screen.
Wouter Dijkslag
http://www.wody.demon.nl
Hi,
http://msdn.microsoft.com
You can get the platform SDK at
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/default.htm
Wouter Dijkslag
http://www.wody.demon.nl
Hello,
Your code is a mess and doesn't work, so I wrote a program that seems to do what you want:
CODE SEGMENT
ASSUME CS:CODE,DS:CODE,ES:CODE
ORG 0100H
START:
MOV SI,82h ; copy from here (DS)
MOV DI,OFFSET NAME1 ; store it here (ES)
CMP BYTE PTR [SI-2],0 ; Any characters on...
Hello,
you are writing a DOS .COM file but those only consist of one segment. Move the data in the data segment below the last code, and remove the .data, and everything works fine.
Wouter Dijkslag
http://www.wody.demon.nl
Hello,
You are trying to write a DOS program in a Windows-only environment. Write a windows-program, and everything will work fine.
With Masm32, one thing you have to pay attention to is to make your project in a directory below the masm32 directory (for instance C:\MASM32\HELLO).
Also, read...
Hello,
Try reading the Art of Assembly Language from http://webster.cs.ucr.edu/
I prefer the 16 bit edition, because I started a long time ago, but these days maybe the 32 bit edition may be better for beginners. Anyway, they are both there, enjoy.
Wouter Dijkslag
http://www.wody.demon.nl
Hello,
What you are probably doing is something like
add ax,bx and then add ax,'0' to make it a number. If ax contains 10, then you will get the character :
So, what you have to do is make sure that AX contains less then 10 before adding the '0'.
Wouter Dijkslag
http://www.wody.demon.nl
Hello,
Yes, you can use MASM. There even is a free package you can download which has all you need. For more information, start at http://win32asm.cjb.net
The package you want is MASM32 from http://www.movsd.com/
Greetings, Wouter Dijkslag
http://www.wody.demon.nl
Hello,
You receive the no stack warning because this is a COM program, not an EXE program. A COM program has no stack-information in itself, it is set up by the operating-system (after which you can change it, if you want off course, but that is not the purpos). You have to use EXE2BIN or...
Hello,
Since Windows XP does not support DOS and DOS applications (although they may run), and Clipper and Clipper-compiled applications are DOS-programs, the official answer will always be that no, you can never make it run. If it does, it's a fluke, and you can be sure this will be fixed...
Hello,
Refer to section 5.2 of the documentation why it doesn't work. Specifically, you are using the BIN output format and not using the OBJ file format. When you use the BIN format, you would get something lke
;- hello.asm - (Nasm BIN DOS com file) --- cut here
SECTION .text
org 0x100...
Hello,
Yes, art of assembly language is a good book, but books are personal. Some people can't understand one book but can read others. I never used the 32-bit version myself, since I believe it doesn't teach assembly language at all, but rather programming. The 16 bit is better, but this is my...
Hi,
Nasmw is the same as nasm, only nasmw is a Windows program.
Example that uses segments:
;- hello.asm - (DOS exe file) --- cut here
SECTION CODE
..start:
mov ax,DATA
mov ds,ax
mov ah,9
mov dx,text
int 21h
mov ax,4c00h...
Hello,
The 16-bit AX register contains two 8-bit registers, AH and AL.
By saying 'mov ax, 0x13' you are actually saying 'mox ax,0x0013' which means 'mov ah,0x00', 'mov al,0x13'.
So, you are doing it twice.
The code you write is supposed to be 'mov ah,0x00', 'mov al,0x13', or 'mov ax,0x13'...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.