flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
DOS386 22 Aug 2007, 07:21
Quote: defining byte like NO ![]() Code: qqhar: db 65 _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
![]() |
|
muratselim 22 Aug 2007, 07:37
but this variable can have -128 --> 255
what is the size of this type |
|||
![]() |
|
muratselim 22 Aug 2007, 07:45
i dont want to be misunderstood . but im trying to implement a crc32 calculation . so i need precious variable and clear code.
thanks for the response |
|||
![]() |
|
DOS386 22 Aug 2007, 07:49
> but this variable can have -128 --> 255
NO. ![]() > but im trying to implement a crc32 calculation . so i need precious variable and clear code. Use UINT32 - dd ![]() |
|||
![]() |
|
muratselim 22 Aug 2007, 07:52
qqhar: db -128
compiling succesfully qqhar: db -129 error:value out of range qqhar: db 255 compiling succesfully qqhar: db 256 error:value out of range |
|||
![]() |
|
DOS386 22 Aug 2007, 07:55
Quote: qqhar: db -128 into + 128 !!! ![]() Last edited by DOS386 on 22 Aug 2007, 07:59; edited 2 times in total |
|||
![]() |
|
muratselim 22 Aug 2007, 07:56
qqhar: db -129
error:value out of range why not +129 |
|||
![]() |
|
DOS386 22 Aug 2007, 07:58
Because (optional) signed understanding of byte has a range -128 ... +127 !!!
![]() |
|||
![]() |
|
muratselim 22 Aug 2007, 08:01
what is the deal with colon ( : )
qqchar: db 123 qqchar db 123 and if i use with other types what is the effect? |
|||
![]() |
|
DOS386 22 Aug 2007, 08:08
http://flatassembler.net/docs.php?article=design
> types what is the effect? The effect is FATAL !!! ![]() |
|||
![]() |
|
muratselim 22 Aug 2007, 08:25
thanks everything is clear now...
|
|||
![]() |
|
vid 22 Aug 2007, 08:37
muratselim: learn how signed numbers work.
In assembly, there is not much difference between signed and unsigned numbers, and you don't have any separate types for signed and unsigned. thy both are just 8 bit values, which you can treat as signed, or as unsigned. Sorry, i am lazy to go into deeper explaination right now. PS: difference between "x: db 10" and "x db 10" is that "x: db 10" declares label without size assigned, and "x db 10" declares label with byte size assigned. try this: Code: a db 10 b: db 10 mov ax, [a] ;error, trying to move byte value into word register mov ax, [b] ;same effect as "mov ax, word [b]" |
|||
![]() |
|
asmfan 22 Aug 2007, 10:30
In addition - how fasm treats signed/unsigned comparison in HLL like sintax? Say masm check - BYTE/WORD/DWORD for unsigned and SBYTE/SWORD/SDWORD for signed comparison via .if/.while and other runtime HLL written operations.
|
|||
![]() |
|
muratselim 22 Aug 2007, 15:08
what i understand is
fasm is an OS (construction) assembler. not for general purpose althoug have some extensions for win32, dos etc.. i have never tried hla . in my opinion assembler must be bare in most cases. this what makes assembly programming. i have a look some nasm samples. it's look like another choice. it has macro capability but yet plain intel syntax. gasm not for programming. it's a tool for gcc to embemded assembly. tasm and masm(micro$oft) os specific... the only reason for trying fasm before nasm was the idea behind fasm. compiler coded bare assembly as i know and nasm not as you know. have good time and appriciated for responses.... |
|||
![]() |
|
vid 22 Aug 2007, 18:56
FASM and NASM are basically the same, except that NASM is written in C (and is thus portable), and FASM has better assembling/macro capabilities
|
|||
![]() |
|
DOS386 24 Aug 2007, 00:19
> fasm is an OS (construction) assembler. not for general purpose althoug have some extensions for win32, dos etc..
Wrong. FASM is a general purpose assembler ... but good for OS construction also ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.