What are the closest preprocessors to DASM's DS and SEG preprocessors #545
-
Hi! I'm currently trying to program for the Atari 2600, and I'm struggling pretty hard. All of the documentation seems to exist for DASM and not WLA-DX. There's one file in particular that seems very important to port, which is vcs.h. The problem that I'm running into is that I can't seem to get a grip on both DASM and WLA-DX's preprocessors. Furthermore, I can't even quite figure out what a segment is supposed to be according to DASM, and its associated behavior. This is particularly bad because this file makes heavy use of DS and SEG. For a quick overview:
Any help is greatly appreciated! TIA! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Looking at vcs.h I think you'll need to completely rewrite it for WLA DX. That SEG(ment) looks like WLA's .SECTION
I think in WLA parlance this would be something like
Then again I'm not totally sure if you want to allocate space there or would an .ENUM be enough?
|
Beta Was this translation helpful? Give feedback.
-
Yeah, well, if VSYNC, VBLANK etc. are hardware registers that have addresses, but you don't want to put there data by default, only using your code, then .ENUM or .DEFINEs are what you need. Gotta admit that I don't know anything about DASM or Atari 2600. :) But Amiga has hardware registers like Gameboy, somewhere in the address space, and those are just addresses/locations that can be defined using .DEFINEs or .ENUM and then written into in your code... |
Beta Was this translation helpful? Give feedback.
Yeah, well, if VSYNC, VBLANK etc. are hardware registers that have addresses, but you don't want to put there data by default, only using your code, then .ENUM or .DEFINEs are what you need.
Gotta admit that I don't know anything about DASM or Atari 2600. :) But Amiga has hardware registers like Gameboy, somewhere in the address space, and those are just addresses/locations that can be defined using .DEFINEs or .ENUM and then written into in your code...