MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 73 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: Thu 18 Jan, 2007 11:01 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Glad to hear it. :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 02 Feb, 2007 1:54 pm 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
I keep having trouble with ex af,af' Brass just dislikes it or something, it always thinks its the wrong ' and assumes the rest of my program is a string..


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 02 Feb, 2007 2:12 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
ex af,af' should work fine. It does for me.
Which version are you using?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 02 Feb, 2007 3:06 pm 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
1.0.4.9


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 02 Feb, 2007 3:17 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Could you post a snippet of code that doesn't assemble?

Here's one that does:
Code:
   ex af,af'
   ex af,af' ; ...also works


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 02 Feb, 2007 3:33 pm 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
Code:
   ex af,af'
   exx
   ld hl,($9A02)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 02 Feb, 2007 3:46 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Code:
G:\>type ex.txt
   ex af,af'
   exx
   ld hl,($9A02)
G:\>brass ex.txt
Brass Z80 Assembler 1.0.4.9 - Ben Ryves 2005-2006
-------------------------------------------------
Assembling...
Pass 1 complete. (343ms).
Pass 2 complete. (62ms).
Writing output file...
Errors: 0, Warnings: 0.
Done!

G:\>
Do you get any error messages? Give me something to work with! :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 02 Feb, 2007 4:04 pm 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 02 Feb, 2007 4:12 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Oh. It's a bug in the string and \ handling, which in turn is due to the abysmal syntax parser (see the recent post on how it's been updated for Brass 2).

There's no nice fix for this, not without a chunky rewrite of Brass which is happening anyway.

If you absolutely must use a macro like this, use
Code:
.addinstr EX   AF,AFS  08   1 NOP 1

    ex af,afs\ exx


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 02 Feb, 2007 4:22 pm 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
oh well I just put .db $08 which should work just as well..

I hope Brass 2 is coming along :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 05 Feb, 2007 10:50 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
It supports 'true' functions, rather than the TASM-style string replacement that's causing this error.

Rather than have a series of strings joined by '\', it calls the function (jumps into it and assembles it from where the function was called) using the original tokens, so none of the current parse errors occur.

Code:
_PutS = $450A

.function bcall(label)
    rst $28
    .dw label
.endfunction

bcall(_PutS)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 07 Feb, 2007 10:15 am 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
This is not really a bug, but it's annoying anyway.
Suppose you had a program that crashed, and you had a breakpoint in it. Well, ok, but the debugger ignores breakpoints by default, so it will crash and the program will no longer be in RAM, so it will be impossible to debug..
The solution is really really simple, just have the debugger break on breakpoints by default.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 07 Feb, 2007 11:06 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
That's not really a solution, as (let's say you're running Ion) breakpoints will be hit within Ion before your program is run. That's why they're off by default.

What is a bug is the omission of the "breakpoints-on" line in the .debug scripts. Add this just before the final "key-press enter" line.

(I think it's "breakpoints-on", if that doesn't work I'll double-check at home tonight).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 07 Feb, 2007 11:43 am 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
So, disable it for Ion or something? Or debug as nostub? in any case, its impossible to debug crashing programs this way


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 07 Feb, 2007 11:55 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
I posted the solution... add the line
Code:
breakpoints-on

...before the last "key-press enter" (this is in the .debug files in the Build directory). This switches on breakpoints just before your program is run.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 73 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt