Computing.Net > Forums > Programming > attn: dtech10 ; oneline.com

attn: dtech10 ; oneline.com

Reply to Message Icon

Original Message
Name: Mechanix2Go
Date: November 25, 2005 at 12:23:54 Pacific
Subject: attn: dtech10 ; oneline.com
OS: w2k sp3
CPU/Ram: PIII 933/256MB
Comment:

A while ago dtech10 posted a script to make oneline.com, which I made and would have sworn it worked.

Now I'm getting the first char stripped.

Like this:

C:\temp\->oneline 123456
23456
C:\temp\->

I think I'm losing my marbles.

Here's the script:

###
N ONELINE.COM
A 100
MOV AH,2
MOV SI,82
MOV,DL,[SI]
CMP DL,D
JZ 113
MOV AH,2
INT 21
INC SI
JMP 105
MOV AH,4C
INT 21

R CX
17
W
Q
###


If at first you don't succeed, you're about average.

M2


Report Offensive Message For Removal


Response Number 1
Name: dtech10
Date: November 25, 2005 at 13:37:02 Pacific
Reply: (edit)

Hi Mechanix

The Syntax is correct.
It works ok with my WinXP.
Do'es it produce the same from a batch file.
ie

oneline 123456 > File.txt
echo 789 >> File.txt

File.txt should now contain the line
123456789 on one line.
If ok maybe it's something to do with your
environment Prompt variable.



Report Offensive Follow Up For Removal

Response Number 2
Name: Mechanix2Go
Date: November 25, 2005 at 14:09:28 Pacific
Reply: (edit)

Hi d10,

My file.txt contains:

23456789

!!!

and my prompt is:

C:\temp\->echo %PROMPT%
$P$G

Any ideas?

TIA



If at first you don't succeed, you're about average.

M2


Report Offensive Follow Up For Removal

Response Number 3
Name: Mechanix2Go
Date: November 25, 2005 at 14:23:52 Pacific
Reply: (edit)

Hi d10,

I single stepped through to the first INT 21. Now I'm really mystified.

-p

AX=0200 BX=0000 CX=0017 DX=0000 SP=FFFE BP=0000 SI=0000 DI=0000
DS=149E ES=149E SS=149E CS=149E IP=0102 NV UP EI PL NZ NA PO NC
149E:0102 BE8200 MOV SI,0082
-p

AX=0200 BX=0000 CX=0017 DX=0000 SP=FFFE BP=0000 SI=0082 DI=0000
DS=149E ES=149E SS=149E CS=149E IP=0105 NV UP EI PL NZ NA PO NC
149E:0105 8A14 MOV DL,[SI] DS:0082=31
-p

AX=0200 BX=0000 CX=0017 DX=0031 SP=FFFE BP=0000 SI=0082 DI=0000
DS=149E ES=149E SS=149E CS=149E IP=0107 NV UP EI PL NZ NA PO NC
149E:0107 80FA0D CMP DL,0D
-p

AX=0200 BX=0000 CX=0017 DX=0031 SP=FFFE BP=0000 SI=0082 DI=0000
DS=149E ES=149E SS=149E CS=149E IP=010A NV UP EI PL NZ AC PE NC
149E:010A 7407 JZ 0113
-p

AX=0200 BX=0000 CX=0017 DX=0031 SP=FFFE BP=0000 SI=0082 DI=0000
DS=149E ES=149E SS=149E CS=149E IP=010C NV UP EI PL NZ AC PE NC
149E:010C B402 MOV AH,02
-p

AX=0200 BX=0000 CX=0017 DX=0031 SP=FFFE BP=0000 SI=0082 DI=0000
DS=149E ES=149E SS=149E CS=149E IP=010E NV UP EI PL NZ AC PE NC
149E:010E CD21 INT 21
-p
1
AX=0231 BX=0000 CX=0017 DX=0031 SP=FFFE BP=0000 SI=0082 DI=0000
DS=149E ES=149E SS=149E CS=149E IP=0110 NV UP EI PL NZ AC PE NC
149E:0110 46 INC SI
-



If at first you don't succeed, you're about average.

M2


Report Offensive Follow Up For Removal

Response Number 4
Name: dtech10
Date: November 25, 2005 at 16:30:56 Pacific
Reply: (edit)

Hi Mechanix
This might help.

N ONELINE.COM
A 100
MOV AH,2 ReM Display Output Function

:AGAIN
MOV SI,82 Rem Address of Arguments.
rem Note at 81 should be the leading space.
rem Try changing to 81. Put why I don't know.

MOV,DL,[SI] Rem Store contains pointed to by
Rem SI to register DL

CMP DL,D Rem Compare DL to C/Return 13
JZ 113 Rem If equal to jump to :EXIT
MOV AH,2 Rem Function Display again
INT 21 Rem Display Character
INC SI Rem Increase Pointer
JMP 105 Jump :AGAIN

:EXIT
MOV AH,4C
INT 21

R CX
17
W
Q


Report Offensive Follow Up For Removal

Response Number 5
Name: Mechanix2Go
Date: November 25, 2005 at 17:00:11 Pacific
Reply: (edit)

Hi d10,

Yeah, that works. But I have NO idea why.

Notice that the original works in debug if I 'g 100'.

And this dump from the original shows the string does indeed start at offset 82.

C:\temp\->debug oneline.com 123456
-d 80
149E:0080 07 20 31 32 33 34 35 36-0D

I'm really smoked out on this one. I have a sinking feeling we're never gonna know.


If at first you don't succeed, you're about average.

M2


Report Offensive Follow Up For Removal


Response Number 6
Name: dtech10
Date: November 25, 2005 at 17:34:02 Pacific
Reply: (edit)

Hi Mechanix
Beats me. Very confusing.


Report Offensive Follow Up For Removal

Response Number 7
Name: Mechanix2Go
Date: November 25, 2005 at 17:40:51 Pacific
Reply: (edit)

Hi d10,

I'm willing to just admit I can't figure it out.

But the nightmare scenario is I use offset 81, then some other day it decides to unclude the space.

SHEESH


If at first you don't succeed, you're about average.

M2


Report Offensive Follow Up For Removal

Response Number 8
Name: Mechanix2Go
Date: November 26, 2005 at 09:37:21 Pacific
Reply: (edit)

I tried it in DOS and it worked as expected.

What really baffles me is why it works in debug and not at the prompt. [w2k]


If at first you don't succeed, you're about average.

M2


Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: attn: dtech10 ; oneline.com

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge