s390guy / SATK

Toolkit for creating baremetal programs targeting mainframe compatible systems
GNU General Public License v3.0
42 stars 6 forks source link

dc 'd' #3

Closed mstram closed 4 years ago

mstram commented 10 years ago
      xmode psw,ec
begin      start  0
L1234567   CSECT
*
            DC  d'42' 
            DC  D'42'
*num1       dc  D'42'
*num2       dc  d'42'

asma.py Copyright (C) 2014 Harold Grovesteen
P[5:17]-0 'dc_stmt' error encountered: 'd'
Traceback (most recent call last):
File "/home/action/git/SATK/tools/asma.py", line 256, in
ASMA(args,dm).run()
File "/home/action/git/SATK/tools/asma.py", line 95, in run
self.assembler.statement(filename=self.source)
File "/home/action/git/SATK/asma/assembler.py", line 4538, in statement
self.pre_process(s,debug=sdebug)
File "/home/action/git/SATK/asma/assembler.py", line 2905, in __pre_process
self.
parse(s)
File "/home/action/git/SATK/asma/assembler.py", line 2799, in parse
self.
error(eo.print(string=True))
File "/home/action/git/SATK/asma/assembler.py", line 1985, in __error
raise ValueError("%s\nassembler terminated" % string) from None
ValueError: P[5:17]-0 'dc_stmt' error encountered: 'd'
assembler terminated
END

s390guy commented 10 years ago

On Wed, 2014-07-30 at 19:47 -0700, Mike Stramba wrote:

xmode psw,ec begin start 0 L1234567 CSECT DC d'42' DC D'42' num1 dc D'42' *num2 dc d'42'


asma.py Copyright (C) 2014 Harold Grovesteen

P[5:17]-0 'dc_stmt' error encountered: 'd'

Traceback (most recent call last):

File "/home/action/git/SATK/tools/asma.py", line 256, in

ASMA(args,dm).run()

File "/home/action/git/SATK/tools/asma.py", line 95, in run

self.assembler.statement(filename=self.source)

File "/home/action/git/SATK/asma/assembler.py", line 4538, in statement

self.__pre_process(s,debug=sdebug)

File "/home/action/git/SATK/asma/assembler.py", line 2905, in __pre_process

self.__parse(s)

File "/home/action/git/SATK/asma/assembler.py", line 2799, in __parse

self.__error(eo.print(string=True))

File "/home/action/git/SATK/asma/assembler.py", line 1985, in __error

raise ValueError("%s\nassembler terminated" % string) from None

ValueError: P[5:17]-0 'dc_stmt' error encountered: 'd'

assembler terminated

END

DC statements require upper case constant types: D not d. A correction to the "assembler terminated" issue is in queue for committing.

mstram commented 10 years ago

DC statements require upper case constant types: D not d. A correction to the "assembler terminated" issue is in queue for committing.

Well I just assembled this cleanly. XMODE PSW,EC BEGIN START x'2000' D1F CSECT * dc f'5' dc F'6' DC f'7' DC F'8' END

But dc 'd' still has issues: XMODE PSW,EC BEGIN START x'2000' D1 CSECT DC D'8' END

                                          10                                                                                                   

^LASMA Ver. 0.1 01 Aug 2014 15:03:42 Page 2
action@nodeh-131169:~/mike$ aa d1
d101a.asm d102.asm d1.asm.lst d1.asm.st d1f.asm d1f.asm.r d1f.asm.v
d101.asm d1.asm d1.asm.r d1.asm.v d1f.asm.lst d1f.asm.st
action@nodeh-131169:~/mike$ aa d1.asm
asma.py Copyright (C) 2014 Harold Grovesteen
Traceback (most recent call last):
File "/home/action/git/SATK/tools/asma.py", line 268, in
ASMA(args,dm).run()
File "/home/action/git/SATK/tools/asma.py", line 95, in run
self.assembler.statement(filename=self.source)
File "/home/action/git/SATK/asma/assembler.py", line 4719, in statement
self.pre_process(s,debug=sdebug)
File "/home/action/git/SATK/asma/assembler.py", line 3086, in __pre_process
self.
parse(s)
File "/home/action/git/SATK/asma/assembler.py", line 2964, in __parse
if eo:
UnboundLocalError: local variable 'eo' referenced before assignment

s390guy commented 10 years ago

On Fri, 2014-08-01 at 08:07 -0700, Mike Stramba wrote:

    DC statements require upper case constant types: D not d. A
    correction to the "assembler terminated" issue is in queue for
    committing.

Well I just assembled this cleanly. XMODE PSW,EC BEGIN START x'2000' D1F CSECT * dc f'5' dc F'6' DC f'7' DC F'8' END

But dc 'd' still has issues: XMODE PSW,EC BEGIN START x'2000' D1 CSECT DC D'8' END

10

^LASMA Ver. 0.1 01 Aug 2014 15:03:42 Page 2

action@nodeh-131169:~/mike$ aa d1

d101a.asm d102.asm d1.asm.lst d1.asm.st d1f.asm d1f.asm.r d1f.asm.v

d101.asm d1.asm d1.asm.r d1.asm.v d1f.asm.lst d1f.asm.st

action@nodeh-131169:~/mike$ aa d1.asm

asma.py Copyright (C) 2014 Harold Grovesteen

Traceback (most recent call last):

File "/home/action/git/SATK/tools/asma.py", line 268, in

ASMA(args,dm).run()

File "/home/action/git/SATK/tools/asma.py", line 95, in run

self.assembler.statement(filename=self.source)

File "/home/action/git/SATK/asma/assembler.py", line 4719, in statement

self.__pre_process(s,debug=sdebug)

File "/home/action/git/SATK/asma/assembler.py", line 3086, in __pre_process

self.__parse(s)

File "/home/action/git/SATK/asma/assembler.py", line 2964, in __parse

if eo:

UnboundLocalError: local variable 'eo' referenced before assignment

UnboundLocalError exception thrown when a parser failure occurs corrected. Parser error occurs because D type constants are not supported. Use FD type constant instead.

Fish-Git commented 4 years ago

FYI: shouldn't this issue be closed? Lower case 'd' works fine for me!