delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/26/09:12:18

Message-Id: <1.5.4.32.19970826130011.006a85d4@dce03.ipt.br>
Mime-Version: 1.0
Date: Tue, 26 Aug 1997 10:00:11 -0300
To: firewind <firewind AT metroid DOT dyn DOT ml DOT org>, djgpp AT delorie DOT com
From: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
Subject: Re: [Q] using int 0x21 to print text with inline asm

At 23:35 25/08/97 GMT, firewind wrote:

[snipped]

>> myHappy = "Hello, world!";
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^ (3)
[snipped]

>3: you're assiging a string to a variable, but this string really has no
>   storage allocated for it.
>

This affirmation is incorrect! What this line of code does is to
_initialize_ the pointer myHappy with the address of the first element of
the constant array of char _"Hello, world!"_. Nothing particular wrong there.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cesar Scarpini Rabak                      E-mail: csrabak AT ipt DOT br
DME/ASC                                   Phone: 55-11-268-3522 Ext.350
IPT - Instituto de Pesquisas Tecnologicas Fax:   55-11-268-5996
Av. Prof. Almeida Prado, 532.  Sao Paulo - SP 05508-901 BRAZIL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019