flat assembler
Message board for the users of flat assembler.

Index > Windows > Assembly language for beginner

Goto page Previous  1, 2, 3
Author
Thread Post new topic Reply to topic
Stefx



Joined: 24 Apr 2020
Posts: 21
Stefx
Hi again,
1) I would like ask why program execute both strings if I only pushed "name1Str" to be printed ?

2) How can I make that string, could be printed few lines lower, keeping empty space upper?


Description:
Filesize: 96.76 KB
Viewed: 4055 Time(s)

prt1.jpg


Post 29 Aug 2020, 13:43
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18450
Location: In your JS exploiting you and your system
revolution
Your string needs to be terminated with a zero byte:
Code:
my_string db 'test',0 ; zero terminated    
Post 29 Aug 2020, 14:11
View user's profile Send private message Visit poster's website Reply with quote
Stefx



Joined: 24 Apr 2020
Posts: 21
Stefx
Ohh, thanks.
Do you know maybe how about second point?
How to tell "print this sting few lines lower?"
Post 29 Aug 2020, 17:52
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1088
Roman
Maybe:
down1 db 13,10,0
down5 db 5 dup(13,10)
db 0

push down5
Call [printf]
Post 29 Aug 2020, 18:23
View user's profile Send private message Reply with quote
Stefx



Joined: 24 Apr 2020
Posts: 21
Stefx
Thanks Roman it's works.
btw. what's mean this numbers? 10, 13, 0.
I saw if I put another number like 11, 12, 0. On my string I got some extra symbol or any kind of weird signs.
Post 29 Aug 2020, 18:55
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18450
Location: In your JS exploiting you and your system
revolution
See here for the meaning of the control characters.
https://ascii.cl/control-characters.htm

13 = CR, 10 = LF, etc.
Post 29 Aug 2020, 22:31
View user's profile Send private message Visit poster's website Reply with quote
Stefx



Joined: 24 Apr 2020
Posts: 21
Stefx
is there any book about assembler worth recommending?
Post 28 Apr 2021, 09:09
View user's profile Send private message Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 510
Ali.Z
IMO, books need assembly but assembly dont need books Rolling Eyes

I dont think there are very good content in modern books (and old books will teach you 16-bit assembly and in real-mode), but I suggest you read manuals.

- fasm manual (obviously to know more about fasm features)
- your OS api (maybe win32.hlp file)
- target CPU manual (assuming you have intel CPU, then you gonna need intel's software developer manual)
(just search intel sdm)

_________________
Asm For Wise Humans
Post 12 May 2021, 13:27
View user's profile Send private message Reply with quote
torial



Joined: 08 Jun 2018
Posts: 6
Location: US
torial
Stefx wrote:
is there any book about assembler worth recommending?


This book seemed decent (covered FASM programming and even had a section on making .Net integrations): https://www.packtpub.com/product/mastering-assembly-programming/9781787287488

And I used it to complement the video series on FASM: https://www.udemy.com/share/101Wo2BUMSdVpVRHo=/
Post 13 May 2021, 19:28
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3

< 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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.