How to detokenize BASIC V7 text? / keyboard buffer

Started by MIRKOSOFT, February 14, 2010, 09:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MIRKOSOFT

 Hi!

I want to use my utility to COPY (CONTROL+C) and PASTE (CONTROL+V), but have a problem.
Example:
1. I type LIST 80-
2. hit RETURN
3. now I press CTRL+C for COPY
4. I type more commands an more times hit RETURN
5. I press CTRL+V to paste
6. pasted text is tokenized, so visible is: [TOKEN CHAR] 80-...and it's my problem.
I'm using keyboard buffer area ($0200) from where I'm copying 'cause there are stored also SPACE chars.
So, don't anyone know how to detokenize copied text?
Or exists other area where are stored all keys pressed? (routine CHRGET is unusable 'cause it accepts no SPACE chars)

Thanks for every help.

Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

MIRKOSOFT

MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

Hydrophilic

One way is to use BASIC ROM's QPLOP routine, part of LIST / HELP.  One way to use it (I've tested it), is to store pointer to tokenized text to $61/62, load Y with 0, then call $5149.

Looking at your code, it seems the tokenized text is at "paste", so you might try:

LDA #<paste
STA $61
LDA #>paste
STA $62
LDY #0
JSR $5149

Note the BASIC ROMs must be in the memory map for this to work.  More importantly, after JSR $5149, the MMU will be configured for BANK 0 RAM, BASIC + KERNAL ROMS, but no I/O registers.  Because you are using an IRQ routine, you probably want I/O registers, so try LDA #0, STA $FF00 after the JSR...

The QPLOP routine expects the tokenized text to be terminated with $00 byte, but looking at your code it seems you already have that :)

Other issues include location $11 which will determines if special characters are printed as reverse-graphic characters or do there normal thing (change colors, move cursor, etc).  Location $55 determines if address check is made while printing to turn on HELP highlight of text.  For your purposes, I think these should both be cleared to zero before calling $5149.

Good luck!
I'm kupo for kupo nuts!

MIRKOSOFT

Thank you very much.
This works correctly.
You help me not first time and really really thank you for every help.
I want to give your nick (or if you want - name) to credits to project aceDOS128.
Do you agree?

Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

Hydrophilic

Well, if you have room for credits, go ahead and put Hydrophilic in there!

aceDOS128 sounds pretty cool.  I can't wait to see what you come up with... I played around with my own OS for the C128 back in the day called TDDOS or something... I never finished it, but had fun and learned a lot.

Good luck, learn, and have fun!
I'm kupo for kupo nuts!

MIRKOSOFT

Hi!

I'm working on my project for long way...
first is aceDOS128 - for C128 supported: 64HDD, 1541Ultimate, IEC-ATA (or simple drives).
...then continue on other ace128 projects...
ace128 = Advanced Commodore Environment 128.... :-)

yes, I'm learning on C128, I was long time C64 user...

and your help is very very good, lot of help!

Thanks.

Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk