here's the code now with two LEDs. portb.0 flashes on startup and portb.1 flashes after attempted write operations.

**************

'use the following when using the MP assembler
'@ DEVICE PIC16F819, hs_osc, wdt_off, pwrt_on, mclr_on, bod_off, cpd_off, protect_off, lvp_off, WRT_3FOURTHS

'use the following when using the MPASM assembler
@ __CONFIG _HS_OSC & _WDT_ON & _CP_OFF & _CPD_OFF & _WRT_ENABLE_512 & _PWRTE_OFF & _MCLR_ON & _BODEN_OFF _LVP_OFF

DEFINE OSC 10
clear

I var byte ' Loop count
D var word ' Data
A var word ' Address

A=$04F0
d=$1234

TRISB=0 'set portb pins to all output
PORTB=0 'turn off all portb pins

portb=0
for i=0 to 3
toggle portb.0
pause 200
next i

erasecode A
For I = 0 TO 63 STEP 2
Writecode A + I, D
Next I

portb=0
for i=0 to 3
toggle portb.1
pause 200
next i

stop
end

*******************

if i read the code space after the portb.1 LED blinks i get the same results as before.