Ping RAY RaY.asm modified


D

Dustin

Hi again Ray.

Here's the same Ray.asm program with slight modifications.

segment code

start:
mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,stacktop

mov dx,hello
mov ah,9
int 0x21

mov ah,0x3c
mov cx,0
mov dx,files
int 0x21

mov [filehnd],ax

mov ah,0x40
mov bx, [filehnd]
mov cx,msglength
mov dx,hello
int 0x21

mov ah,0x3e
mov bx,[filehnd]
int 0x21

mov ax,0x4c00
int 0x21

segment data

hello db 'Hi! Ray How did I get created Today?','$'
files db 'ray.txt', 0
filehnd db 2
msglength equ 0x24


segment stack stack
resb 64
stacktop:


It's essentially a slightly smaller executable. Smaller by 5 bytes, but
does exactly the same thing as the previous Ray.asm.

Can you tell me what I changed to save 5 bytes more and keep the same
functionality, Ray? [g]

This is one of the reasons why ASM is such an interesting language.



--
Things look bad from over here. Too much confusion and no solution.
Everyone here knows your fear. Your out of touch and you try too much.
Yesterdays glory will help us today. You wanna retire? Get outta the
way. I ain't got much time. Young ones close behind. I can't wait in
line.
 
Ad

Advertisements

H

Hot-Text

Dustin said:
Hi again Ray.

Here's the same Ray.asm program with slight modifications.

segment code

start:
mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,stacktop

mov dx,hello
mov ah,9
int 0x21

mov ah,0x3c
mov cx,0
mov dx,files
int 0x21

mov [filehnd],ax

mov ah,0x40
mov bx, [filehnd]
mov cx,msglength
mov dx,hello
int 0x21

mov ah,0x3e
mov bx,[filehnd]
int 0x21

mov ax,0x4c00
int 0x21

segment data

hello db 'Hi! Ray How did I get created Today?','$'
files db 'ray.txt', 0
filehnd db 2
msglength equ 0x24


segment stack stack
resb 64
stacktop:


It's essentially a slightly smaller executable. Smaller by 5 bytes, but
does exactly the same thing as the previous Ray.asm.

Can you tell me what I changed to save 5 bytes more and keep the same
functionality, Ray? [g]

This is one of the reasons why ASM is such an interesting language.
This MaxBox is designed for teaching..
< http://sourceforge.net/projects/maxbox/?source=directory >
it have big library of 220 examples and exercises.
 
D

Dustin

Dustin said:
Hi again Ray.

Here's the same Ray.asm program with slight modifications.

segment code

start:
mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,stacktop

mov dx,hello
mov ah,9
int 0x21

mov ah,0x3c
mov cx,0
mov dx,files
int 0x21

mov [filehnd],ax

mov ah,0x40
mov bx, [filehnd]
mov cx,msglength
mov dx,hello
int 0x21

mov ah,0x3e
mov bx,[filehnd]
int 0x21

mov ax,0x4c00
int 0x21

segment data

hello db 'Hi! Ray How did I get created Today?','$'
files db 'ray.txt', 0
filehnd db 2
msglength equ 0x24


segment stack stack
resb 64
stacktop:


It's essentially a slightly smaller executable. Smaller by 5 bytes,
but does exactly the same thing as the previous Ray.asm.

Can you tell me what I changed to save 5 bytes more and keep the
same functionality, Ray? [g]

This is one of the reasons why ASM is such an interesting language.
This MaxBox is designed for teaching..
And this has what to do with the source I posted?
< http://sourceforge.net/projects/maxbox/?source=directory >
it have big library of 220 examples and exercises.
You still won't find this there. I didn't rip it from anyplace.


--
Things look bad from over here. Too much confusion and no solution.
Everyone here knows your fear. Your out of touch and you try too much.
Yesterdays glory will help us today. You wanna retire? Get outta the
way. I ain't got much time. Young ones close behind. I can't wait in
line.
 
Ad

Advertisements

H

Hot-Text

\"Dustin said:
Dustin said:
Hi again Ray.

Here's the same Ray.asm program with slight modifications.

segment code

start:
mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,stacktop

mov dx,hello
mov ah,9
int 0x21

mov ah,0x3c
mov cx,0
mov dx,files
int 0x21

mov [filehnd],ax

mov ah,0x40
mov bx, [filehnd]
mov cx,msglength
mov dx,hello
int 0x21

mov ah,0x3e
mov bx,[filehnd]
int 0x21

mov ax,0x4c00
int 0x21

segment data

hello db 'Hi! Ray How did I get created Today?','$'
files db 'ray.txt', 0
filehnd db 2
msglength equ 0x24


segment stack stack
resb 64
stacktop:


It's essentially a slightly smaller executable. Smaller by 5 bytes,
but does exactly the same thing as the previous Ray.asm.

Can you tell me what I changed to save 5 bytes more and keep the
same functionality, Ray? [g]

This is one of the reasons why ASM is such an interesting language.
This MaxBox is designed for teaching..
And this has what to do with the source I posted?
< http://sourceforge.net/projects/maxbox/?source=directory >
it have big library of 220 examples and exercises.
You still won't find this there. I didn't rip it from anyplace.
To pass you up is why I post it for.....

and he will find more there then you give.

regs.x.ax = 0x2701; int86x(0x2F, &regs, &regs, &sregs);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

No ping in, no ping out 2
Ping attack???? 7
PING Art 1
ping victek 2
Ping Ant 16
Ping: forged emails 1
What is it with theese PINGS??? 10
FYI: dg MSRPC Ping 0

Top