Posted By
bszggg on 2024-02-19 18:58:48
| Cursor place (reposition in interrupt) problem
HI! I would like as some help!
I have X and Y coordinates in the screen at char mode X:0-39 and Y:0-24 I would like to put the cursor at that position in the interrupt routine with assembly.
First: I try to call the rom routine $d839, and it is working, but if was wrong because it clears the "Rows link table for screen" (SCREEN 07EE-07F1)
Second: 1: - I found the display in the TED, I counting the address, that's fine 2: - I found the $CA $CD addresses.. I put the x and Y coordinates there, that's fine 3: - I fill the mouse address to $C8 (low) and $C9, that's fine 4: - There are $C4 and $C5 too, and I don't know How I can count these numbers.. I try to see in emulators, but sometime I got a #$F0 or #$FF in the $C4.. So I can't found any rules for it. If I set this with my X and Y , that will not work.
So If somebody have any idea, how I can put the cursor well from assembly interrupt, Please share it!
Thank you!
|
|
Posted By
Haegar on 2024-02-20 01:53:44
| Re: Cursor place (reposition in interrupt) problem
This is a quick and easy way if you don't want to use the kernel routines ($fff0). $d2 contains the character you want to put in the X and Y positions.
ldx xpos ldy ypos
lda screenlo,x sta $d0 lda screenhi,x sta $d1 lda $d2 sta ($d0),y rts
screenlo byte $00,$28,$50,$78,$a0,$c8,$f0,$18 byte $40,$68,$90,$b8,$e0,$08,$30,$58 byte $80,$a8,$d0,$f8,$20,$48,$70,$98 byte $c0
screenhi byte $0c,$0c,$0c,$0c,$0c,$0c,$0c,$0d byte $0d,$0d,$0d,$0d,$0d,$0e,$0e,$0e byte $0e,$0e,$0e,$0e,$0f,$0f,$0f,$0f byte $0f
I just see that according to your information, X and Y are swapped here.
If you really want to change the cursor position during operation and this is immediately visible, I think it's a little more complicated.
|
|
Posted By
gerliczer on 2024-02-20 05:09:35
| Re: Cursor place (reposition in interrupt) problem
@bszggg: Open your copy of A PLUS/4 Belső Felépítése at page number who knows what where ROM disassembly of the routine at $D839 can be found. Replicate code behaviour, except readout capability, before screen initialization call JSR $DE70 in your handler. Call routine from $D846. Most probably: profit.
|
|
Posted By
bszggg on 2024-02-20 19:42:19
| Re: Cursor place (reposition in interrupt) problem
@Haegar
Yes, I would like to move the operation systems actual cursor
@gerliczer
Yeah, I tried, but that doesn't work well. After click in a BASIC program list multiple (long line) row, that brake the multiple, or doesn't accept the changes..
I think I have to set differently the $C4 and $C5 than the $CA $CD in that case if it is a long basic row
TED contains the cursor that is displayed $CA $CD is the cursor, that I move with cursor keys $C4 $C5 is the cursor that lead the command (If I set wrong I got syntax error, or doesn't do anything after enter)
I don't know, How I can count these $C4 $C5 addresses values.
-------------------------------------------- Thank YOU the ideas! :) ------------------------------------------- Finally I found the working code that counts the command positions well: ; .. after, I set the positions to the TED... ; here we set the dursor real side to screen ; set the Y cursor coordinate LDX .MerCharY STX $CD ; set the X cursor coordinate LDY .MerCharX STY $CA ; set the X command coordinate (it is same as screen left) LDY $07E7 STY $C5 ; set the Y command coordinate (We have to found the first wow of the actual command) JSR $DF87 ; Call the Esc+J routin third row to check the multiple command rows This routin working with real cursor so.. LDA $CD ; copy the Y cursor coordinate command coordinate STA $C4 LDX .MerCharY STX $CD ; Set the Y cursor coordinate again ; counting the addresses again ($df87 contains it but wrong cursor position) JSR $D8A8
|
|
|