Yes, seems being correct. But AN3741 code won't work if you selected minimal startup code in project wizard. You need ANSI startup routine to make prog_ram[] initialized properly at startup. Else you need to provide your own routine, which will fill prog_ram codes.

Hope there are no differences in LA8 vs KA8 programming algorithms, perhaps no. If you want to roll out your own C routine to program flash, which of course needs to be placed in RAM, here's how to make RS08 RAM function with CW:

1. In project wizard chose ANSI startup

Since faster to access RAM at 0x50 is precious thing, I'm going to put RAM function to "far" RAM at >=0x100.