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 > Kick Assembler Thread 2
2009-07-21 17:20
Slammer

Registered: Feb 2004
Posts: 416
Kick Assembler Thread 2

The previous thread took a little long to load, so this is a new fresh one..
 
... 590 posts hidden. Click here to view all posts....
 
2016-03-13 15:58
Jammer

Registered: Nov 2002
Posts: 1289
I've tried to define that portion of code both as macro and function. Macro resulted in error due to non-assembly instructions. Function compiled without error but most probably as regular assembly that's not really a subroutine. Ok, I see that it has to be totally reorganized ;)
2016-03-13 16:36
Slammer

Registered: Feb 2004
Posts: 416
If you are reporting error please post complete examples. When you post cutout pieces of code I have no chance of verifying if its an error or not.

I dont think I understand what you are writing. Are you sure its not when you put it in a function you get an error for using asm directives? ( = directives that produce bytes to the output)
2016-03-13 17:31
Jammer

Registered: Nov 2002
Posts: 1289
Sorry about that :) Macro seems to work fine - it was just enclosed within .if directive that I didn't catch somehow. No error report whatsoever and thank you for the tip ;)
2016-03-13 20:04
Hoogo

Registered: Jun 2002
Posts: 102
I guess there are situations where automatic long branches are difficult:
---> Dest 1
|    ...
| -<Branch 2
| |  ...
--+<Branch 1
  |  ...
  -->Dest 2
Branch2 cannot be decided until Branch 1 was decided, and the other way around the same.
But such a situation can already be created with an .if (futureLabelFormual)FillSomeBytesFormula. How do you treat that? Forbid .if with unknown labels? Or some check if passes get out of sync?
2016-03-14 06:31
Slammer

Registered: Feb 2004
Posts: 416
You guessed it , using if's on yet unknown values gives an error since the memlocation of labels have to be resolved in first pass.
2016-09-01 21:29
TWW

Registered: Jul 2009
Posts: 541
I saw I asked this thing like 4 years ago and surely found some work-around back then but that is several HD crashes ago and perhaps there are updates I didn't catch.

Strings:

I am making a string for a cartridge header but it contains some RVRS ON characters and stuff. The question is how do I avoid doing this hack:

.const CartridgeName = "C64GS C" // Maximum 32 bytes.
.text CartridgeName
.byte $61,$72,$74,$72,$69,$64,$67,$65

Basically what I would like to do is to append the constant with the bytes as added data to the string. This again to allow me to fill in the surplus available characters without having to cheat:

.fill 32-CartridgeName.size()-8,0

So what I would like to do is:

.const CartridgeName = "C64GS C"+hexBytes($61,$72,$74,$72,$69,$64,$67,$65)
2016-09-01 21:38
TWW

Registered: Jul 2009
Posts: 541
Hmm another thing I saw now was that I get an error when compiling my code after updating Kickass (was using old version):

    .var ZP                    = $02
    .const FetchDataVector     = ZP .eval ZP+=2


Have to move the ".eval ZP+=2" to a new line but it used to assemble just fine. Will make my ZP variable declarations a lot more messy ^^
2016-09-02 12:20
Scan

Registered: Dec 2015
Posts: 110
You don't need to move it to a new line, you can also use ; to separate the statements:
    .var ZP                    = $02
    .const FetchDataVector     = ZP  ; .eval ZP+=2
2016-09-02 16:47
Digger

Registered: Mar 2005
Posts: 421
Tru dat. But you can do this and it works without eval, since it evaluates post expression.

.var zp                 = $c0
.const screen           = zp++
.const vOffset          = zp+=2
.const vScrollText      = zp+=2
2016-09-02 17:22
TWW

Registered: Jul 2009
Posts: 541
You guys are so clever 8-D

I seriously should drag my ass to a (c0py)party so I can start handing out those beers...

Now only question remains is the string issue above.
Previous - 1 | ... | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 - 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
Acidchild/Padua
t0m3000/ibex-crew
Ghost/Quantum
HOL2001/Quantum
cba
Guests online: 145
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 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Webmasters
1 Slaygon  (9.7)
2 Perff  (9.6)
3 Morpheus  (9.5)
4 Sabbi  (9.5)
5 CreaMD  (9.1)

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