flat assembler
Message board for the users of flat assembler.
Index
> Main > help me is about fasm public command error. |
Author |
|
kerr 10 May 2017, 07:41
no friends help me ?
|
|||
10 May 2017, 07:41 |
|
revolution 10 May 2017, 10:44
'data' is a reserved word. And 'public' is only available with linkable formats.
|
|||
10 May 2017, 10:44 |
|
kerr 11 May 2017, 01:36
revolution wrote: 'data' is a reserved word. And 'public' is only available with linkable formats. I don't know.if 'data' is a reserved word. But I use udata or datas label show error. Code: public udata label udata byte this code is error. I don't know is why. _________________ I hope we will be good friends. |
|||
11 May 2017, 01:36 |
|
revolution 11 May 2017, 02:10
'public' is only available with linkable formats. You have to define a format that is linkable.
Code: format ELF ;or COFF, or something that is linkable. |
|||
11 May 2017, 02:10 |
|
kerr 11 May 2017, 03:01
revolution wrote: 'public' is only available with linkable formats. You have to define a format that is linkable. oh friend but I use is error. this is masm syntax. Code: PUBLIC uData uData LABEL BYTE Sec9 EQU BYTE PTR uData+0 BiosLow EQU WORD PTR uData+11 BiosHigh EQU WORD PTR uData+13 CurTrk EQU WORD PTR uData+15 CurSec EQU BYTE PTR uData+17 DirLow EQU WORD PTR uData+18 DirHigh EQU WORD PTR uData+20 I want with fasm to compile it . But fasm compile to show error. _________________ I hope we will be good friends. |
|||
11 May 2017, 03:01 |
|
revolution 11 May 2017, 03:16
You have to use 'format'. Without it you just get the default binary format which doesn't support 'public'.
|
|||
11 May 2017, 03:16 |
|
kerr 11 May 2017, 04:17
revolution wrote: You have to use 'format'. Without it you just get the default binary format which doesn't support 'public'. how to do ? I use format binary . Sec9 EQU BYTE uData+0 mov di,Sec9 display error: operand sizes do not match. _________________ I hope we will be good friends. |
|||
11 May 2017, 04:17 |
|
revolution 11 May 2017, 04:21
DI is a 16-bit register. You can't load a byte into DI. fasm is showing you the correct error.
Are you trying to load the address or the value? Code: mov di,[address] ;load the value stored at address mov di,address ;load the address |
|||
11 May 2017, 04:21 |
|
kerr 11 May 2017, 05:12
revolution wrote: DI is a 16-bit register. You can't load a byte into DI. fasm is showing you the correct error. No friend. Your understand error. code is sec9 equ byte uData+0. mov di,[sec9] is mov di,[ byte uData+0] this is error. sec9 = 0x0000+0 mov di, sec9 is move offset address sec9 to di. i want load the address _________________ I hope we will be good friends. |
|||
11 May 2017, 05:12 |
|
revolution 11 May 2017, 07:08
You shouldn't have the 'byte ptr"
Code: Sec9 EQU uData+0 Code: struc uData { .Sec9 rb 11 .BiosLow rw 1 .BiosHigh rw 1 .CurTrk rw 1 .CurSec rb 1 .DirLow rw 1 .DirHigh rw 1 } uData uData mov di,uData mov al,[di+uData.Sec9] |
|||
11 May 2017, 07:08 |
|
kerr 11 May 2017, 08:16
revolution wrote: You shouldn't have the 'byte ptr" useing a structure? the structure can't do data. Because 'label udata byte' defined void udata label , so useing structure I don't know data Whether right? _________________ I hope we will be good friends. |
|||
11 May 2017, 08:16 |
|
revolution 11 May 2017, 08:59
Try this with the structure:
Code: mov ax,[di+uData.Sec9] |
|||
11 May 2017, 08:59 |
|
kerr 12 May 2017, 04:35
revolution wrote: Try this with the structure: Ok . thank you! _________________ I hope we will be good friends. |
|||
12 May 2017, 04:35 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.