flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
Matrix 17 Aug 2005, 17:35
btw you should read the documentations of fasm , it is not tasm.
hm, since int 21h ah 9 prints ascii value , you have to convert the byte value to ascii numbers first, one byte can be represented in hexadecimal base with 2 hexadecimal numbers simple code to dump registers on screen. Code: org $100 ;program starting location 100h ;mov esp,$FABC push esi edx ecx ebx eax ; put registers on stack mov si,axeq ; display variable offset call bwritestring ; put variable at offset si on screen mov ebx,16 ; hexadecimal display of value pop eax ; load eax from stack call putlongint ; display value in eax call bendline ; end the line mov si,bxeq call bwritestring pop eax call putlongint call bendline mov si,cxeq call bwritestring pop eax call putlongint call bendline mov si,dxeq call bwritestring pop eax call putlongint call bendline mov si,cseq call bwritestring mov ax,cs call putlongint call bendline mov si,dseq call bwritestring mov ax,ds call putlongint call bendline mov si,eseq call bwritestring mov ax,es call putlongint call bendline mov si,fseq call bwritestring mov ax,fs call putlongint call bendline mov si,gseq call bwritestring mov ax,gs call putlongint call bendline mov si,sieq call bwritestring pop eax call putlongint call bendline mov si,dieq call bwritestring mov eax,edi call putlongint call bendline mov si,sseq call bwritestring mov ax,ss call putlongint call bendline push dword $12345678 ;pop eax mov si,speq call bwritestring mov bx,16 mov eax,esp call putlongint call bendline mov si,spdeq call bwritestring mov edi,esp ;mov eax,[edi-4] ;- esp-2 cimen sp értéke van mov eax,[edi] call putlongint call bendline pop eax mov si,bpeq call bwritestring mov eax,ebp call putlongint call bendline cli ; clear interrupts while we setup a stack mov ax,0x9000 ; this seems to be the typical place for a stack mov ss,ax mov sp,0xffff ; let's use the whole segment. Why not? We can added more comments... Last edited by Matrix on 18 Aug 2005, 10:15; edited 1 time in total |
|||
![]() |
|
umen 17 Aug 2005, 18:29
sorry but i didn't understand any thing.
|
|||
![]() |
|
THEWizardGenius 18 Aug 2005, 01:57
Read manuals, tutorials, etc. For FASM, because a TASM tutorial does no good with FASM.
Try the TAJGA tutorial, at decard.net. |
|||
![]() |
|
vid 18 Aug 2005, 06:24
Quote: For FASM, because a TASM tutorial does no good with FASM Well, i disagree here, you should learn to translate TASM into FASM, syntaxes aren't that different. There is to few things in TAJGA tutorial for now (and for too long i quess ![]() Try to start with examples that comes with FASM. |
|||
![]() |
|
shoorick 18 Aug 2005, 09:55
hi, umen
you have to understand everything you wrote, difference between F and 'F' etc. here is a working commented example in fasm (maybe not best, just fast) - it shows values of segment registers when program is just started. if need exactly tasm example - maybe i can later (have no tasm installed here to check)
_________________ UNICODE forever! |
|||||||||||
![]() |
|
umen 18 Aug 2005, 11:54
Hello all!
tnx you shoorick for efford but i just notice that you are talking here about fsam and i was talking about simple masm.... |
|||
![]() |
|
Matrix 18 Aug 2005, 11:57
hm umen,
i think fasm is simple, you make simple com file like this Code: org 100h ; start ; code here ret ; int 20h ;... exit ; variables |
|||
![]() |
|
shoorick 18 Aug 2005, 13:05
if you want exactly in masm - here is ready example, but i agree with Matrix about fasm
_________________ UNICODE forever! |
|||||||||||
![]() |
|
umen 18 Aug 2005, 13:38
shoorick again tnx allot , im very thankful for your help
but in the example you gave me you print the string , this is no problem and i know how to do this . my problem is that i need to print the hex address of the data segment in masm (.data in your example ) i hope i made my self clear again tnx allot |
|||
![]() |
|
shoorick 18 Aug 2005, 13:46
![]() |
|||
![]() |
|
shoorick 18 Aug 2005, 14:13
no, i have no 16-bit masm linker, so, try this - if it will not help - let us know
_________________ UNICODE forever! |
|||||||||||
![]() |
|
shoorick 18 Aug 2005, 14:29
downloaded linker - all ok, here exe to test:
_________________ UNICODE forever! |
|||||||||||
![]() |
|
vid 18 Aug 2005, 14:55
shorick: are you trying to become top poster here?
![]() ![]() |
|||
![]() |
|
Matrix 18 Aug 2005, 18:12
hmm,
i think i will have to moderate then ;> btw, you should learn fasm on fasm board... |
|||
![]() |
|
shoorick 18 Aug 2005, 18:46
if any try *asm and will not understand its taste it will never go to fasm. i started from tasm, then tried masm, then fasm. not because somebody restrict, fasm is my choise. don't you see here is newb? he should to compare and make own choice.
Quote:
![]() ![]() regards! |
|||
![]() |
|
umen 18 Aug 2005, 19:48
Thanks allot shoorick!!! you made my day !
tnx allot for your help , im sure u just helped allot of masm newbee's like me |
|||
![]() |
|
vid 18 Aug 2005, 19:58
shoorick: sure, i was just joking. thanks for anyone whoever found help in board like this
|
|||
![]() |
|
shoorick 19 Aug 2005, 05:10
i was explaining
![]() |
|||
![]() |
|
vid 19 Aug 2005, 06:12
yup, not a bad idea, special section for general newbies' assembly questions. Or somehow marking the thread that it's for newbies
|
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.