Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Converting ACME code to Kick Assembler
2016-06-19 03:24
Pixman
Account closed

Registered: Dec 2001
Posts: 42
Converting ACME code to Kick Assembler

In this code there are some confusing lines (since there are no proper ACME manuals):
http://codebase64.org/doku.php?id=base:double_irq
lda #$00 ;Reload A,X,and Y
reseta1 = *-1 ;registers
ldx #$00
resetx1 = *-1
ldy #$00
resety1 = *-1



Someone on #c-64 told me = is for the current Program Counter.

But there is no equivalent to this in Kick Assembler.

Solve it with branches?

I seriously have no idea how to fix this problem.

Any suggestions?
Tnx,
Pix
 
... 80 posts hidden. Click here to view all posts....
 
2016-06-22 17:32
chatGPZ

Registered: Dec 2001
Posts: 11123
hooray for antioptimization techniques :o)
2016-06-22 17:40
Burglar

Registered: Dec 2004
Posts: 1031
no sane coder would place their table at $10ff ;)

and, yes, thank fuck for edit :)
2016-06-22 17:42
Oswald

Registered: Apr 2002
Posts: 5021
"This immediately parses, in my head, as self modifying code. No need for assembler-masturbation"

+100000000
2016-06-22 17:43
Compyx

Registered: Jan 2005
Posts: 631
I'm sure this can be optimized even further:

; // \1 is arg 0
.macro inc_mem {
    .if (code_or_table_crosses_page(\1) {
       .macro bar {
          inc \1 + 1
          bne +
          inc \1 + 2
     } else {
        .macro bar {
           inc \1 + 1
     }
     return bar;
}


All I need to do now is figure out the `code_or_table_crosses_page` function/macro.
2016-06-22 17:44
Compyx

Registered: Jan 2005
Posts: 631
Quote: no sane coder would place their table at $10ff ;)

and, yes, thank fuck for edit :)


I would, unknowingly, which things like .align solve, one of the actual useful extensions to TA
2016-06-22 19:58
ChristopherJam

Registered: Aug 2004
Posts: 1378
.align? Bah, all you need is .dsb <-*,0 ;-)
2016-06-22 20:12
Compyx

Registered: Jan 2005
Posts: 631
Looks like that just fills unused mem with 00. My assembler optimizes NOP's and BIT $EA away for shorter and faster code, so BRK would just confuse it.
2016-06-22 20:29
chatGPZ

Registered: Dec 2001
Posts: 11123
Quote:
My assembler optimizes NOP's and BIT $EA away for shorter and faster code

sounds like a great feature to have - enabled by default!
2016-06-22 20:46
Perplex

Registered: Feb 2009
Posts: 254
Quoting ChristopherJam
.dsb <-*,0 ;-)

What I like about this one is that it assembles just fine with the smiley included. Unless you're using KA of course. // Insert apropriate smiley here
2016-06-22 21:29
chatGPZ

Registered: Dec 2001
Posts: 11123
Quote:
What I like about this one is that it assembles just fine with the smiley included. Unless you're using KA of course.

//O\\
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
iAN CooG/HVSC
K-reator/CMS/F4CG
cba
Viti/Hokuto Force
Clown
zscs
Guests online: 148
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Logo Graphicians
1 Sander  (9.9)
2 Facet  (9.6)
3 Mermaid  (9.4)
4 Pal  (9.4)
5 Shine  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.049 sec.