DELETED
Moderator: Moderators
Not a macro, but I've been using the following code (copied from Marko Mäkelä's code here):
It works and I just copy and paste it into new projects directly below the .org directive.
My macro-fu is inferior to yours. I've wanted to look for a while but been too busy coding
HTH
Code: Select all
.org $1201
; The BASIC line
basic:
.word 0$ ; link to next line
.word 2009 ; line number
.byte $9E ; SYS token
; SYS digits
.if (* + 8) / 10000
.byte $30 + start / 10000
.endif
.if (* + 7) / 1000
.byte $30 + start % 10000 / 1000
.endif
.if (* + 6) / 100
.byte $30 + start % 1000 / 100
.endif
.if (* + 5) / 10
.byte $30 + start % 100 / 10
.endif
.byte $30 + start % 10
0$:
.byte 0,0,0 ; end of BASIC program
start
...
My macro-fu is inferior to yours. I've wanted to look for a while but been too busy coding

HTH
Re: DASM Macros
Why not this:MRaider wrote:Code: Select all
$0b,$10,$0a,$00,$9e,"4","1","0","9",$00,$00,$00
Code: Select all
$0b,$10,$d9,$07,$9e,"4","1","0","9",$00,$00,$00

Mega-Cart: the cartridge you plug in once and for all.
Marko himself rewrote that code as a macro. See basic.i as found in my music player package:
http://www.cbm.sfks.se/files/vplay.zip
As a matter of fact, you find some macros to handle raster timing there too. On top of it, you find my music player which makes heavy use of macros, however not the typical ones you'd associate with an assembler.
http://www.cbm.sfks.se/files/vplay.zip
As a matter of fact, you find some macros to handle raster timing there too. On top of it, you find my music player which makes heavy use of macros, however not the typical ones you'd associate with an assembler.
Anders Carlsson






- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: DASM Macros
To 'compensate' for the space between line number (year), and SYS, I often also put an extra space between SYS and address, like in:MRaider wrote:I quite like the idea of using the year as the line number though, it's a nice touch.
2008 SYS 8584
this line which shows up in quite some files of VICtoria Gold Edition.
Alternatively, if one follows the line number in memory with $00,$3a,$3a,$3a,$3a, these characters, and the rest of the line will not be listed, displaying only the line number.
Michael
- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Such a display is possible using an additional REM, with {DEL} control characters to delete the REM, and further up to the first 'S' of 'SYS', followed by a text message. Here's an example memory dump from VICE:
Greetings,
Michael
Code: Select all
>C:1000 00 20 10 d9 07 9e 34 31 . ....41
>C:1008 33 30 3a 8f 14 14 14 14 30:.....
>C:1010 14 14 14 14 14 14 14 28 .......(
>C:1018 43 29 20 4d 49 4b 45 00 C) MIKE.
>C:1020 00 00 ..
Michael