Re: I have a problem with my study
- From: Dirk Wolfgang Glomp <spamtrap@xxxxxxxxxx>
- Date: Thu, 19 Oct 2006 20:37:53 +0200
spamtrap@xxxxxxxxxx schrieb:
I read a program,but some of my program confuse me
what are these "push ds
Push DS on the stack.
Oh where is your stack?
sub ax,ax
Clear AX.
push ax "
Push the (empty) AX on the stack.
...
I don´t know why these both pushes are using.
prognam segment
main proc far
assume cs rognam
rognam?
start:
push ds
sub ax,ax
push ax
mov ch,4
rotate: mov cl,4
rol bx,cl
mov al,bl
and al,0fh
add al,30h
cmp al,3ah
jl printit
add al,7h
printit:
mov dl,al
mov ah,2
int 21h
See Ralf Browns Interrupt List(RBIL).
http://www.pobox.com/~ralf
http://www.pobox.com/~ralf/files.html
ftp://ftp.cs.cmu.edu/afs/cs.cmu.edu/user/ralf/pub/
RBIL->inter61b.zip->Interrup.f:
--------D-2102-------------------------------
INT 21 - DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT
AH = 02h
DL = character to write
Return: AL = last character output (despite the official docs which state
nothing is returned) (at least DOS 2.1-7.0)
Notes: ^C/^Break are checked, and INT 23 executed if pressed
standard output is always the screen under DOS 1.x, but may be
redirected under DOS 2+
the last character output will be the character in DL unless DL=09h
on entry, in which case AL=20h as tabs are expanded to blanks
if standard output is redirected to a file, no error checks (write-
protected, full media, etc.) are performed
SeeAlso: AH=06h,AH=09h
-------------------------------------------------
Dirk
.
- References:
- I have a problem with my study
- From: spamtrap
- I have a problem with my study
- Prev by Date: I have a problem with my study
- Next by Date: Re: I have a problem with my study
- Previous by thread: I have a problem with my study
- Next by thread: Re: I have a problem with my study
- Index(es):
Relevant Pages
|