-2

i have doing assembly but i stack somewhere, i don't know how can i do this,i want to "appear" this message on screen in assembly,i use emu8086.I wrote MES DB 10,13,"Za7",10,13,"$".The first line but how i do the second or the third or the four.I know i should change something on that but i don't know what should i change.As a result it would be like this way i did down.The second line is more inside the third more and the four line more.

Za7
  Yb9
    Xc11
       Wd13
ek.Nik
  • 185
  • 1
  • 8
  • The `13,10` goes to the next line. – interjay Jan 09 '18 at 13:35
  • yes ,but it doesn't make "space" so that it could be this result.I don't want this Za7 to have the Yb9 exactly down of it.I want to have space as i did it up – ek.Nik Jan 09 '18 at 13:43
  • The code `MES DB 10,13,"Za7",10,13,"$"` does not contain any white space, so it must be elsewhere, either in your code, or your line in file is a bit different from the line you posted here in question. Copy part of your source directly from the file in some text editor like notepad, so we can be sure the question contains the real thing. Or check your version of emu8086, if it does produce listing file (feature after recent update), posting that may be even better, as there is visible produced machine code for every instruction/directive. – Ped7g Jan 09 '18 at 13:47
  • MES DB 10,13,"Yb9",10,13,"$" i want this to have a white space not the MES DB 10,13,"Za7",10,13,"$". That's what i am looking for – ek.Nik Jan 09 '18 at 13:54
  • You can just write spaces at the start of the line. – interjay Jan 09 '18 at 13:58
  • Does your current code print the way you show in your question and that's a problem? Or do you *want* it to print that way, but it doesn't currently? – Peter Cordes Jan 09 '18 at 14:00
  • my problem is that is exactly down it doesn't have space from the start of the second line,or spaces from the start of the third line and spaces from the last line.I hope you understand – ek.Nik Jan 09 '18 at 14:00
  • Then what's the problem with writing the spaces? – interjay Jan 09 '18 at 14:06
  • how i write the spaces... – ek.Nik Jan 09 '18 at 14:12
  • where* i write the spaces. – ek.Nik Jan 09 '18 at 14:25
  • You write them like you write other letters, you just press the big button at the bottom of your keyboard instead of the letter. – interjay Jan 09 '18 at 14:36
  • inside the " " i will press the space? – ek.Nik Jan 09 '18 at 16:20
  • In this special case you can also remove one of the 13, 10 values, I'm never sure which is which, but one is line-feed, and other is carriage-return ... if you keep only LF, and remove CR, the cursor will move only down, but not to the start of line.... BTW in DOS the correct order is "13, 10", not "10, 13" ... that's correct on old MacOS IIRC (not used anywhere). ... ah, in your example the strings actually start below the last char, so then only LF will not help, you would need one position left too. You can also include value `9` = tabulator in the string, just like you add the LF/CR values – Ped7g Jan 09 '18 at 17:18
  • *"inside the " " i will press the space?"* ... yes. Or you can add them as byte values, space character in ASCII encoding has value 32. So `db 32, 32, 65, 32, 32` will compile to the exactly same machine code as `db " A "` (two spaces ahead/after big letter A). The assembler will translate your string into the ASCII encoded byte values, i.e. each character inside quotes is one byte value (32-126 values for printable ASCII characters). – Ped7g Jan 09 '18 at 17:20

1 Answers1

1

There are a couple of different ways of doing this, but the simplest is;

MES     db    10,13,'Yb9',10,13,'  Za7',10,13,'    Xc11'
        db    10,13,'       Wd13',10,13,'$'
Shift_Left
  • 1,208
  • 8
  • 17