6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 4:24 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Wincupl Error Codes
PostPosted: Tue Mar 28, 2023 11:00 pm 
Offline

Joined: Tue Mar 28, 2023 10:51 pm
Posts: 1
I am having 13 warnings and 0 errors shown when I try to compile this code for an atf16v8c project for school. This is my first time ever using wincupl so any feedback is appreciated. I also get a run time error 35602 after the compile has failed if that helps narrow it down. I have put the code below if someone doesn't mind looking through it. Thank you in advance...




/* *************** INPUT PINS *********************/
PIN 1 = x3 ; /*BCD Input */
PIN 2 = x2 ; /* */
PIN 3 = x1 ; /* */
PIN 4 = x0 ; /* */

/* *************** OUTPUT PINS *********************/
PIN 19 = a ; /*Seven Segment Output */
PIN 18 = b ; /* */
PIN 17 = c ; /* */
PIN 16 = d ; /* */
PIN 15 = e ; /* */
PIN 14 = f ; /* */
PIN 13 = g ; /* */

a = !x3 & !x2 & !x1 & !x0
# !x3 & !x2 & x1 & !x0
# !x3 & !x2 & x1 & x0
# !x3 & x2 & !x1 & x0
# !x3 & x2 & x1 & !x0
# !x3 & x2 & x1 & x0
# x3 & !x2 & !x1 & !x0
# x3 & !x2 & !x1 & x0 ;

b = !x3 & !x2 & !x1 & !x0
# !x3 & !x2 & !x1 & x0
# !x3 & !x2 & x1 & !x0
# !x3 & !x2 & x1 & x0
# !x3 & x2 & !x1 & !x0
# !x3 & x2 & x1 & x0
# x3 & !x2 & !x1 & !x0
# x3 & !x2 & !x1 & x0 ;

c = !x3 & !x2 & !x1 & !x0
# !x3 & !x2 & !x1 & x0
# !x3 & !x2 & x1 & x0
# !x3 & x2 & !x1 & !x0
# !x3 & x2 & !x1 & x0
# !x3 & x2 & x1 & !x0
# !x3 & x2 & x1 & x0
# x3 & !x2 & !x1 & !x0
# x3 & !x2 & !x1 & x0 ;

d = !x3 & !x2 & !x1 & !x0
# !x3 & !x2 & x1 & !x0
# !x3 & !x2 & x1 & x0
# !x3 & x2 & !x1 & x0
# !x3 & x2 & x1 & !x0
# x3 & !x2 & !x1 & !x0
# x3 & !x2 & !x1 & x0 ;

e = !x3 & !x2 & !x1 & !x0
# !x3 & !x2 & x1 & !x0
# !x3 & x2 & x1 & !x0
# x3 & !x2 & !x1 & !x0 ;

f = !x3 & !x2 & !x1 & !x0
# !x3 & x2 & !x1 & !x0
# !x3 & x2 & !x1 & x0
# !x3 & x2 & x1 & !x0
# x3 & !x2 & !x1 & !x0
# x3 & !x2 & !x1 & x0 ;

g = !x3 & !x2 & x1 & !x0
# !x3 & !x2 & x1 & x0
# !x3 & x2 & !x1 & !x0
# !x3 & x2 & !x1 & x0
# !x3 & x2 & x1 & !x0
# x3 & !x2 & !x1 & !x0
# x3 & !x2 & !x1 & x0 ;


Top
 Profile  
Reply with quote  
 Post subject: Re: Wincupl Error Codes
PostPosted: Wed Mar 29, 2023 1:03 am 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
Are you running this through the command line, or the GUI? If the latter, could you post the output?

Did you strip off the headers at the top of your file as well, or are they missing in your original file?

Aside from the missing headers the code looks OK to me in principle, though there are some language features that you could learn which would make it easier to write and cleaner - especially "Field".


Top
 Profile  
Reply with quote  
 Post subject: Re: Wincupl Error Codes
PostPosted: Wed Mar 29, 2023 7:00 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
(Welcome, programmingbasic)

I get the impression that WinCUPL is quite fragile and quite unforgiving, but that it will work if the input is in exactly the right form. So, your predicament is not unexpected! I hope others can help - but as gfoot says, it's best if you share all your input and output. Preferably, use Code blocks for your code when posting, to help the formatting.
Code:
code here


Top
 Profile  
Reply with quote  
 Post subject: Re: Wincupl Error Codes
PostPosted: Wed Mar 29, 2023 7:29 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
BigEd wrote:
Preferably, use Code blocks for your code when posting, to help the formatting.

Yes; put  [code]  and  [/code]  around the code as book ends, and it will look like this:
Code:
/* *************** INPUT PINS *********************/
PIN     1 = x3 ; /*BCD Input                      */
PIN     2 = x2 ; /*                               */
PIN     3 = x1 ; /*                               */
PIN     4 = x0 ; /*                               */

/* *************** OUTPUT PINS ********************/
PIN     19 = a ; /*Seven-Segment Output           */
PIN     18 = b ; /*                               */
PIN     17 = c ; /*                               */
PIN     16 = d ; /*                               */
PIN     15 = e ; /*                               */
PIN     14 = f ; /*                               */
PIN     13 = g ; /*                               */

        a = !x3 & !x2 & !x1 & !x0
          # !x3 & !x2 &  x1 & !x0
          # !x3 & !x2 &  x1 &  x0
          # !x3 &  x2 & !x1 &  x0
          # !x3 &  x2 &  x1 & !x0
          # !x3 &  x2 &  x1 &  x0
          #  x3 & !x2 & !x1 & !x0
          #  x3 & !x2 & !x1 &  x0 ;
         
        b = !x3 & !x2 & !x1 & !x0
          # !x3 & !x2 & !x1 &  x0
          # !x3 & !x2 &  x1 & !x0
          # !x3 & !x2 &  x1 &  x0
          # !x3 &  x2 & !x1 & !x0
          # !x3 &  x2 &  x1 &  x0
          #  x3 & !x2 & !x1 & !x0
          #  x3 & !x2 & !x1 &  x0 ;

        c = !x3 & !x2 & !x1 & !x0
          # !x3 & !x2 & !x1 &  x0
          # !x3 & !x2 &  x1 &  x0
          # !x3 &  x2 & !x1 & !x0
          # !x3 &  x2 & !x1 &  x0
          # !x3 &  x2 &  x1 & !x0
          # !x3 &  x2 &  x1 &  x0
          #  x3 & !x2 & !x1 & !x0
          #  x3 & !x2 & !x1 &  x0 ;

        d = !x3 & !x2 & !x1 & !x0
          # !x3 & !x2 &  x1 & !x0
          # !x3 & !x2 &  x1 &  x0
          # !x3 &  x2 & !x1 &  x0
          # !x3 &  x2 &  x1 & !x0
          #  x3 & !x2 & !x1 & !x0
          #  x3 & !x2 & !x1 &  x0 ;

        e = !x3 & !x2 & !x1 & !x0
          # !x3 & !x2 &  x1 & !x0
          # !x3 &  x2 &  x1 & !x0
          #  x3 & !x2 & !x1 & !x0 ;

        f = !x3 & !x2 & !x1 & !x0
          # !x3 &  x2 & !x1 & !x0
          # !x3 &  x2 & !x1 &  x0
          # !x3 &  x2 &  x1 & !x0
          #  x3 & !x2 & !x1 & !x0
          #  x3 & !x2 & !x1 &  x0 ;

        g = !x3 & !x2 &  x1 & !x0
          # !x3 & !x2 &  x1 &  x0
          # !x3 &  x2 & !x1 & !x0
          # !x3 &  x2 & !x1 &  x0
          # !x3 &  x2 &  x1 & !x0
          #  x3 & !x2 & !x1 & !x0
          #  x3 & !x2 & !x1 &  x0 ;

And welcome.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: