flat assembler
Message board for the users of flat assembler.

Index > Main > dollar in strings,

Author
Thread Post new topic Reply to topic
lazer1



Joined: 24 Jan 2006
Posts: 185
lazer1 20 Sep 2006, 03:41
as x86 asm uses the dollar sign $ to denote end of string Surprised

I was wondering what was the best way to achieve a dollar
sign in a string,

eg how would I represent the string:

'this computer cost me $10' Razz

?

is there a better way than:

Code:
msg  db  'this computer cost me $'
        db  24h
        db  '10$'
    
Post 20 Sep 2006, 03:41
View user's profile Send private message Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 20 Sep 2006, 05:07
if you are using dos function 9h - noway Wink (maybe buy with roubles Smile )
you have to use another function if you have to output some symbols like this, possible written by yourself, which will use single simbol output in the body

regards!
Post 20 Sep 2006, 05:07
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 20 Sep 2006, 05:26
lazer: use the "write file" DOS API to write to the stdout handle, instead of using the 9h "print string" thing.
Post 20 Sep 2006, 05:26
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 20 Sep 2006, 23:48
FYI, here's a quick reference for it: http://www.ctyme.com/intr/rb-2791.htm

P.S. STDOUT = 1, so use that in BX.

f0dder wrote:
lazer: use the "write file" DOS API to write to the stdout handle, instead of using the 9h "print string" thing.
Post 20 Sep 2006, 23:48
View user's profile Send private message Visit poster's website Reply with quote
lazer1



Joined: 24 Jan 2006
Posts: 185
lazer1 22 Sep 2006, 21:55
shoorick wrote:
if you are using dos function 9h - noway Wink (maybe buy with roubles Smile )
you have to use another function if you have to output some symbols like this, possible written by yourself, which will use single simbol output in the body

regards!


one asm tutorial I tried said $ is in fact not a dollar sign but a peso,

the guy said that the dollar has 2 vertical lines,

so I really meant the computer cost 10 pesos! Laughing
Post 22 Sep 2006, 21:55
View user's profile Send private message Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 25 Sep 2006, 05:21
old soviet computers had "¤" sign instead of "$". first computer game i saw was spacewar, were flying plates bombed with cyrillic letter 'F' - 'Ф', and you were killing them with "!" from "¤=!=¤", moving it on the bottom of the screen Very Happy
Post 25 Sep 2006, 05:21
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.