Rev 1168 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log
| Rev 1168 | Rev 1410 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | hexeditor_XYTOP=0x0000 |
1 | hexeditor_XYTOP=0x0000 ;ьюцхЄ ёфтшэєЄ№ё шч-чр ьхэ■ |
| 2 | hexeditor_HGT=txtscrhgt-1 |
2 | ;hexeditor_HGT=txtscrhgt-1 ;ьюцхЄ єьхэ№°шЄ№ё шч-чр ьхэ■ |
| 3 | hexeditor_WID=80 |
3 | hexeditor_WID=80 ;ьюцхЄ єьхэ№°шЄ№ё шч-чр ёъЁюыысрЁр |
| 4 | hexeditor_MAXX=15 |
4 | hexeditor_MAXX=15 |
| 5 | hexeditor_PAGESIZE=16*hexeditor_HGT |
5 | ;hexeditor_PAGESIZE=16*hexeditor_HGT |
| 6 | 6 | ||
| 7 | if PRSTDIO |
7 | if PRSTDIO |
| 8 | _hexeditor_CURSORCOLOR=0x0700;0x38 |
8 | _hexeditor_CURSORCOLOR=0x0700;0x38 |
| 9 | _hexeditor_COLOR=0x0007;7 |
9 | _hexeditor_COLOR=0x0007;7 |
| 10 | else |
10 | else |
| Line 295... | Line 295... | ||
| 295 | 295 | ||
| 296 | hexeditor_prpage |
296 | hexeditor_prpage |
| 297 | ld hl,(hexaddrline) |
297 | ld hl,(hexaddrline) |
| 298 | ld a,(hexaddrlineHSB) |
298 | ld a,(hexaddrlineHSB) |
| 299 | ld de,hexeditor_XYTOP |
299 | ld de,hexeditor_XYTOP |
| 300 | ld b,hexeditor_HGT |
300 | ;ld b,hexeditor_HGT |
| - | 301 | ld bc,(hexedhgt-1) ;b |
|
| 301 | hexeditor_prpage0 |
302 | hexeditor_prpage0 |
| 302 | push bc |
303 | push bc |
| 303 | push de |
304 | push de |
| 304 | push af |
305 | push af |
| 305 | call nv_setxy ;keeps de,hl,ix |
306 | call nv_setxy ;keeps de,hl,ix |
| Line 480... | Line 481... | ||
| 480 | ld c,a |
481 | ld c,a |
| 481 | ld a,d |
482 | ld a,d |
| 482 | or a |
483 | or a |
| 483 | ld a,c |
484 | ld a,c |
| 484 | jr nz,hexeditor_pgupq |
485 | jr nz,hexeditor_pgupq |
| 485 | ld b,hexeditor_HGT-1 |
486 | ;ld b,hexeditor_HGT-1 |
| - | 487 | ld bc,(hexedhgt-1) ;b |
|
| - | 488 | dec b |
|
| 486 | hexeditor_pgup0 |
489 | hexeditor_pgup0 |
| 487 | push bc |
490 | push bc |
| 488 | call hexeditor_prevline |
491 | call hexeditor_prevline |
| 489 | pop bc |
492 | pop bc |
| 490 | djnz hexeditor_pgup0 |
493 | djnz hexeditor_pgup0 |
| Line 499... | Line 502... | ||
| 499 | 502 | ||
| 500 | hexeditor_pgdown |
503 | hexeditor_pgdown |
| 501 | call nvhex_calccuraddrline |
504 | call nvhex_calccuraddrline |
| 502 | ld de,(hexcuraddrxy) |
505 | ld de,(hexcuraddrxy) |
| 503 | ld c,a |
506 | ld c,a |
| - | 507 | ;ld a,hexeditor_HGT-1 |
|
| - | 508 | ld a,(hexedhgt) |
|
| 504 | ld a,d |
509 | dec a |
| 505 | cp hexeditor_HGT-1 |
510 | cp d |
| 506 | ld a,c |
511 | ld a,c |
| 507 | jr z,hexeditor_pgdown_do |
512 | jr z,hexeditor_pgdown_do |
| 508 | hexeditor_pgdown0 |
513 | hexeditor_pgdown0 |
| 509 | ld c,a |
514 | ld c,a |
| - | 515 | ;ld a,hexeditor_HGT-1 |
|
| - | 516 | ld a,(hexedhgt) |
|
| 510 | ld a,d |
517 | dec a |
| 511 | cp hexeditor_HGT-1 |
518 | cp d |
| 512 | ld a,c |
519 | ld a,c |
| 513 | jr z,hexeditor_pgdownq |
520 | jr z,hexeditor_pgdownq |
| 514 | call nvhex_calcnextcorrectxy |
521 | call nvhex_calcnextcorrectxy |
| 515 | jr c,hexeditor_pgdown0 |
522 | jr c,hexeditor_pgdown0 |
| 516 | hexeditor_pgdownq |
523 | hexeditor_pgdownq |
| Line 525... | Line 532... | ||
| 525 | ld hl,(hexaddrline) |
532 | ld hl,(hexaddrline) |
| 526 | ld a,(hexaddrlineHSB) |
533 | ld a,(hexaddrlineHSB) |
| 527 | ld d,0 |
534 | ld d,0 |
| 528 | hexeditor_pgdown_do0 |
535 | hexeditor_pgdown_do0 |
| 529 | ld c,a |
536 | ld c,a |
| - | 537 | ;ld a,hexeditor_HGT-1 |
|
| - | 538 | ld a,(hexedhgt) |
|
| 530 | ld a,d |
539 | dec a |
| 531 | cp hexeditor_HGT-1 |
540 | cp d |
| 532 | ld a,c |
541 | ld a,c |
| 533 | jr z,hexeditor_pgdown_doq |
542 | jr z,hexeditor_pgdown_doq |
| 534 | call nvhex_calcnextcorrectxy |
543 | call nvhex_calcnextcorrectxy |
| 535 | jr c,hexeditor_pgdown_do0 |
544 | jr c,hexeditor_pgdown_do0 |
| 536 | hexeditor_pgdown_doq |
545 | hexeditor_pgdown_doq |
| Line 548... | Line 557... | ||
| 548 | dec d |
557 | dec d |
| 549 | ld (hexcuraddrxy),de |
558 | ld (hexcuraddrxy),de |
| 550 | ret |
559 | ret |
| 551 | hexeditor_up_scroll |
560 | hexeditor_up_scroll |
| 552 | ld de,hexeditor_XYTOP |
561 | ld de,hexeditor_XYTOP |
| 553 | ld hl,256*hexeditor_HGT + hexeditor_WID |
562 | ;ld hl,256*hexeditor_HGT + hexeditor_WID |
| - | 563 | ld hl,(hexedhgt-1) ;h |
|
| - | 564 | ld l,hexeditor_WID |
|
| 554 | if PRSTDIO |
565 | if PRSTDIO |
| 555 | call scrolldown |
566 | call scrolldown |
| 556 | else |
567 | else |
| 557 | OS_SCROLLDOWN |
568 | OS_SCROLLDOWN |
| 558 | endif |
569 | endif |
| Line 569... | Line 580... | ||
| 569 | call nvhex_calccuraddrline |
580 | call nvhex_calccuraddrline |
| 570 | ld de,(hexcuraddrxy) |
581 | ld de,(hexcuraddrxy) |
| 571 | call nvhex_calcnextcorrectxy |
582 | call nvhex_calcnextcorrectxy |
| 572 | ret nc |
583 | ret nc |
| 573 | ld c,a |
584 | ld c,a |
| - | 585 | ;ld a,hexeditor_HGT;-1 |
|
| - | 586 | ld a,(hexedhgt) |
|
| 574 | ld a,d |
587 | ;dec a |
| 575 | cp hexeditor_HGT |
588 | cp d |
| 576 | ld a,c |
589 | ld a,c |
| 577 | jr z,hexeditor_down_scroll |
590 | jr z,hexeditor_down_scroll |
| 578 | ld (hexcuraddrxy),de |
591 | ld (hexcuraddrxy),de |
| 579 | ret |
592 | ret |
| 580 | hexeditor_down_scroll |
593 | hexeditor_down_scroll |
| Line 586... | Line 599... | ||
| 586 | push af |
599 | push af |
| 587 | push hl |
600 | push hl |
| 588 | ld a,e |
601 | ld a,e |
| 589 | ld (hexcuraddrx),a |
602 | ld (hexcuraddrx),a |
| 590 | ld de,hexeditor_XYTOP |
603 | ld de,hexeditor_XYTOP |
| 591 | ld hl,256*hexeditor_HGT + hexeditor_WID |
604 | ;ld hl,256*hexeditor_HGT + hexeditor_WID |
| - | 605 | ld hl,(hexedhgt-1) ;h |
|
| - | 606 | ld l,hexeditor_WID |
|
| - | 607 | push de |
|
| - | 608 | push hl |
|
| 592 | if PRSTDIO |
609 | if PRSTDIO |
| 593 | call scrollup |
610 | call scrollup |
| 594 | else |
611 | else |
| 595 | OS_SCROLLUP |
612 | OS_SCROLLUP |
| 596 | endif |
613 | endif |
| 597 | ld de,hexeditor_XYTOP+((hexeditor_HGT-1)*256) |
614 | ;ld de,hexeditor_XYTOP+((hexeditor_HGT-1)*256) |
| - | 615 | pop hl |
|
| - | 616 | pop de |
|
| - | 617 | dec h |
|
| - | 618 | ld l,0 |
|
| - | 619 | add hl,de |
|
| - | 620 | ex de,hl ;de=hexeditor_XYTOP+((hexeditor_HGT-1)*256) |
|
| 598 | call nv_setxy ;keeps de,hl,ix |
621 | call nv_setxy ;keeps de,hl,ix |
| 599 | ld hl,(hexaddrline) |
622 | ld hl,(hexaddrline) |
| 600 | ld a,(hexaddrlineHSB) |
623 | ld a,(hexaddrlineHSB) |
| 601 | ld bc,16 |
624 | ld bc,16 |
| 602 | add hl,bc |
625 | add hl,bc |