Sorry, no; the Basic and Kernal are ROMs. I explained the VIC-20 memory model in detail in another phpBB forum last week, but I can paste it here as well since it is quite on-topic:
$0000-03FF: 1K of "low" RAM, mainly system memory but in theory possible to use for your own needs if you bypass both Basic and Kernel.
$0400-$0FFF: Empty slot where the 3K expansion cartridge fits
$1000-$1DFF: 3.5K of "user" RAM
$1E00-$1FFF: 0.5K of screen memory (which is part of the user RAM)
$2000-$7FFF: Three empty slots of 8K each (total 24K for expansion)
$8000-$8FFF: Character ROM
$9000-$93FF: I/O blocks address space (VIC-I, VIA etc)
$9400-$97FF: Colour memory RAM in nybbles (four bits/byte)
$9800-$9FFF: I/O blocks address space (probably for expansion)
$A000-$BFFF: Empty slot for 8K RAM/ROM (games cartridges etc)
$C000-$DFFF: 8K Basic ROM
$E000-$FFFF: 8K Kernel ROM
The screen memory is shifted from $1E00 to $1000 when 8K or more expansion RAM is added, to ensure a continuous workspace for Basic.
So the user RAM is 4K, but 0.5 kB is "stolen" by the graphics. Here we get 3.5 kB. Since it is possible to fill the screen memory with code or data, some people still see it as 4 kB (but beware of clearing the screen!). If you add the "low" RAM, we end at 5 kB. If we also count the 1 kB of nybbles as 0.5 kB of RAM, there is a total of 5.5 kB...
On the C64 however, which has 64K of RAM, it is possible to copy the ROMs into the beneath RAM and then make changes, but not even there I'm sure you can alter too much.
There
is a zeropage address, $00D5 (decimal 213) which contains the logical line length, but changing that value will only be useful to confuse Basic whether a line break has occurred, i.e. if the current logical line spans over more than one physical line or not.
The following address contains the current screen line, so maybe you can
somehow use an interrupt which will set the current screen line outside the logical screen as soon as the cursor is outside of the visible area, force a scroll and then return the cursor to where it really was, if you understand how I'm thinking. I have not tried this myself, so I don't know if it will work...
Code: Select all
start:
SEI
LDA #<irq
STA $0314
LDA #>irq
STA $0315
LDA #0
STA code-1
CLI
RTS
irq:
LDA code-1
BEQ normal
LDA #maxline
STA $D6
LDA #0
STA code-1
BEQ out
normal:
LDA $D6
CMP #maxline+1
BMI out
LDA #1
STA code-1
LDA #22
STA $D6
out:
JMP $EABF
This routine does not work (as it should). It will limit you to move beyond maxline (e.g. 10), but there will not occur any elegant scrolling. Maybe some other ZP registers have to be set to make scrolling occur. It also has a bug in that the logical line can be extended past several physical lines (see above), so one can fill the last "allowed" line with more content, cause a line wrap and then cheat the routine.
It may be a good source to continue working with, but I would suggest to disassemble the following Kernel routines to learn more:
$E8E8 : check decrement of line counter
$E8FA : check increment of line counter
$E975 : screen scrolling routines
Woo.. technical after only ten posts, but this was about programming, right?