Nametables are just your video ram that stores what's on the screen at that time. And yes, you want it to contain just the text Hello World, then a bunch of blank space, because that's what would be on your screen.
No, you don't make a bug huge nametable file that's 1KB large, and stick that in your code to copy to the nametable memory. That's just stupid.
You would use some kind of routine to copy a string to video memory...
NOTE: not a complete program, just a snippet
Code:
my_pointer = $10 ;some address I'll use
copy_string:
;You need to do this stuff with the screen turned off, or during Vblank time.
ldy #0
copy_string_loop:
lda (my_pointer),y ;my_pointer is an equate, give it an address somewhere
beq end_of_string ; if we read a zero, stop copying text
sta PPUDATA ; PPUDATA is address $2007
jmp copy_string_loop
end_of_string:
rts
I_want_to_print_something:
;You need to do this stuff with the screen turned off, or during Vblank time.
;put the address of the text into my_pointer
lda #my_string & $FF
sta my_pointer
lda #my_string >> 8
sta my_pointer+1
;set the coordinates we want to display at
;We probably want 2,4 for this demo, since TVs won't cut that off
;row * 32 + column + $2000
; = 2082
lda #$82
sta PPUADDR ; PPUADDR is $2006
lda #$20
sta PPUADDR
jsr copy_string
my_string:
.db "Hello World!",0