I've been tooling around with P65 as an assembler (python version) and though it doesn't seem many of you use it, I thought you might be able to help me sort out some of the assembler-specific 'language' it uses. For instance, in the NES 101 tutorial, there is the following code:
.org makes sense as a memory starting address, but the .segment and .space directives don't make much sense to me, and the P65 documentation isn't much help.
I am similarly in the dark about .word and .text. For example:
I understand what this is doing, but not why .text is used.
Anyone have any input on this?
Code:
; Allocate memory in the zero page segment
.segment zp
.org $0000
.space dx 1
.space a 1
.space scroll 1
.segment zp
.org $0000
.space dx 1
.space a 1
.space scroll 1
.org makes sense as a memory starting address, but the .segment and .space directives don't make much sense to me, and the P65 documentation isn't much help.
I am similarly in the dark about .word and .text. For example:
Code:
; Actual program code. We only have one PRG-ROM chip here, so the
; origin is $C000.
.text
.org $C000
; origin is $C000.
.text
.org $C000
I understand what this is doing, but not why .text is used.
Anyone have any input on this?