flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
MIHIP 28 Jun 2014, 12:44
Help please! Can you add the wct numeric system in fasm? Wct - word octal (A, B, C, D, E, F, G, O). For example: mov ax,CDFw.
PLEASE! I need it urgently! |
|||
![]() |
|
MIHIP 28 Jun 2014, 13:57
But.. please.. i very need this thing.....
|
|||
![]() |
|
revolution 28 Jun 2014, 13:59
But CDFw is a label name.
|
|||
![]() |
|
MIHIP 28 Jun 2014, 14:01
Ok, mov ax,AAAw (analog : mov ax,0h )
|
|||
![]() |
|
revolution 28 Jun 2014, 14:10
But AAAw is a label/variable name also. All numbers must start with a digit.
|
|||
![]() |
|
MIHIP 28 Jun 2014, 14:17
In wct - no.
|
|||
![]() |
|
revolution 28 Jun 2014, 14:50
In fasm - yes
|
|||
![]() |
|
MIHIP 28 Jun 2014, 16:44
Oh...(((((
|
|||
![]() |
|
MIHIP 28 Jun 2014, 16:44
Ok. mov ax,0AAAw
|
|||
![]() |
|
MIHIP 28 Jun 2014, 16:45
Can you realise that?
|
|||
![]() |
|
revolution 28 Jun 2014, 17:05
That is better. Now what you need to do is modify "EXPRPARS.INC". Look for a label named get_number and add in your new format there.
|
|||
![]() |
|
MIHIP 28 Jun 2014, 17:31
I tried to add, but could not. Please help me with a couple of instructions ..
|
|||
![]() |
|
sleepsleep 29 Jun 2014, 18:40
why not just write a parser and parse it then call fasm to assemble?
at least you don't have to go deep into fasm sources and probably break something? |
|||
![]() |
|
MIHIP 01 Jul 2014, 14:29
No..(((
|
|||
![]() |
|
revolution 01 Jul 2014, 15:29
MIHIP wrote: I tried to add, but could not. Please help me with a couple of instructions .. |
|||
![]() |
|
cod3b453 01 Jul 2014, 17:15
With some jiggergy-pokery you can treat the literal as a value via the string operator, then with the help of macros created by baldr for "inline" evaluation:
Code: ; ; Macros by baldr ; struc reequ [val] { common restore . . equ val } macro @! [args] { common local head, expr, tail, matched head equ expr equ tail equ matched equ 0 match _head =! _expr =! _tail, args \{ head reequ _head expr reequ _expr tail reequ _tail matched reequ 1 \} match =0 _head =! _expr =!, matched args \{ head reequ _head expr reequ _expr matched reequ 1 \} match =0 =! _expr =! _tail, matched args \{ expr reequ _expr tail reequ _tail matched reequ 1 \} match =1, matched \{ \local val match _expr, expr \\{ val _expr head val tail \\} restore val \} match =0, matched \{ args \} restore head, expr, tail, matched } ; ; Inline octal using A,B,C,D,E,F,G,O ; 0,1,2,3,4,5,6,7 ; struc @oct val { local size virtual at 0 db `val size = $ end virtual assert size < 7 d0 = `val and $FF d1 = (`val shr 8 ) and $FF d2 = (`val shr 16 ) and $FF d3 = (`val shr 24 ) and $FF d4 = (`val shr 32 ) and $FF d5 = (`val shr 40 ) and $FF if d0 > 0 d0 = d0 - 'A' end if if d1 > 0 d1 = d1 - 'A' end if if d2 > 0 d2 = d2 - 'A' end if if d3 > 0 d3 = d3 - 'A' end if if d4 > 0 d4 = d4 - 'A' end if if d5 > 0 d5 = d5 - 'A' end if if d0 > 6 d0 = 7 end if if d1 > 6 d1 = 7 end if if d2 > 6 d2 = 7 end if if d3 > 6 d3 = 7 end if if d4 > 6 d4 = 7 end if if d5 > 6 d5 = 7 end if x = ((d0 shl 15) or (d1 shl 12) or (d2 shl 9) or (d3 shl 6) or (d4 shl 3) or d5) shr ((6 - size) * 3) . equ x } ; C,D,F = 2,3,5 = 010,011,101 = 0 1001 1101 = 9D @! mov ax, ! @oct CDF ! |
|||
![]() |
|
MIHIP 05 Jul 2014, 10:16
No, you have to add it in FASM! Please!
|
|||
![]() |
|
MIHIP 07 Jul 2014, 15:40
Please, help! Add wct numeric system in fasm!
|
|||
![]() |
|
JohnFound 07 Jul 2014, 20:51
why someone have to make something only you need???
|
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.