From 132d72d28a63e58ec7f5e6fc955be140ee5844b0 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 11 Oct 2021 21:35:16 -0700 Subject: . --- html/shell/trace.mu.html | 1058 +++++++++++++++++++++++----------------------- 1 file changed, 529 insertions(+), 529 deletions(-) (limited to 'html/shell/trace.mu.html') diff --git a/html/shell/trace.mu.html b/html/shell/trace.mu.html index c6ef024e..863f622e 100644 --- a/html/shell/trace.mu.html +++ b/html/shell/trace.mu.html @@ -514,7 +514,7 @@ if ('onhashchange' in window) { 449 copy-to *dest, 0/false 450 } 451 - 452 fn render-trace screen: (addr screen), _self: (addr trace), xmin: int, ymin: int, xmax: int, ymax: int, show-cursor?: boolean -> _/ecx: int { + 452 fn render-trace screen: (addr screen), _self: (addr trace), xmin: int, ymin: int, xmax: int, ymax: int, show-cursor?: boolean -> _/ecx: int { 453 var already-hiding-lines?: boolean 454 var self/esi: (addr trace) <- copy _self 455 compare self, 0 @@ -553,13 +553,13 @@ if ('onhashchange' in window) { 488 { 489 var width/eax: int <- copy 0 490 var height/ecx: int <- copy 0 - 491 width, height <- screen-size screen + 491 width, height <- screen-size screen 492 compare width, 0x80 493 break-if-< $render-trace:render-depth 494 } - 495 set-cursor-position screen, 0x70/x, y - 496 draw-text-rightward-from-cursor-over-full-screen screen, "trace depth: ", 0x17/fg, 0xc5/bg=blue-bg - 497 draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen screen, *max-depth, 0x7/fg, 0xc5/bg=blue-bg + 495 set-cursor-position screen, 0x70/x, y + 496 draw-text-rightward-from-cursor-over-full-screen screen, "trace depth: ", 0x17/fg, 0xc5/bg=blue-bg + 497 draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen screen, *max-depth, 0x7/fg, 0xc5/bg=blue-bg 498 } 499 var top-line-addr/edx: (addr int) <- get self, top-line-index 500 var i/edx: int <- copy *top-line-addr @@ -593,7 +593,7 @@ if ('onhashchange' in window) { 528 var curr-depth/eax: (addr int) <- get curr, depth 529 compare *curr-depth, 0/error 530 break-if-!= - 531 y <- render-trace-line screen, curr, xmin, y, xmax, ymax, 0xc/fg=trace-error, bg, 0/clip + 531 y <- render-trace-line screen, curr, xmin, y, xmax, ymax, 0xc/fg=trace-error, bg, 0/clip 532 copy-to already-hiding-lines?, 0/false 533 break $render-trace:iter 534 } @@ -603,7 +603,7 @@ if ('onhashchange' in window) { 538 compare display?, 0/false 539 break-if-= 540 var unclip-cursor-line?/eax: boolean <- unclip-cursor-line? self, i - 541 y <- render-trace-line screen, curr, xmin, y, xmax, ymax, fg, bg, unclip-cursor-line? + 541 y <- render-trace-line screen, curr, xmin, y, xmax, ymax, fg, bg, unclip-cursor-line? 542 copy-to already-hiding-lines?, 0/false 543 break $render-trace:iter 544 } @@ -612,7 +612,7 @@ if ('onhashchange' in window) { 547 { 548 break-if-!= 549 var x/eax: int <- copy xmin - 550 x, y <- draw-text-wrapping-right-then-down screen, "...", xmin, ymin, xmax, ymax, x, y, fg, bg + 550 x, y <- draw-text-wrapping-right-then-down screen, "...", xmin, ymin, xmax, ymax, x, y, fg, bg 551 y <- increment 552 copy-to already-hiding-lines?, 1/true 553 } @@ -621,7 +621,7 @@ if ('onhashchange' in window) { 556 loop 557 } 558 # prevent cursor from going too far down - 559 clamp-cursor-to-bottom self, y, screen, xmin, ymin, xmax, ymax + 559 clamp-cursor-to-bottom self, y, screen, xmin, ymin, xmax, ymax 560 return y 561 } 562 @@ -644,7 +644,7 @@ if ('onhashchange' in window) { 579 return 1/true 580 } 581 - 582 fn render-trace-line screen: (addr screen), _self: (addr trace-line), xmin: int, ymin: int, xmax: int, ymax: int, fg: int, bg: int, unclip?: boolean -> _/ecx: int { + 582 fn render-trace-line screen: (addr screen), _self: (addr trace-line), xmin: int, ymin: int, xmax: int, ymax: int, fg: int, bg: int, unclip?: boolean -> _/ecx: int { 583 var self/esi: (addr trace-line) <- copy _self 584 var xsave/edx: int <- copy xmin 585 var y/ecx: int <- copy ymin @@ -655,8 +655,8 @@ if ('onhashchange' in window) { 590 break-if-= 591 var x/eax: int <- copy xsave 592 { - 593 x, y <- draw-int32-decimal-wrapping-right-then-down screen, *depth-a, xmin, ymin, xmax, ymax, x, y, fg, bg - 594 x, y <- draw-text-wrapping-right-then-down screen, " ", xmin, ymin, xmax, ymax, x, y, fg, bg + 593 x, y <- draw-int32-decimal-wrapping-right-then-down screen, *depth-a, xmin, ymin, xmax, ymax, x, y, fg, bg + 594 x, y <- draw-text-wrapping-right-then-down screen, " ", xmin, ymin, xmax, ymax, x, y, fg, bg 595 # don't show label in UI; it's just for tests 596 } 597 xsave <- copy x @@ -668,12 +668,12 @@ if ('onhashchange' in window) { 603 compare unclip?, 0/false 604 { 605 break-if-= - 606 x, y <- draw-text-wrapping-right-then-down screen, data, xmin, ymin, xmax, ymax, x, y, fg, bg + 606 x, y <- draw-text-wrapping-right-then-down screen, data, xmin, ymin, xmax, ymax, x, y, fg, bg 607 } 608 compare unclip?, 0/false 609 { 610 break-if-!= - 611 x <- draw-text-rightward screen, data, x, xmax, y, fg, bg + 611 x <- draw-text-rightward screen, data, x, xmax, y, fg, bg 612 } 613 y <- increment 614 return y @@ -745,7 +745,7 @@ if ('onhashchange' in window) { 680 681 # extremely hacky; consider deleting test-render-trace-empty-3 when you clean this up 682 # TODO: duplicates logic for rendering a line - 683 fn clamp-cursor-to-bottom _self: (addr trace), _y: int, screen: (addr screen), xmin: int, ymin: int, xmax: int, ymax: int { + 683 fn clamp-cursor-to-bottom _self: (addr trace), _y: int, screen: (addr screen), xmin: int, ymin: int, xmax: int, ymax: int { 684 var y/ebx: int <- copy _y 685 compare y, ymin 686 { @@ -775,12 +775,12 @@ if ('onhashchange' in window) { 710 { 711 compare display?, 0/false 712 break-if-= - 713 var dummy/ecx: int <- render-trace-line screen, cursor-line, xmin, y, xmax, ymax, 0x38/fg=trace, 7/cursor-line-bg, 0/clip + 713 var dummy/ecx: int <- render-trace-line screen, cursor-line, xmin, y, xmax, ymax, 0x38/fg=trace, 7/cursor-line-bg, 0/clip 714 return 715 } 716 var dummy1/eax: int <- copy 0 717 var dummy2/ecx: int <- copy 0 - 718 dummy1, dummy2 <- draw-text-wrapping-right-then-down screen, "...", xmin, ymin, xmax, ymax, xmin, y, 9/fg=trace, 7/cursor-line-bg + 718 dummy1, dummy2 <- draw-text-wrapping-right-then-down screen, "...", xmin, ymin, xmax, ymax, xmin, y, 9/fg=trace, 7/cursor-line-bg 719 } 720 721 fn test-render-trace-empty { @@ -788,15 +788,15 @@ if ('onhashchange' in window) { 723 var t/esi: (addr trace) <- address t-storage 724 initialize-trace t, 0x100/max-depth, 0x10, 0x10 725 # setup: screen - 726 var screen-on-stack: screen - 727 var screen/edi: (addr screen) <- address screen-on-stack - 728 initialize-screen screen, 5/width, 4/height, 0/no-pixel-graphics + 726 var screen-on-stack: screen + 727 var screen/edi: (addr screen) <- address screen-on-stack + 728 initialize-screen screen, 5/width, 4/height, 0/no-pixel-graphics 729 # - 730 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 5/xmax, 4/ymax, 0/no-cursor + 730 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 5/xmax, 4/ymax, 0/no-cursor 731 # 732 check-ints-equal y, 0, "F - test-render-trace-empty/cursor" - 733 check-screen-row screen, 0/y, " ", "F - test-render-trace-empty" - 734 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-render-trace-empty/bg" + 733 check-screen-row screen, 0/y, " ", "F - test-render-trace-empty" + 734 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-render-trace-empty/bg" 735 } 736 737 fn test-render-trace-empty-2 { @@ -804,15 +804,15 @@ if ('onhashchange' in window) { 739 var t/esi: (addr trace) <- address t-storage 740 initialize-trace t, 0x100/max-depth, 0x10, 0x10 741 # setup: screen - 742 var screen-on-stack: screen - 743 var screen/edi: (addr screen) <- address screen-on-stack - 744 initialize-screen screen, 5/width, 4/height, 0/no-pixel-graphics + 742 var screen-on-stack: screen + 743 var screen/edi: (addr screen) <- address screen-on-stack + 744 initialize-screen screen, 5/width, 4/height, 0/no-pixel-graphics 745 # - 746 var y/ecx: int <- render-trace screen, t, 0/xmin, 2/ymin, 5/xmax, 4/ymax, 0/no-cursor # cursor below top row + 746 var y/ecx: int <- render-trace screen, t, 0/xmin, 2/ymin, 5/xmax, 4/ymax, 0/no-cursor # cursor below top row 747 # 748 check-ints-equal y, 2, "F - test-render-trace-empty-2/cursor" - 749 check-screen-row screen, 2/y, " ", "F - test-render-trace-empty-2" - 750 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-render-trace-empty-2/bg" + 749 check-screen-row screen, 2/y, " ", "F - test-render-trace-empty-2" + 750 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-render-trace-empty-2/bg" 751 } 752 753 fn test-render-trace-empty-3 { @@ -820,17 +820,17 @@ if ('onhashchange' in window) { 755 var t/esi: (addr trace) <- address t-storage 756 initialize-trace t, 0x100/max-depth, 0x10, 0x10 757 # setup: screen - 758 var screen-on-stack: screen - 759 var screen/edi: (addr screen) <- address screen-on-stack - 760 initialize-screen screen, 5/width, 4/height, 0/no-pixel-graphics + 758 var screen-on-stack: screen + 759 var screen/edi: (addr screen) <- address screen-on-stack + 760 initialize-screen screen, 5/width, 4/height, 0/no-pixel-graphics 761 # - 762 var y/ecx: int <- render-trace screen, t, 0/xmin, 2/ymin, 5/xmax, 4/ymax, 1/show-cursor # try show cursor + 762 var y/ecx: int <- render-trace screen, t, 0/xmin, 2/ymin, 5/xmax, 4/ymax, 1/show-cursor # try show cursor 763 # still no cursor to show 764 check-ints-equal y, 2, "F - test-render-trace-empty-3/cursor" - 765 check-screen-row screen, 1/y, " ", "F - test-render-trace-empty-3/line-above-cursor" - 766 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-render-trace-empty-3/bg-for-line-above-cursor" - 767 check-screen-row screen, 2/y, " ", "F - test-render-trace-empty-3" - 768 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-render-trace-empty-3/bg" + 765 check-screen-row screen, 1/y, " ", "F - test-render-trace-empty-3/line-above-cursor" + 766 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-render-trace-empty-3/bg-for-line-above-cursor" + 767 check-screen-row screen, 2/y, " ", "F - test-render-trace-empty-3" + 768 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-render-trace-empty-3/bg" 769 } 770 771 fn test-render-trace-collapsed-by-default { @@ -839,14 +839,14 @@ if ('onhashchange' in window) { 774 initialize-trace t, 0x100/max-depth, 0x10, 0x10 775 trace-text t, "l", "data" 776 # setup: screen - 777 var screen-on-stack: screen - 778 var screen/edi: (addr screen) <- address screen-on-stack - 779 initialize-screen screen, 5/width, 4/height, 0/no-pixel-graphics + 777 var screen-on-stack: screen + 778 var screen/edi: (addr screen) <- address screen-on-stack + 779 initialize-screen screen, 5/width, 4/height, 0/no-pixel-graphics 780 # - 781 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 5/xmax, 4/ymax, 0/no-cursor + 781 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 5/xmax, 4/ymax, 0/no-cursor 782 # 783 check-ints-equal y, 1, "F - test-render-trace-collapsed-by-default/cursor" - 784 check-screen-row screen, 0/y, "... ", "F - test-render-trace-collapsed-by-default" + 784 check-screen-row screen, 0/y, "... ", "F - test-render-trace-collapsed-by-default" 785 } 786 787 fn test-render-trace-error { @@ -855,14 +855,14 @@ if ('onhashchange' in window) { 790 initialize-trace t, 0x100/max-depth, 0x10, 0x10 791 error t, "error" 792 # setup: screen - 793 var screen-on-stack: screen - 794 var screen/edi: (addr screen) <- address screen-on-stack - 795 initialize-screen screen, 0xa/width, 4/height, 0/no-pixel-graphics + 793 var screen-on-stack: screen + 794 var screen/edi: (addr screen) <- address screen-on-stack + 795 initialize-screen screen, 0xa/width, 4/height, 0/no-pixel-graphics 796 # - 797 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 0/no-cursor + 797 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 0/no-cursor 798 # 799 check-ints-equal y, 1, "F - test-render-trace-error/cursor" - 800 check-screen-row screen, 0/y, "error", "F - test-render-trace-error" + 800 check-screen-row screen, 0/y, "error", "F - test-render-trace-error" 801 } 802 803 fn test-render-trace-error-at-start { @@ -873,15 +873,15 @@ if ('onhashchange' in window) { 808 error t, "error" 809 trace-text t, "l", "data" 810 # setup: screen - 811 var screen-on-stack: screen - 812 var screen/edi: (addr screen) <- address screen-on-stack - 813 initialize-screen screen, 0xa/width, 4/height, 0/no-pixel-graphics + 811 var screen-on-stack: screen + 812 var screen/edi: (addr screen) <- address screen-on-stack + 813 initialize-screen screen, 0xa/width, 4/height, 0/no-pixel-graphics 814 # - 815 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 0/no-cursor + 815 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 0/no-cursor 816 # 817 check-ints-equal y, 2, "F - test-render-trace-error-at-start/cursor" - 818 check-screen-row screen, 0/y, "error", "F - test-render-trace-error-at-start/0" - 819 check-screen-row screen, 1/y, "... ", "F - test-render-trace-error-at-start/1" + 818 check-screen-row screen, 0/y, "error", "F - test-render-trace-error-at-start/0" + 819 check-screen-row screen, 1/y, "... ", "F - test-render-trace-error-at-start/1" 820 } 821 822 fn test-render-trace-error-at-end { @@ -892,15 +892,15 @@ if ('onhashchange' in window) { 827 trace-text t, "l", "data" 828 error t, "error" 829 # setup: screen - 830 var screen-on-stack: screen - 831 var screen/edi: (addr screen) <- address screen-on-stack - 832 initialize-screen screen, 0xa/width, 4/height, 0/no-pixel-graphics + 830 var screen-on-stack: screen + 831 var screen/edi: (addr screen) <- address screen-on-stack + 832 initialize-screen screen, 0xa/width, 4/height, 0/no-pixel-graphics 833 # - 834 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 0/no-cursor + 834 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 0/no-cursor 835 # 836 check-ints-equal y, 2, "F - test-render-trace-error-at-end/cursor" - 837 check-screen-row screen, 0/y, "... ", "F - test-render-trace-error-at-end/0" - 838 check-screen-row screen, 1/y, "error", "F - test-render-trace-error-at-end/1" + 837 check-screen-row screen, 0/y, "... ", "F - test-render-trace-error-at-end/0" + 838 check-screen-row screen, 1/y, "error", "F - test-render-trace-error-at-end/1" 839 } 840 841 fn test-render-trace-error-in-the-middle { @@ -912,16 +912,16 @@ if ('onhashchange' in window) { 847 error t, "error" 848 trace-text t, "l", "line 3" 849 # setup: screen - 850 var screen-on-stack: screen - 851 var screen/edi: (addr screen) <- address screen-on-stack - 852 initialize-screen screen, 0xa/width, 4/height, 0/no-pixel-graphics + 850 var screen-on-stack: screen + 851 var screen/edi: (addr screen) <- address screen-on-stack + 852 initialize-screen screen, 0xa/width, 4/height, 0/no-pixel-graphics 853 # - 854 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 0/no-cursor + 854 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 0/no-cursor 855 # 856 check-ints-equal y, 3, "F - test-render-trace-error-in-the-middle/cursor" - 857 check-screen-row screen, 0/y, "... ", "F - test-render-trace-error-in-the-middle/0" - 858 check-screen-row screen, 1/y, "error", "F - test-render-trace-error-in-the-middle/1" - 859 check-screen-row screen, 2/y, "... ", "F - test-render-trace-error-in-the-middle/2" + 857 check-screen-row screen, 0/y, "... ", "F - test-render-trace-error-in-the-middle/0" + 858 check-screen-row screen, 1/y, "error", "F - test-render-trace-error-in-the-middle/1" + 859 check-screen-row screen, 2/y, "... ", "F - test-render-trace-error-in-the-middle/2" 860 } 861 862 fn test-render-trace-cursor-in-single-line { @@ -933,40 +933,40 @@ if ('onhashchange' in window) { 868 error t, "error" 869 trace-text t, "l", "line 3" 870 # setup: screen - 871 var screen-on-stack: screen - 872 var screen/edi: (addr screen) <- address screen-on-stack - 873 initialize-screen screen, 0xa/width, 4/height, 0/no-pixel-graphics + 871 var screen-on-stack: screen + 872 var screen/edi: (addr screen) <- address screen-on-stack + 873 initialize-screen screen, 0xa/width, 4/height, 0/no-pixel-graphics 874 # - 875 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 1/show-cursor + 875 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 1/show-cursor 876 # - 877 check-screen-row screen, 0/y, "... ", "F - test-render-trace-cursor-in-single-line/0" - 878 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-render-trace-cursor-in-single-line/0/cursor" - 879 check-screen-row screen, 1/y, "error ", "F - test-render-trace-cursor-in-single-line/1" - 880 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-render-trace-cursor-in-single-line/1/cursor" - 881 check-screen-row screen, 2/y, "... ", "F - test-render-trace-cursor-in-single-line/2" - 882 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-render-trace-cursor-in-single-line/2/cursor" + 877 check-screen-row screen, 0/y, "... ", "F - test-render-trace-cursor-in-single-line/0" + 878 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-render-trace-cursor-in-single-line/0/cursor" + 879 check-screen-row screen, 1/y, "error ", "F - test-render-trace-cursor-in-single-line/1" + 880 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-render-trace-cursor-in-single-line/1/cursor" + 881 check-screen-row screen, 2/y, "... ", "F - test-render-trace-cursor-in-single-line/2" + 882 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-render-trace-cursor-in-single-line/2/cursor" 883 } 884 - 885 fn render-trace-menu screen: (addr screen) { + 885 fn render-trace-menu screen: (addr screen) { 886 var width/eax: int <- copy 0 887 var height/ecx: int <- copy 0 - 888 width, height <- screen-size screen + 888 width, height <- screen-size screen 889 var y/ecx: int <- copy height 890 y <- decrement 891 var height/edx: int <- copy y 892 height <- increment - 893 clear-rect screen, 0/x, y, width, height, 0xc5/bg=blue-bg - 894 set-cursor-position screen, 0/x, y - 895 draw-text-rightward-from-cursor screen, " ^r ", width, 0/fg, 0x5c/bg=menu-highlight - 896 draw-text-rightward-from-cursor screen, " run main ", width, 7/fg, 0xc5/bg=blue-bg - 897 draw-text-rightward-from-cursor screen, " ^g ", width, 0/fg, 0x5c/bg=menu-highlight - 898 draw-text-rightward-from-cursor screen, " go to ", width, 7/fg, 0xc5/bg=blue-bg - 899 draw-text-rightward-from-cursor screen, " ^m ", width, 0/fg, 3/bg=keyboard - 900 draw-text-rightward-from-cursor screen, " to keyboard ", width, 7/fg, 0xc5/bg=blue-bg - 901 draw-text-rightward-from-cursor screen, " enter/bksp ", width, 0/fg, 0x5c/bg=menu-highlight - 902 draw-text-rightward-from-cursor screen, " expand/collapse ", width, 7/fg, 0xc5/bg=blue-bg - 903 draw-text-rightward-from-cursor screen, " ^s ", width, 0/fg, 0x5c/bg=menu-highlight - 904 draw-text-rightward-from-cursor screen, " show whole line ", width, 7/fg, 0xc5/bg=blue-bg + 893 clear-rect screen, 0/x, y, width, height, 0xc5/bg=blue-bg + 894 set-cursor-position screen, 0/x, y + 895 draw-text-rightward-from-cursor screen, " ^r ", width, 0/fg, 0x5c/bg=menu-highlight + 896 draw-text-rightward-from-cursor screen, " run main ", width, 7/fg, 0xc5/bg=blue-bg + 897 draw-text-rightward-from-cursor screen, " ^g ", width, 0/fg, 0x5c/bg=menu-highlight + 898 draw-text-rightward-from-cursor screen, " go to ", width, 7/fg, 0xc5/bg=blue-bg + 899 draw-text-rightward-from-cursor screen, " ^m ", width, 0/fg, 3/bg=keyboard + 900 draw-text-rightward-from-cursor screen, " to keyboard ", width, 7/fg, 0xc5/bg=blue-bg + 901 draw-text-rightward-from-cursor screen, " enter/bksp ", width, 0/fg, 0x5c/bg=menu-highlight + 902 draw-text-rightward-from-cursor screen, " expand/collapse ", width, 7/fg, 0xc5/bg=blue-bg + 903 draw-text-rightward-from-cursor screen, " ^s ", width, 0/fg, 0x5c/bg=menu-highlight + 904 draw-text-rightward-from-cursor screen, " show whole line ", width, 7/fg, 0xc5/bg=blue-bg 905 } 906 907 fn edit-trace _self: (addr trace), key: grapheme { @@ -1239,38 +1239,38 @@ if ('onhashchange' in window) { 1174 error t, "error" 1175 trace-text t, "l", "line 3" 1176 # setup: screen -1177 var screen-on-stack: screen -1178 var screen/edi: (addr screen) <- address screen-on-stack -1179 initialize-screen screen, 0xa/width, 4/height, 0/no-pixel-graphics +1177 var screen-on-stack: screen +1178 var screen/edi: (addr screen) <- address screen-on-stack +1179 initialize-screen screen, 0xa/width, 4/height, 0/no-pixel-graphics 1180 # -1181 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 1/show-cursor +1181 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 1/show-cursor 1182 # -1183 check-screen-row screen, 0/y, "... ", "F - test-cursor-down-and-up-within-trace/pre-0" -1184 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-cursor-down-and-up-within-trace/pre-0/cursor" -1185 check-screen-row screen, 1/y, "error ", "F - test-cursor-down-and-up-within-trace/pre-1" -1186 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-cursor-down-and-up-within-trace/pre-1/cursor" -1187 check-screen-row screen, 2/y, "... ", "F - test-cursor-down-and-up-within-trace/pre-2" -1188 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-cursor-down-and-up-within-trace/pre-2/cursor" +1183 check-screen-row screen, 0/y, "... ", "F - test-cursor-down-and-up-within-trace/pre-0" +1184 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-cursor-down-and-up-within-trace/pre-0/cursor" +1185 check-screen-row screen, 1/y, "error ", "F - test-cursor-down-and-up-within-trace/pre-1" +1186 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-cursor-down-and-up-within-trace/pre-1/cursor" +1187 check-screen-row screen, 2/y, "... ", "F - test-cursor-down-and-up-within-trace/pre-2" +1188 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-cursor-down-and-up-within-trace/pre-2/cursor" 1189 # cursor down 1190 edit-trace t, 0x6a/j -1191 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 1/show-cursor +1191 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 1/show-cursor 1192 # -1193 check-screen-row screen, 0/y, "... ", "F - test-cursor-down-and-up-within-trace/down-0" -1194 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-cursor-down-and-up-within-trace/down-0/cursor" -1195 check-screen-row screen, 1/y, "error ", "F - test-cursor-down-and-up-within-trace/down-1" -1196 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, "||||| ", "F - test-cursor-down-and-up-within-trace/down-1/cursor" -1197 check-screen-row screen, 2/y, "... ", "F - test-cursor-down-and-up-within-trace/down-2" -1198 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-cursor-down-and-up-within-trace/down-2/cursor" +1193 check-screen-row screen, 0/y, "... ", "F - test-cursor-down-and-up-within-trace/down-0" +1194 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-cursor-down-and-up-within-trace/down-0/cursor" +1195 check-screen-row screen, 1/y, "error ", "F - test-cursor-down-and-up-within-trace/down-1" +1196 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, "||||| ", "F - test-cursor-down-and-up-within-trace/down-1/cursor" +1197 check-screen-row screen, 2/y, "... ", "F - test-cursor-down-and-up-within-trace/down-2" +1198 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-cursor-down-and-up-within-trace/down-2/cursor" 1199 # cursor up 1200 edit-trace t, 0x6b/k -1201 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 1/show-cursor +1201 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 1/show-cursor 1202 # -1203 check-screen-row screen, 0/y, "... ", "F - test-cursor-down-and-up-within-trace/up-0" -1204 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-cursor-down-and-up-within-trace/up-0/cursor" -1205 check-screen-row screen, 1/y, "error ", "F - test-cursor-down-and-up-within-trace/up-1" -1206 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-cursor-down-and-up-within-trace/up-1/cursor" -1207 check-screen-row screen, 2/y, "... ", "F - test-cursor-down-and-up-within-trace/up-2" -1208 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-cursor-down-and-up-within-trace/up-2/cursor" +1203 check-screen-row screen, 0/y, "... ", "F - test-cursor-down-and-up-within-trace/up-0" +1204 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-cursor-down-and-up-within-trace/up-0/cursor" +1205 check-screen-row screen, 1/y, "error ", "F - test-cursor-down-and-up-within-trace/up-1" +1206 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-cursor-down-and-up-within-trace/up-1/cursor" +1207 check-screen-row screen, 2/y, "... ", "F - test-cursor-down-and-up-within-trace/up-2" +1208 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-cursor-down-and-up-within-trace/up-2/cursor" 1209 } 1210 1211 fn test-cursor-down-past-bottom-of-trace { @@ -1282,18 +1282,18 @@ if ('onhashchange' in window) { 1217 error t, "error" 1218 trace-text t, "l", "line 3" 1219 # setup: screen -1220 var screen-on-stack: screen -1221 var screen/edi: (addr screen) <- address screen-on-stack -1222 initialize-screen screen, 0xa/width, 4/height, 0/no-pixel-graphics +1220 var screen-on-stack: screen +1221 var screen/edi: (addr screen) <- address screen-on-stack +1222 initialize-screen screen, 0xa/width, 4/height, 0/no-pixel-graphics 1223 # -1224 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 1/show-cursor +1224 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 1/show-cursor 1225 # -1226 check-screen-row screen, 0/y, "... ", "F - test-cursor-down-past-bottom-of-trace/pre-0" -1227 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-cursor-down-past-bottom-of-trace/pre-0/cursor" -1228 check-screen-row screen, 1/y, "error ", "F - test-cursor-down-past-bottom-of-trace/pre-1" -1229 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-cursor-down-past-bottom-of-trace/pre-1/cursor" -1230 check-screen-row screen, 2/y, "... ", "F - test-cursor-down-past-bottom-of-trace/pre-2" -1231 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-cursor-down-past-bottom-of-trace/pre-2/cursor" +1226 check-screen-row screen, 0/y, "... ", "F - test-cursor-down-past-bottom-of-trace/pre-0" +1227 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-cursor-down-past-bottom-of-trace/pre-0/cursor" +1228 check-screen-row screen, 1/y, "error ", "F - test-cursor-down-past-bottom-of-trace/pre-1" +1229 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-cursor-down-past-bottom-of-trace/pre-1/cursor" +1230 check-screen-row screen, 2/y, "... ", "F - test-cursor-down-past-bottom-of-trace/pre-2" +1231 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-cursor-down-past-bottom-of-trace/pre-2/cursor" 1232 # cursor down several times 1233 edit-trace t, 0x6a/j 1234 edit-trace t, 0x6a/j @@ -1301,14 +1301,14 @@ if ('onhashchange' in window) { 1236 edit-trace t, 0x6a/j 1237 edit-trace t, 0x6a/j 1238 # hack: we do need to render to make this test pass; we're mixing state management with rendering -1239 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 1/show-cursor +1239 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0xa/xmax, 4/ymax, 1/show-cursor 1240 # cursor clamps at bottom -1241 check-screen-row screen, 0/y, "... ", "F - test-cursor-down-past-bottom-of-trace/down-0" -1242 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-cursor-down-past-bottom-of-trace/down-0/cursor" -1243 check-screen-row screen, 1/y, "error ", "F - test-cursor-down-past-bottom-of-trace/down-1" -1244 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-cursor-down-past-bottom-of-trace/down-1/cursor" -1245 check-screen-row screen, 2/y, "... ", "F - test-cursor-down-past-bottom-of-trace/down-2" -1246 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "||| ", "F - test-cursor-down-past-bottom-of-trace/down-2/cursor" +1241 check-screen-row screen, 0/y, "... ", "F - test-cursor-down-past-bottom-of-trace/down-0" +1242 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-cursor-down-past-bottom-of-trace/down-0/cursor" +1243 check-screen-row screen, 1/y, "error ", "F - test-cursor-down-past-bottom-of-trace/down-1" +1244 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-cursor-down-past-bottom-of-trace/down-1/cursor" +1245 check-screen-row screen, 2/y, "... ", "F - test-cursor-down-past-bottom-of-trace/down-2" +1246 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "||| ", "F - test-cursor-down-past-bottom-of-trace/down-2/cursor" 1247 } 1248 1249 fn test-expand-within-trace { @@ -1319,26 +1319,26 @@ if ('onhashchange' in window) { 1254 trace-text t, "l", "line 1" 1255 trace-text t, "l", "line 2" 1256 # setup: screen -1257 var screen-on-stack: screen -1258 var screen/edi: (addr screen) <- address screen-on-stack -1259 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics +1257 var screen-on-stack: screen +1258 var screen/edi: (addr screen) <- address screen-on-stack +1259 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics 1260 # -1261 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1261 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1262 # -1263 check-screen-row screen, 0/y, "... ", "F - test-expand-within-trace/pre-0" -1264 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-expand-within-trace/pre-0/cursor" -1265 check-screen-row screen, 1/y, " ", "F - test-expand-within-trace/pre-1" -1266 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-expand-within-trace/pre-1/cursor" +1263 check-screen-row screen, 0/y, "... ", "F - test-expand-within-trace/pre-0" +1264 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-expand-within-trace/pre-0/cursor" +1265 check-screen-row screen, 1/y, " ", "F - test-expand-within-trace/pre-1" +1266 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-expand-within-trace/pre-1/cursor" 1267 # expand 1268 edit-trace t, 0xa/enter -1269 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1269 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1270 # -1271 check-screen-row screen, 0/y, "1 line 1 ", "F - test-expand-within-trace/expand-0" -1272 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-expand-within-trace/expand-0/cursor" -1273 check-screen-row screen, 1/y, "1 line 2 ", "F - test-expand-within-trace/expand-1" -1274 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-expand-within-trace/expand-1/cursor" -1275 check-screen-row screen, 2/y, " ", "F - test-expand-within-trace/expand-2" -1276 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-expand-within-trace/expand-2/cursor" +1271 check-screen-row screen, 0/y, "1 line 1 ", "F - test-expand-within-trace/expand-0" +1272 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-expand-within-trace/expand-0/cursor" +1273 check-screen-row screen, 1/y, "1 line 2 ", "F - test-expand-within-trace/expand-1" +1274 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-expand-within-trace/expand-1/cursor" +1275 check-screen-row screen, 2/y, " ", "F - test-expand-within-trace/expand-2" +1276 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-expand-within-trace/expand-2/cursor" 1277 } 1278 1279 fn test-trace-expand-skips-lower-depth { @@ -1350,26 +1350,26 @@ if ('onhashchange' in window) { 1285 trace-lower t 1286 trace-text t, "l", "line 2" 1287 # setup: screen -1288 var screen-on-stack: screen -1289 var screen/edi: (addr screen) <- address screen-on-stack -1290 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics +1288 var screen-on-stack: screen +1289 var screen/edi: (addr screen) <- address screen-on-stack +1290 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics 1291 # -1292 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1292 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1293 # -1294 check-screen-row screen, 0/y, "... ", "F - test-trace-expand-skips-lower-depth/pre-0" -1295 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-expand-skips-lower-depth/pre-0/cursor" -1296 check-screen-row screen, 1/y, " ", "F - test-trace-expand-skips-lower-depth/pre-1" -1297 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-skips-lower-depth/pre-1/cursor" +1294 check-screen-row screen, 0/y, "... ", "F - test-trace-expand-skips-lower-depth/pre-0" +1295 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-expand-skips-lower-depth/pre-0/cursor" +1296 check-screen-row screen, 1/y, " ", "F - test-trace-expand-skips-lower-depth/pre-1" +1297 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-skips-lower-depth/pre-1/cursor" 1298 # expand 1299 edit-trace t, 0xa/enter -1300 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1300 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1301 # -1302 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-expand-skips-lower-depth/expand-0" -1303 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-expand-skips-lower-depth/expand-0/cursor" -1304 check-screen-row screen, 1/y, "... ", "F - test-trace-expand-skips-lower-depth/expand-1" -1305 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-skips-lower-depth/expand-1/cursor" -1306 check-screen-row screen, 2/y, " ", "F - test-trace-expand-skips-lower-depth/expand-2" -1307 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-expand-skips-lower-depth/expand-2/cursor" +1302 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-expand-skips-lower-depth/expand-0" +1303 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-expand-skips-lower-depth/expand-0/cursor" +1304 check-screen-row screen, 1/y, "... ", "F - test-trace-expand-skips-lower-depth/expand-1" +1305 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-skips-lower-depth/expand-1/cursor" +1306 check-screen-row screen, 2/y, " ", "F - test-trace-expand-skips-lower-depth/expand-2" +1307 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-expand-skips-lower-depth/expand-2/cursor" 1308 } 1309 1310 fn test-trace-expand-continues-past-lower-depth { @@ -1383,27 +1383,27 @@ if ('onhashchange' in window) { 1318 trace-higher t 1319 trace-text t, "l", "line 2" 1320 # setup: screen -1321 var screen-on-stack: screen -1322 var screen/edi: (addr screen) <- address screen-on-stack -1323 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics +1321 var screen-on-stack: screen +1322 var screen/edi: (addr screen) <- address screen-on-stack +1323 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics 1324 # -1325 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1325 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1326 # -1327 check-screen-row screen, 0/y, "... ", "F - test-trace-expand-continues-past-lower-depth/pre-0" -1328 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-expand-continues-past-lower-depth/pre-0/cursor" -1329 check-screen-row screen, 1/y, " ", "F - test-trace-expand-continues-past-lower-depth/pre-1" -1330 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-continues-past-lower-depth/pre-1/cursor" +1327 check-screen-row screen, 0/y, "... ", "F - test-trace-expand-continues-past-lower-depth/pre-0" +1328 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-expand-continues-past-lower-depth/pre-0/cursor" +1329 check-screen-row screen, 1/y, " ", "F - test-trace-expand-continues-past-lower-depth/pre-1" +1330 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-continues-past-lower-depth/pre-1/cursor" 1331 # expand 1332 edit-trace t, 0xa/enter -1333 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1333 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1334 # -1335 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-expand-continues-past-lower-depth/expand-0" -1336 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-expand-continues-past-lower-depth/expand-0/cursor" +1335 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-expand-continues-past-lower-depth/expand-0" +1336 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-expand-continues-past-lower-depth/expand-0/cursor" 1337 # TODO: might be too wasteful to show every place where lines are hidden -1338 check-screen-row screen, 1/y, "... ", "F - test-trace-expand-continues-past-lower-depth/expand-1" -1339 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-continues-past-lower-depth/expand-1/cursor" -1340 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-expand-continues-past-lower-depth/expand-2" -1341 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-expand-continues-past-lower-depth/expand-2/cursor" +1338 check-screen-row screen, 1/y, "... ", "F - test-trace-expand-continues-past-lower-depth/expand-1" +1339 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-continues-past-lower-depth/expand-1/cursor" +1340 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-expand-continues-past-lower-depth/expand-2" +1341 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-expand-continues-past-lower-depth/expand-2/cursor" 1342 } 1343 1344 fn test-trace-expand-stops-at-higher-depth { @@ -1422,30 +1422,30 @@ if ('onhashchange' in window) { 1357 trace-lower t 1358 trace-text t, "l", "line 2.1" 1359 # setup: screen -1360 var screen-on-stack: screen -1361 var screen/edi: (addr screen) <- address screen-on-stack -1362 initialize-screen screen, 0x10/width, 8/height, 0/no-pixel-graphics +1360 var screen-on-stack: screen +1361 var screen/edi: (addr screen) <- address screen-on-stack +1362 initialize-screen screen, 0x10/width, 8/height, 0/no-pixel-graphics 1363 # -1364 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor +1364 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor 1365 # -1366 check-screen-row screen, 0/y, "... ", "F - test-trace-expand-stops-at-higher-depth/pre-0" -1367 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-expand-stops-at-higher-depth/pre-0/cursor" -1368 check-screen-row screen, 1/y, " ", "F - test-trace-expand-stops-at-higher-depth/pre-1" -1369 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-stops-at-higher-depth/pre-1/cursor" +1366 check-screen-row screen, 0/y, "... ", "F - test-trace-expand-stops-at-higher-depth/pre-0" +1367 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-expand-stops-at-higher-depth/pre-0/cursor" +1368 check-screen-row screen, 1/y, " ", "F - test-trace-expand-stops-at-higher-depth/pre-1" +1369 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-stops-at-higher-depth/pre-1/cursor" 1370 # expand 1371 edit-trace t, 0xa/enter -1372 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor +1372 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor 1373 # -1374 check-screen-row screen, 0/y, "2 line 1.1 ", "F - test-trace-expand-stops-at-higher-depth/expand-0" -1375 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||||| ", "F - test-trace-expand-stops-at-higher-depth/expand-0/cursor" -1376 check-screen-row screen, 1/y, "... ", "F - test-trace-expand-stops-at-higher-depth/expand-1" -1377 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-stops-at-higher-depth/expand-1/cursor" -1378 check-screen-row screen, 2/y, "2 line 1.2 ", "F - test-trace-expand-stops-at-higher-depth/expand-2" -1379 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-expand-stops-at-higher-depth/expand-2/cursor" -1380 check-screen-row screen, 3/y, "... ", "F - test-trace-expand-stops-at-higher-depth/expand-3" -1381 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-expand-stops-at-higher-depth/expand-3/cursor" -1382 check-screen-row screen, 4/y, " ", "F - test-trace-expand-stops-at-higher-depth/expand-4" -1383 check-background-color-in-screen-row screen, 7/bg=cursor, 4/y, " ", "F - test-trace-expand-stops-at-higher-depth/expand-4/cursor" +1374 check-screen-row screen, 0/y, "2 line 1.1 ", "F - test-trace-expand-stops-at-higher-depth/expand-0" +1375 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||||| ", "F - test-trace-expand-stops-at-higher-depth/expand-0/cursor" +1376 check-screen-row screen, 1/y, "... ", "F - test-trace-expand-stops-at-higher-depth/expand-1" +1377 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-stops-at-higher-depth/expand-1/cursor" +1378 check-screen-row screen, 2/y, "2 line 1.2 ", "F - test-trace-expand-stops-at-higher-depth/expand-2" +1379 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-expand-stops-at-higher-depth/expand-2/cursor" +1380 check-screen-row screen, 3/y, "... ", "F - test-trace-expand-stops-at-higher-depth/expand-3" +1381 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-expand-stops-at-higher-depth/expand-3/cursor" +1382 check-screen-row screen, 4/y, " ", "F - test-trace-expand-stops-at-higher-depth/expand-4" +1383 check-background-color-in-screen-row screen, 7/bg=cursor, 4/y, " ", "F - test-trace-expand-stops-at-higher-depth/expand-4/cursor" 1384 } 1385 1386 fn test-trace-expand-twice { @@ -1459,47 +1459,47 @@ if ('onhashchange' in window) { 1394 trace-higher t 1395 trace-text t, "l", "line 2" 1396 # setup: screen -1397 var screen-on-stack: screen -1398 var screen/edi: (addr screen) <- address screen-on-stack -1399 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics +1397 var screen-on-stack: screen +1398 var screen/edi: (addr screen) <- address screen-on-stack +1399 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics 1400 # -1401 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1401 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1402 # -1403 check-screen-row screen, 0/y, "... ", "F - test-trace-expand-twice/pre-0" -1404 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-expand-twice/pre-0/cursor" -1405 check-screen-row screen, 1/y, " ", "F - test-trace-expand-twice/pre-1" -1406 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-twice/pre-1/cursor" +1403 check-screen-row screen, 0/y, "... ", "F - test-trace-expand-twice/pre-0" +1404 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-expand-twice/pre-0/cursor" +1405 check-screen-row screen, 1/y, " ", "F - test-trace-expand-twice/pre-1" +1406 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-twice/pre-1/cursor" 1407 # expand 1408 edit-trace t, 0xa/enter -1409 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1409 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1410 # -1411 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-expand-twice/expand-0" -1412 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-expand-twice/expand-0/cursor" -1413 check-screen-row screen, 1/y, "... ", "F - test-trace-expand-twice/expand-1" -1414 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-twice/expand-1/cursor" -1415 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-expand-twice/expand-2" -1416 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-expand-twice/expand-2/cursor" +1411 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-expand-twice/expand-0" +1412 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-expand-twice/expand-0/cursor" +1413 check-screen-row screen, 1/y, "... ", "F - test-trace-expand-twice/expand-1" +1414 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-expand-twice/expand-1/cursor" +1415 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-expand-twice/expand-2" +1416 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-expand-twice/expand-2/cursor" 1417 # cursor down 1418 edit-trace t, 0x6a/j 1419 # hack: we need to render here to make this test pass; we're mixing state management with rendering -1420 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1420 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1421 # -1422 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-expand-twice/down-0" -1423 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-expand-twice/down-0/cursor" -1424 check-screen-row screen, 1/y, "... ", "F - test-trace-expand-twice/down-1" -1425 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, "||| ", "F - test-trace-expand-twice/down-1/cursor" -1426 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-expand-twice/down-2" -1427 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-expand-twice/down-2/cursor" +1422 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-expand-twice/down-0" +1423 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-expand-twice/down-0/cursor" +1424 check-screen-row screen, 1/y, "... ", "F - test-trace-expand-twice/down-1" +1425 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, "||| ", "F - test-trace-expand-twice/down-1/cursor" +1426 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-expand-twice/down-2" +1427 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-expand-twice/down-2/cursor" 1428 # expand again 1429 edit-trace t, 0xa/enter -1430 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1430 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1431 # -1432 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-expand-twice/expand2-0" -1433 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-expand-twice/expand2-0/cursor" -1434 check-screen-row screen, 1/y, "2 line 1.1 ", "F - test-trace-expand-twice/expand2-1" -1435 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, "|||||||||| ", "F - test-trace-expand-twice/expand2-1/cursor" -1436 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-expand-twice/expand2-2" -1437 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-expand-twice/expand2-2/cursor" +1432 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-expand-twice/expand2-0" +1433 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-expand-twice/expand2-0/cursor" +1434 check-screen-row screen, 1/y, "2 line 1.1 ", "F - test-trace-expand-twice/expand2-1" +1435 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, "|||||||||| ", "F - test-trace-expand-twice/expand2-1/cursor" +1436 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-expand-twice/expand2-2" +1437 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-expand-twice/expand2-2/cursor" 1438 } 1439 1440 fn test-trace-refresh-cursor { @@ -1511,50 +1511,50 @@ if ('onhashchange' in window) { 1446 trace-text t, "l", "line 2" 1447 trace-text t, "l", "line 3" 1448 # setup: screen -1449 var screen-on-stack: screen -1450 var screen/edi: (addr screen) <- address screen-on-stack -1451 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics +1449 var screen-on-stack: screen +1450 var screen/edi: (addr screen) <- address screen-on-stack +1451 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics 1452 # -1453 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1453 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1454 # -1455 check-screen-row screen, 0/y, "... ", "F - test-trace-refresh-cursor/pre-0" -1456 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-refresh-cursor/pre-0/cursor" -1457 check-screen-row screen, 1/y, " ", "F - test-trace-refresh-cursor/pre-1" -1458 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-refresh-cursor/pre-1/cursor" +1455 check-screen-row screen, 0/y, "... ", "F - test-trace-refresh-cursor/pre-0" +1456 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-refresh-cursor/pre-0/cursor" +1457 check-screen-row screen, 1/y, " ", "F - test-trace-refresh-cursor/pre-1" +1458 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-refresh-cursor/pre-1/cursor" 1459 # expand 1460 edit-trace t, 0xa/enter -1461 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1461 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1462 # -1463 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-refresh-cursor/expand-0" -1464 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-refresh-cursor/expand-0/cursor" -1465 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-refresh-cursor/expand-1" -1466 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-refresh-cursor/expand-1/cursor" -1467 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-refresh-cursor/expand-2" -1468 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-refresh-cursor/expand-2/cursor" +1463 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-refresh-cursor/expand-0" +1464 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-refresh-cursor/expand-0/cursor" +1465 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-refresh-cursor/expand-1" +1466 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-refresh-cursor/expand-1/cursor" +1467 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-refresh-cursor/expand-2" +1468 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-refresh-cursor/expand-2/cursor" 1469 # cursor down 1470 edit-trace t, 0x6a/j 1471 edit-trace t, 0x6a/j -1472 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1472 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1473 # -1474 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-refresh-cursor/down-0" -1475 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-refresh-cursor/down-0/cursor" -1476 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-refresh-cursor/down-1" -1477 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-refresh-cursor/down-1/cursor" -1478 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-refresh-cursor/down-2" -1479 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "|||||||| ", "F - test-trace-refresh-cursor/down-2/cursor" +1474 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-refresh-cursor/down-0" +1475 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-refresh-cursor/down-0/cursor" +1476 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-refresh-cursor/down-1" +1477 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-refresh-cursor/down-1/cursor" +1478 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-refresh-cursor/down-2" +1479 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "|||||||| ", "F - test-trace-refresh-cursor/down-2/cursor" 1480 # recreate trace 1481 clear-trace t 1482 trace-text t, "l", "line 1" 1483 trace-text t, "l", "line 2" 1484 trace-text t, "l", "line 3" -1485 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1485 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1486 # cursor remains unchanged -1487 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-refresh-cursor/refresh-0" -1488 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-refresh-cursor/refresh-0/cursor" -1489 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-refresh-cursor/refresh-1" -1490 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-refresh-cursor/refresh-1/cursor" -1491 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-refresh-cursor/refresh-2" -1492 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "|||||||| ", "F - test-trace-refresh-cursor/refresh-2/cursor" +1487 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-refresh-cursor/refresh-0" +1488 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-refresh-cursor/refresh-0/cursor" +1489 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-refresh-cursor/refresh-1" +1490 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-refresh-cursor/refresh-1/cursor" +1491 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-refresh-cursor/refresh-2" +1492 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "|||||||| ", "F - test-trace-refresh-cursor/refresh-2/cursor" 1493 } 1494 1495 fn test-trace-preserve-cursor-on-refresh { @@ -1566,50 +1566,50 @@ if ('onhashchange' in window) { 1501 trace-text t, "l", "line 2" 1502 trace-text t, "l", "line 3" 1503 # setup: screen -1504 var screen-on-stack: screen -1505 var screen/edi: (addr screen) <- address screen-on-stack -1506 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics +1504 var screen-on-stack: screen +1505 var screen/edi: (addr screen) <- address screen-on-stack +1506 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics 1507 # -1508 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1508 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1509 # -1510 check-screen-row screen, 0/y, "... ", "F - test-trace-preserve-cursor-on-refresh/pre-0" -1511 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-preserve-cursor-on-refresh/pre-0/cursor" -1512 check-screen-row screen, 1/y, " ", "F - test-trace-preserve-cursor-on-refresh/pre-1" -1513 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-preserve-cursor-on-refresh/pre-1/cursor" +1510 check-screen-row screen, 0/y, "... ", "F - test-trace-preserve-cursor-on-refresh/pre-0" +1511 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-preserve-cursor-on-refresh/pre-0/cursor" +1512 check-screen-row screen, 1/y, " ", "F - test-trace-preserve-cursor-on-refresh/pre-1" +1513 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-preserve-cursor-on-refresh/pre-1/cursor" 1514 # expand 1515 edit-trace t, 0xa/enter -1516 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1516 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1517 # -1518 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-preserve-cursor-on-refresh/expand-0" -1519 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-preserve-cursor-on-refresh/expand-0/cursor" -1520 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-preserve-cursor-on-refresh/expand-1" -1521 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-preserve-cursor-on-refresh/expand-1/cursor" -1522 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-preserve-cursor-on-refresh/expand-2" -1523 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-preserve-cursor-on-refresh/expand-2/cursor" +1518 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-preserve-cursor-on-refresh/expand-0" +1519 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-preserve-cursor-on-refresh/expand-0/cursor" +1520 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-preserve-cursor-on-refresh/expand-1" +1521 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-preserve-cursor-on-refresh/expand-1/cursor" +1522 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-preserve-cursor-on-refresh/expand-2" +1523 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-preserve-cursor-on-refresh/expand-2/cursor" 1524 # cursor down 1525 edit-trace t, 0x6a/j 1526 edit-trace t, 0x6a/j -1527 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1527 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1528 # -1529 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-preserve-cursor-on-refresh/down-0" -1530 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-preserve-cursor-on-refresh/down-0/cursor" -1531 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-preserve-cursor-on-refresh/down-1" -1532 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-preserve-cursor-on-refresh/down-1/cursor" -1533 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-preserve-cursor-on-refresh/down-2" -1534 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "|||||||| ", "F - test-trace-preserve-cursor-on-refresh/down-2/cursor" +1529 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-preserve-cursor-on-refresh/down-0" +1530 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-preserve-cursor-on-refresh/down-0/cursor" +1531 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-preserve-cursor-on-refresh/down-1" +1532 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-preserve-cursor-on-refresh/down-1/cursor" +1533 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-preserve-cursor-on-refresh/down-2" +1534 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "|||||||| ", "F - test-trace-preserve-cursor-on-refresh/down-2/cursor" 1535 # recreate trace with slightly different lines 1536 clear-trace t 1537 trace-text t, "l", "line 4" 1538 trace-text t, "l", "line 5" 1539 trace-text t, "l", "line 3" # cursor line is unchanged -1540 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1540 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1541 # cursor remains unchanged -1542 check-screen-row screen, 0/y, "1 line 4 ", "F - test-trace-preserve-cursor-on-refresh/refresh-0" -1543 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-preserve-cursor-on-refresh/refresh-0/cursor" -1544 check-screen-row screen, 1/y, "1 line 5 ", "F - test-trace-preserve-cursor-on-refresh/refresh-1" -1545 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-preserve-cursor-on-refresh/refresh-1/cursor" -1546 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-preserve-cursor-on-refresh/refresh-2" -1547 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "|||||||| ", "F - test-trace-preserve-cursor-on-refresh/refresh-2/cursor" +1542 check-screen-row screen, 0/y, "1 line 4 ", "F - test-trace-preserve-cursor-on-refresh/refresh-0" +1543 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-preserve-cursor-on-refresh/refresh-0/cursor" +1544 check-screen-row screen, 1/y, "1 line 5 ", "F - test-trace-preserve-cursor-on-refresh/refresh-1" +1545 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-preserve-cursor-on-refresh/refresh-1/cursor" +1546 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-preserve-cursor-on-refresh/refresh-2" +1547 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "|||||||| ", "F - test-trace-preserve-cursor-on-refresh/refresh-2/cursor" 1548 } 1549 1550 fn test-trace-keep-cursor-visible-on-refresh { @@ -1621,52 +1621,52 @@ if ('onhashchange' in window) { 1556 trace-text t, "l", "line 2" 1557 trace-text t, "l", "line 3" 1558 # setup: screen -1559 var screen-on-stack: screen -1560 var screen/edi: (addr screen) <- address screen-on-stack -1561 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics +1559 var screen-on-stack: screen +1560 var screen/edi: (addr screen) <- address screen-on-stack +1561 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics 1562 # -1563 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1563 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1564 # -1565 check-screen-row screen, 0/y, "... ", "F - test-trace-keep-cursor-visible-on-refresh/pre-0" -1566 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-keep-cursor-visible-on-refresh/pre-0/cursor" -1567 check-screen-row screen, 1/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/pre-1" -1568 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/pre-1/cursor" +1565 check-screen-row screen, 0/y, "... ", "F - test-trace-keep-cursor-visible-on-refresh/pre-0" +1566 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-keep-cursor-visible-on-refresh/pre-0/cursor" +1567 check-screen-row screen, 1/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/pre-1" +1568 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/pre-1/cursor" 1569 # expand 1570 edit-trace t, 0xa/enter -1571 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1571 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1572 # -1573 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-keep-cursor-visible-on-refresh/expand-0" -1574 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-keep-cursor-visible-on-refresh/expand-0/cursor" -1575 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-keep-cursor-visible-on-refresh/expand-1" -1576 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/expand-1/cursor" -1577 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-keep-cursor-visible-on-refresh/expand-2" -1578 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/expand-2/cursor" +1573 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-keep-cursor-visible-on-refresh/expand-0" +1574 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-keep-cursor-visible-on-refresh/expand-0/cursor" +1575 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-keep-cursor-visible-on-refresh/expand-1" +1576 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/expand-1/cursor" +1577 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-keep-cursor-visible-on-refresh/expand-2" +1578 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/expand-2/cursor" 1579 # cursor down 1580 edit-trace t, 0x6a/j 1581 edit-trace t, 0x6a/j -1582 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1582 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1583 # -1584 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-keep-cursor-visible-on-refresh/down-0" -1585 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/down-0/cursor" -1586 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-keep-cursor-visible-on-refresh/down-1" -1587 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/down-1/cursor" -1588 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-keep-cursor-visible-on-refresh/down-2" -1589 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "|||||||| ", "F - test-trace-keep-cursor-visible-on-refresh/down-2/cursor" +1584 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-keep-cursor-visible-on-refresh/down-0" +1585 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/down-0/cursor" +1586 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-keep-cursor-visible-on-refresh/down-1" +1587 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/down-1/cursor" +1588 check-screen-row screen, 2/y, "1 line 3 ", "F - test-trace-keep-cursor-visible-on-refresh/down-2" +1589 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "|||||||| ", "F - test-trace-keep-cursor-visible-on-refresh/down-2/cursor" 1590 # recreate trace with entirely different lines 1591 clear-trace t 1592 trace-text t, "l", "line 4" 1593 trace-text t, "l", "line 5" 1594 trace-text t, "l", "line 6" 1595 mark-lines-dirty t -1596 clear-screen screen -1597 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1596 clear-screen screen +1597 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1598 # trace collapses, and cursor bumps up -1599 check-screen-row screen, 0/y, "... ", "F - test-trace-keep-cursor-visible-on-refresh/refresh-0" -1600 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-keep-cursor-visible-on-refresh/refresh-0/cursor" -1601 check-screen-row screen, 1/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/refresh-1" -1602 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/refresh-1/cursor" -1603 check-screen-row screen, 2/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/refresh-2" -1604 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/refresh-2/cursor" +1599 check-screen-row screen, 0/y, "... ", "F - test-trace-keep-cursor-visible-on-refresh/refresh-0" +1600 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-keep-cursor-visible-on-refresh/refresh-0/cursor" +1601 check-screen-row screen, 1/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/refresh-1" +1602 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/refresh-1/cursor" +1603 check-screen-row screen, 2/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/refresh-2" +1604 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-keep-cursor-visible-on-refresh/refresh-2/cursor" 1605 } 1606 1607 fn test-trace-collapse-at-top { @@ -1680,37 +1680,37 @@ if ('onhashchange' in window) { 1615 trace-higher t 1616 trace-text t, "l", "line 2" 1617 # setup: screen -1618 var screen-on-stack: screen -1619 var screen/edi: (addr screen) <- address screen-on-stack -1620 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics +1618 var screen-on-stack: screen +1619 var screen/edi: (addr screen) <- address screen-on-stack +1620 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics 1621 # -1622 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1622 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1623 # -1624 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse-at-top/pre-0" -1625 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse-at-top/pre-0/cursor" -1626 check-screen-row screen, 1/y, " ", "F - test-trace-collapse-at-top/pre-1" -1627 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-at-top/pre-1/cursor" +1624 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse-at-top/pre-0" +1625 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse-at-top/pre-0/cursor" +1626 check-screen-row screen, 1/y, " ", "F - test-trace-collapse-at-top/pre-1" +1627 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-at-top/pre-1/cursor" 1628 # expand 1629 edit-trace t, 0xa/enter -1630 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1630 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1631 # -1632 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse-at-top/expand-0" -1633 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-collapse-at-top/expand-0/cursor" -1634 check-screen-row screen, 1/y, "... ", "F - test-trace-collapse-at-top/expand-1" -1635 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-at-top/expand-1/cursor" -1636 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-collapse-at-top/expand-2" -1637 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-collapse-at-top/expand-2/cursor" +1632 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse-at-top/expand-0" +1633 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-collapse-at-top/expand-0/cursor" +1634 check-screen-row screen, 1/y, "... ", "F - test-trace-collapse-at-top/expand-1" +1635 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-at-top/expand-1/cursor" +1636 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-collapse-at-top/expand-2" +1637 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-collapse-at-top/expand-2/cursor" 1638 # collapse 1639 edit-trace t, 8/backspace 1640 # hack: we need to render here to make this test pass; we're mixing state management with rendering -1641 clear-screen screen -1642 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1641 clear-screen screen +1642 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1643 # 1644 check-ints-equal y, 1, "F - test-trace-collapse-at-top/post-0/y" -1645 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse-at-top/post-0" -1646 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse-at-top/post-0/cursor" -1647 check-screen-row screen, 1/y, " ", "F - test-trace-collapse-at-top/post-1" -1648 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-at-top/post-1/cursor" +1645 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse-at-top/post-0" +1646 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse-at-top/post-0/cursor" +1647 check-screen-row screen, 1/y, " ", "F - test-trace-collapse-at-top/post-1" +1648 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-at-top/post-1/cursor" 1649 } 1650 1651 fn test-trace-collapse { @@ -1721,37 +1721,37 @@ if ('onhashchange' in window) { 1656 trace-text t, "l", "line 1" 1657 trace-text t, "l", "line 2" 1658 # setup: screen -1659 var screen-on-stack: screen -1660 var screen/edi: (addr screen) <- address screen-on-stack -1661 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics +1659 var screen-on-stack: screen +1660 var screen/edi: (addr screen) <- address screen-on-stack +1661 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics 1662 # -1663 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1663 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1664 # -1665 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse/pre-0" -1666 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse/pre-0/cursor" -1667 check-screen-row screen, 1/y, " ", "F - test-trace-collapse/pre-1" -1668 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse/pre-1/cursor" +1665 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse/pre-0" +1666 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse/pre-0/cursor" +1667 check-screen-row screen, 1/y, " ", "F - test-trace-collapse/pre-1" +1668 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse/pre-1/cursor" 1669 # expand 1670 edit-trace t, 0xa/enter -1671 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1671 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1672 # -1673 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse/expand-0" -1674 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-collapse/expand-0/cursor" -1675 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-collapse/expand-1" -1676 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse/expand-1/cursor" +1673 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse/expand-0" +1674 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-collapse/expand-0/cursor" +1675 check-screen-row screen, 1/y, "1 line 2 ", "F - test-trace-collapse/expand-1" +1676 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse/expand-1/cursor" 1677 # cursor down 1678 edit-trace t, 0x6a/j -1679 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1679 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1680 # collapse 1681 edit-trace t, 8/backspace -1682 clear-screen screen -1683 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1682 clear-screen screen +1683 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1684 # 1685 check-ints-equal y, 1, "F - test-trace-collapse/post-0/y" -1686 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse/post-0" -1687 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse/post-0/cursor" -1688 check-screen-row screen, 1/y, " ", "F - test-trace-collapse/post-1" -1689 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse/post-1/cursor" +1686 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse/post-0" +1687 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse/post-0/cursor" +1688 check-screen-row screen, 1/y, " ", "F - test-trace-collapse/post-1" +1689 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse/post-1/cursor" 1690 } 1691 1692 fn test-trace-collapse-skips-invisible-lines { @@ -1765,43 +1765,43 @@ if ('onhashchange' in window) { 1700 trace-higher t 1701 trace-text t, "l", "line 2" 1702 # setup: screen -1703 var screen-on-stack: screen -1704 var screen/edi: (addr screen) <- address screen-on-stack -1705 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics +1703 var screen-on-stack: screen +1704 var screen/edi: (addr screen) <- address screen-on-stack +1705 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics 1706 # -1707 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1707 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1708 # -1709 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse-skips-invisible-lines/pre-0" -1710 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse-skips-invisible-lines/pre-0/cursor" -1711 check-screen-row screen, 1/y, " ", "F - test-trace-collapse-skips-invisible-lines/pre-1" -1712 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-skips-invisible-lines/pre-1/cursor" +1709 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse-skips-invisible-lines/pre-0" +1710 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse-skips-invisible-lines/pre-0/cursor" +1711 check-screen-row screen, 1/y, " ", "F - test-trace-collapse-skips-invisible-lines/pre-1" +1712 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-skips-invisible-lines/pre-1/cursor" 1713 # expand 1714 edit-trace t, 0xa/enter -1715 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1715 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1716 # two visible lines with an invisible line in between -1717 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse-skips-invisible-lines/expand-0" -1718 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-collapse-skips-invisible-lines/expand-0/cursor" -1719 check-screen-row screen, 1/y, "... ", "F - test-trace-collapse-skips-invisible-lines/expand-1" -1720 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-skips-invisible-lines/expand-1/cursor" -1721 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-collapse-skips-invisible-lines/expand-2" -1722 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-collapse-skips-invisible-lines/expand-2/cursor" +1717 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse-skips-invisible-lines/expand-0" +1718 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-collapse-skips-invisible-lines/expand-0/cursor" +1719 check-screen-row screen, 1/y, "... ", "F - test-trace-collapse-skips-invisible-lines/expand-1" +1720 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-skips-invisible-lines/expand-1/cursor" +1721 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-collapse-skips-invisible-lines/expand-2" +1722 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-collapse-skips-invisible-lines/expand-2/cursor" 1723 # cursor down to second visible line 1724 edit-trace t, 0x6a/j -1725 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1725 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1726 edit-trace t, 0x6a/j -1727 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1727 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1728 # collapse 1729 edit-trace t, 8/backspace -1730 clear-screen screen -1731 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1730 clear-screen screen +1731 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1732 # 1733 check-ints-equal y, 1, "F - test-trace-collapse-skips-invisible-lines/post-0/y" 1734 var cursor-y/eax: (addr int) <- get t, cursor-y 1735 check-ints-equal *cursor-y, 0, "F - test-trace-collapse-skips-invisible-lines/post-0/cursor-y" -1736 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse-skips-invisible-lines/post-0" -1737 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse-skips-invisible-lines/post-0/cursor" -1738 check-screen-row screen, 1/y, " ", "F - test-trace-collapse-skips-invisible-lines/post-1" -1739 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-skips-invisible-lines/post-1/cursor" +1736 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse-skips-invisible-lines/post-0" +1737 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse-skips-invisible-lines/post-0/cursor" +1738 check-screen-row screen, 1/y, " ", "F - test-trace-collapse-skips-invisible-lines/post-1" +1739 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-skips-invisible-lines/post-1/cursor" 1740 } 1741 1742 fn test-trace-collapse-two-levels { @@ -1815,54 +1815,54 @@ if ('onhashchange' in window) { 1750 trace-higher t 1751 trace-text t, "l", "line 2" 1752 # setup: screen -1753 var screen-on-stack: screen -1754 var screen/edi: (addr screen) <- address screen-on-stack -1755 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics +1753 var screen-on-stack: screen +1754 var screen/edi: (addr screen) <- address screen-on-stack +1755 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics 1756 # -1757 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1757 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1758 # -1759 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse-two-levels/pre-0" -1760 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse-two-levels/pre-0/cursor" -1761 check-screen-row screen, 1/y, " ", "F - test-trace-collapse-two-levels/pre-1" -1762 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-two-levels/pre-1/cursor" +1759 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse-two-levels/pre-0" +1760 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse-two-levels/pre-0/cursor" +1761 check-screen-row screen, 1/y, " ", "F - test-trace-collapse-two-levels/pre-1" +1762 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-two-levels/pre-1/cursor" 1763 # expand 1764 edit-trace t, 0xa/enter -1765 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1765 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1766 # two visible lines with an invisible line in between -1767 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse-two-levels/expand-0" -1768 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-collapse-two-levels/expand-0/cursor" -1769 check-screen-row screen, 1/y, "... ", "F - test-trace-collapse-two-levels/expand-1" -1770 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-two-levels/expand-1/cursor" -1771 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-collapse-two-levels/expand-2" -1772 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-collapse-two-levels/expand-2/cursor" +1767 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse-two-levels/expand-0" +1768 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-collapse-two-levels/expand-0/cursor" +1769 check-screen-row screen, 1/y, "... ", "F - test-trace-collapse-two-levels/expand-1" +1770 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-two-levels/expand-1/cursor" +1771 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-collapse-two-levels/expand-2" +1772 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-collapse-two-levels/expand-2/cursor" 1773 # cursor down to ellipses 1774 edit-trace t, 0x6a/j -1775 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1775 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1776 # expand 1777 edit-trace t, 0xa/enter -1778 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1778 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1779 # two visible lines with an invisible line in between -1780 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse-two-levels/expand2-0" -1781 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-collapse-two-levels/expand2-0/cursor" -1782 check-screen-row screen, 1/y, "2 line 1.1 ", "F - test-trace-collapse-two-levels/expand2-1" -1783 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, "|||||||||| ", "F - test-trace-collapse-two-levels/expand2-1/cursor" -1784 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-collapse-two-levels/expand2-2" -1785 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-collapse-two-levels/expand2-2/cursor" +1780 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse-two-levels/expand2-0" +1781 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-collapse-two-levels/expand2-0/cursor" +1782 check-screen-row screen, 1/y, "2 line 1.1 ", "F - test-trace-collapse-two-levels/expand2-1" +1783 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, "|||||||||| ", "F - test-trace-collapse-two-levels/expand2-1/cursor" +1784 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-collapse-two-levels/expand2-2" +1785 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-collapse-two-levels/expand2-2/cursor" 1786 # cursor down to second visible line 1787 edit-trace t, 0x6a/j -1788 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1788 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1789 # collapse 1790 edit-trace t, 8/backspace -1791 clear-screen screen -1792 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1791 clear-screen screen +1792 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1793 # 1794 check-ints-equal y, 1, "F - test-trace-collapse-two-levels/post-0/y" 1795 var cursor-y/eax: (addr int) <- get t, cursor-y 1796 check-ints-equal *cursor-y, 0, "F - test-trace-collapse-two-levels/post-0/cursor-y" -1797 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse-two-levels/post-0" -1798 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse-two-levels/post-0/cursor" -1799 check-screen-row screen, 1/y, " ", "F - test-trace-collapse-two-levels/post-1" -1800 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-two-levels/post-1/cursor" +1797 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse-two-levels/post-0" +1798 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse-two-levels/post-0/cursor" +1799 check-screen-row screen, 1/y, " ", "F - test-trace-collapse-two-levels/post-1" +1800 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-two-levels/post-1/cursor" 1801 } 1802 1803 fn test-trace-collapse-nested-level { @@ -1880,65 +1880,65 @@ if ('onhashchange' in window) { 1815 trace-text t, "l", "line 2.2" 1816 trace-higher t 1817 # setup: screen -1818 var screen-on-stack: screen -1819 var screen/edi: (addr screen) <- address screen-on-stack -1820 initialize-screen screen, 0x10/width, 8/height, 0/no-pixel-graphics +1818 var screen-on-stack: screen +1819 var screen/edi: (addr screen) <- address screen-on-stack +1820 initialize-screen screen, 0x10/width, 8/height, 0/no-pixel-graphics 1821 # -1822 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor +1822 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor 1823 # -1824 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse-nested-level/pre-0" -1825 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse-nested-level/pre-0/cursor" -1826 check-screen-row screen, 1/y, " ", "F - test-trace-collapse-nested-level/pre-1" -1827 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-nested-level/pre-1/cursor" +1824 check-screen-row screen, 0/y, "... ", "F - test-trace-collapse-nested-level/pre-0" +1825 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-collapse-nested-level/pre-0/cursor" +1826 check-screen-row screen, 1/y, " ", "F - test-trace-collapse-nested-level/pre-1" +1827 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-nested-level/pre-1/cursor" 1828 # expand 1829 edit-trace t, 0xa/enter -1830 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor +1830 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor 1831 # two visible lines with an invisible line in between -1832 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse-nested-level/expand-0" -1833 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-collapse-nested-level/expand-0/cursor" -1834 check-screen-row screen, 1/y, "... ", "F - test-trace-collapse-nested-level/expand-1" -1835 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-nested-level/expand-1/cursor" -1836 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-collapse-nested-level/expand-2" -1837 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-collapse-nested-level/expand-2/cursor" -1838 check-screen-row screen, 3/y, "... ", "F - test-trace-collapse-nested-level/expand-3" -1839 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-collapse-nested-level/expand-3/cursor" +1832 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse-nested-level/expand-0" +1833 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-collapse-nested-level/expand-0/cursor" +1834 check-screen-row screen, 1/y, "... ", "F - test-trace-collapse-nested-level/expand-1" +1835 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-nested-level/expand-1/cursor" +1836 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-collapse-nested-level/expand-2" +1837 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-collapse-nested-level/expand-2/cursor" +1838 check-screen-row screen, 3/y, "... ", "F - test-trace-collapse-nested-level/expand-3" +1839 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-collapse-nested-level/expand-3/cursor" 1840 # cursor down to bottom 1841 edit-trace t, 0x6a/j -1842 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor +1842 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor 1843 edit-trace t, 0x6a/j -1844 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor +1844 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor 1845 edit-trace t, 0x6a/j -1846 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor +1846 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor 1847 # expand 1848 edit-trace t, 0xa/enter -1849 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor +1849 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor 1850 # two visible lines with an invisible line in between -1851 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse-nested-level/expand2-0" -1852 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-collapse-nested-level/expand2-0/cursor" -1853 check-screen-row screen, 1/y, "... ", "F - test-trace-collapse-nested-level/expand2-1" -1854 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-nested-level/expand2-1/cursor" -1855 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-collapse-nested-level/expand2-2" -1856 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-collapse-nested-level/expand2-2/cursor" -1857 check-screen-row screen, 3/y, "2 line 2.1 ", "F - test-trace-collapse-nested-level/expand2-3" -1858 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, "|||||||||| ", "F - test-trace-collapse-nested-level/expand2-3/cursor" -1859 check-screen-row screen, 4/y, "2 line 2.2 ", "F - test-trace-collapse-nested-level/expand2-4" -1860 check-background-color-in-screen-row screen, 7/bg=cursor, 4/y, " ", "F - test-trace-collapse-nested-level/expand2-4/cursor" +1851 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse-nested-level/expand2-0" +1852 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-collapse-nested-level/expand2-0/cursor" +1853 check-screen-row screen, 1/y, "... ", "F - test-trace-collapse-nested-level/expand2-1" +1854 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-nested-level/expand2-1/cursor" +1855 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-collapse-nested-level/expand2-2" +1856 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-collapse-nested-level/expand2-2/cursor" +1857 check-screen-row screen, 3/y, "2 line 2.1 ", "F - test-trace-collapse-nested-level/expand2-3" +1858 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, "|||||||||| ", "F - test-trace-collapse-nested-level/expand2-3/cursor" +1859 check-screen-row screen, 4/y, "2 line 2.2 ", "F - test-trace-collapse-nested-level/expand2-4" +1860 check-background-color-in-screen-row screen, 7/bg=cursor, 4/y, " ", "F - test-trace-collapse-nested-level/expand2-4/cursor" 1861 # collapse 1862 edit-trace t, 8/backspace -1863 clear-screen screen -1864 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor +1863 clear-screen screen +1864 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 8/ymax, 1/show-cursor 1865 # 1866 check-ints-equal y, 4, "F - test-trace-collapse-nested-level/post-0/y" 1867 var cursor-y/eax: (addr int) <- get t, cursor-y 1868 check-ints-equal *cursor-y, 2, "F - test-trace-collapse-nested-level/post-0/cursor-y" -1869 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse-nested-level/post-0" -1870 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-collapse-nested-level/post-0/cursor" -1871 check-screen-row screen, 1/y, "... ", "F - test-trace-collapse-nested-level/post-1" -1872 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-nested-level/post-1/cursor" -1873 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-collapse-nested-level/post-2" -1874 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "|||||||| ", "F - test-trace-collapse-nested-level/post-2/cursor" -1875 check-screen-row screen, 3/y, "... ", "F - test-trace-collapse-nested-level/post-3" -1876 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-collapse-nested-level/post-3/cursor" +1869 check-screen-row screen, 0/y, "1 line 1 ", "F - test-trace-collapse-nested-level/post-0" +1870 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-trace-collapse-nested-level/post-0/cursor" +1871 check-screen-row screen, 1/y, "... ", "F - test-trace-collapse-nested-level/post-1" +1872 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-collapse-nested-level/post-1/cursor" +1873 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-collapse-nested-level/post-2" +1874 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, "|||||||| ", "F - test-trace-collapse-nested-level/post-2/cursor" +1875 check-screen-row screen, 3/y, "... ", "F - test-trace-collapse-nested-level/post-3" +1876 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-collapse-nested-level/post-3/cursor" 1877 } 1878 1879 fn scroll-down _self: (addr trace) { @@ -2054,108 +2054,108 @@ if ('onhashchange' in window) { 1989 trace-text t, "l", "line 8" 1990 trace-text t, "l", "line 9" 1991 # setup: screen -1992 var screen-on-stack: screen -1993 var screen/edi: (addr screen) <- address screen-on-stack -1994 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics +1992 var screen-on-stack: screen +1993 var screen/edi: (addr screen) <- address screen-on-stack +1994 initialize-screen screen, 0x10/width, 4/height, 0/no-pixel-graphics 1995 # pre-render -1996 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +1996 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 1997 # -1998 check-screen-row screen, 0/y, "... ", "F - test-trace-scroll/pre-0" -1999 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-scroll/pre-0/cursor" -2000 check-screen-row screen, 1/y, " ", "F - test-trace-scroll/pre-1" -2001 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/pre-1/cursor" -2002 check-screen-row screen, 2/y, " ", "F - test-trace-scroll/pre-2" -2003 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/pre-2/cursor" -2004 check-screen-row screen, 3/y, " ", "F - test-trace-scroll/pre-3" -2005 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/pre-3/cursor" +1998 check-screen-row screen, 0/y, "... ", "F - test-trace-scroll/pre-0" +1999 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "||| ", "F - test-trace-scroll/pre-0/cursor" +2000 check-screen-row screen, 1/y, " ", "F - test-trace-scroll/pre-1" +2001 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/pre-1/cursor" +2002 check-screen-row screen, 2/y, " ", "F - test-trace-scroll/pre-2" +2003 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/pre-2/cursor" +2004 check-screen-row screen, 3/y, " ", "F - test-trace-scroll/pre-3" +2005 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/pre-3/cursor" 2006 # expand 2007 edit-trace t, 0xa/enter -2008 clear-screen screen -2009 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +2008 clear-screen screen +2009 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 2010 # -2011 check-screen-row screen, 0/y, "1 line 0 ", "F - test-trace-scroll/expand-0" -2012 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-scroll/expand-0/cursor" -2013 check-screen-row screen, 1/y, "1 line 1 ", "F - test-trace-scroll/expand-1" -2014 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/expand-1/cursor" -2015 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-scroll/expand-2" -2016 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/expand-2/cursor" -2017 check-screen-row screen, 3/y, "1 line 3 ", "F - test-trace-scroll/expand-3" -2018 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/expand-3/cursor" +2011 check-screen-row screen, 0/y, "1 line 0 ", "F - test-trace-scroll/expand-0" +2012 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-scroll/expand-0/cursor" +2013 check-screen-row screen, 1/y, "1 line 1 ", "F - test-trace-scroll/expand-1" +2014 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/expand-1/cursor" +2015 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-scroll/expand-2" +2016 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/expand-2/cursor" +2017 check-screen-row screen, 3/y, "1 line 3 ", "F - test-trace-scroll/expand-3" +2018 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/expand-3/cursor" 2019 # scroll up 2020 # hack: we must have rendered before this point; we're mixing state management with rendering 2021 edit-trace t, 2/ctrl-b -2022 clear-screen screen -2023 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +2022 clear-screen screen +2023 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 2024 # no change since we're already at the top -2025 check-screen-row screen, 0/y, "1 line 0 ", "F - test-trace-scroll/up0-0" -2026 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-scroll/up0-0/cursor" -2027 check-screen-row screen, 1/y, "1 line 1 ", "F - test-trace-scroll/up0-1" -2028 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/up0-1/cursor" -2029 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-scroll/up0-2" -2030 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/up0-2/cursor" -2031 check-screen-row screen, 3/y, "1 line 3 ", "F - test-trace-scroll/up0-3" -2032 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/up0-3/cursor" +2025 check-screen-row screen, 0/y, "1 line 0 ", "F - test-trace-scroll/up0-0" +2026 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-scroll/up0-0/cursor" +2027 check-screen-row screen, 1/y, "1 line 1 ", "F - test-trace-scroll/up0-1" +2028 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/up0-1/cursor" +2029 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-scroll/up0-2" +2030 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/up0-2/cursor" +2031 check-screen-row screen, 3/y, "1 line 3 ", "F - test-trace-scroll/up0-3" +2032 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/up0-3/cursor" 2033 # scroll down 2034 edit-trace t, 6/ctrl-f -2035 clear-screen screen -2036 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor -2037 check-screen-row screen, 0/y, "1 line 4 ", "F - test-trace-scroll/down1-0" -2038 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-scroll/down1-0/cursor" -2039 check-screen-row screen, 1/y, "1 line 5 ", "F - test-trace-scroll/down1-1" -2040 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/down1-1/cursor" -2041 check-screen-row screen, 2/y, "1 line 6 ", "F - test-trace-scroll/down1-2" -2042 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/down1-2/cursor" -2043 check-screen-row screen, 3/y, "1 line 7 ", "F - test-trace-scroll/down1-3" -2044 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/down1-3/cursor" +2035 clear-screen screen +2036 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +2037 check-screen-row screen, 0/y, "1 line 4 ", "F - test-trace-scroll/down1-0" +2038 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-scroll/down1-0/cursor" +2039 check-screen-row screen, 1/y, "1 line 5 ", "F - test-trace-scroll/down1-1" +2040 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/down1-1/cursor" +2041 check-screen-row screen, 2/y, "1 line 6 ", "F - test-trace-scroll/down1-2" +2042 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/down1-2/cursor" +2043 check-screen-row screen, 3/y, "1 line 7 ", "F - test-trace-scroll/down1-3" +2044 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/down1-3/cursor" 2045 # scroll down 2046 edit-trace t, 6/ctrl-f -2047 clear-screen screen -2048 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor -2049 check-screen-row screen, 0/y, "1 line 8 ", "F - test-trace-scroll/down2-0" -2050 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-scroll/down2-0/cursor" -2051 check-screen-row screen, 1/y, "1 line 9 ", "F - test-trace-scroll/down2-1" -2052 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/down2-1/cursor" -2053 check-screen-row screen, 2/y, " ", "F - test-trace-scroll/down2-2" -2054 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/down2-2/cursor" -2055 check-screen-row screen, 3/y, " ", "F - test-trace-scroll/down2-3" -2056 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/down2-3/cursor" +2047 clear-screen screen +2048 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +2049 check-screen-row screen, 0/y, "1 line 8 ", "F - test-trace-scroll/down2-0" +2050 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-scroll/down2-0/cursor" +2051 check-screen-row screen, 1/y, "1 line 9 ", "F - test-trace-scroll/down2-1" +2052 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/down2-1/cursor" +2053 check-screen-row screen, 2/y, " ", "F - test-trace-scroll/down2-2" +2054 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/down2-2/cursor" +2055 check-screen-row screen, 3/y, " ", "F - test-trace-scroll/down2-3" +2056 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/down2-3/cursor" 2057 # scroll down 2058 edit-trace t, 6/ctrl-f -2059 clear-screen screen -2060 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +2059 clear-screen screen +2060 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor 2061 # no change since we're already at the bottom -2062 check-screen-row screen, 0/y, "1 line 8 ", "F - test-trace-scroll/down3-0" -2063 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-scroll/down3-0/cursor" -2064 check-screen-row screen, 1/y, "1 line 9 ", "F - test-trace-scroll/down3-1" -2065 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/down3-1/cursor" -2066 check-screen-row screen, 2/y, " ", "F - test-trace-scroll/down3-2" -2067 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/down3-2/cursor" -2068 check-screen-row screen, 3/y, " ", "F - test-trace-scroll/down3-3" -2069 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/down3-3/cursor" +2062 check-screen-row screen, 0/y, "1 line 8 ", "F - test-trace-scroll/down3-0" +2063 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-scroll/down3-0/cursor" +2064 check-screen-row screen, 1/y, "1 line 9 ", "F - test-trace-scroll/down3-1" +2065 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/down3-1/cursor" +2066 check-screen-row screen, 2/y, " ", "F - test-trace-scroll/down3-2" +2067 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/down3-2/cursor" +2068 check-screen-row screen, 3/y, " ", "F - test-trace-scroll/down3-3" +2069 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/down3-3/cursor" 2070 # scroll up 2071 edit-trace t, 2/ctrl-b -2072 clear-screen screen -2073 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor -2074 check-screen-row screen, 0/y, "1 line 4 ", "F - test-trace-scroll/up1-0" -2075 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-scroll/up1-0/cursor" -2076 check-screen-row screen, 1/y, "1 line 5 ", "F - test-trace-scroll/up1-1" -2077 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/up1-1/cursor" -2078 check-screen-row screen, 2/y, "1 line 6 ", "F - test-trace-scroll/up1-2" -2079 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/up1-2/cursor" -2080 check-screen-row screen, 3/y, "1 line 7 ", "F - test-trace-scroll/up1-3" -2081 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/up1-3/cursor" +2072 clear-screen screen +2073 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +2074 check-screen-row screen, 0/y, "1 line 4 ", "F - test-trace-scroll/up1-0" +2075 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-scroll/up1-0/cursor" +2076 check-screen-row screen, 1/y, "1 line 5 ", "F - test-trace-scroll/up1-1" +2077 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/up1-1/cursor" +2078 check-screen-row screen, 2/y, "1 line 6 ", "F - test-trace-scroll/up1-2" +2079 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/up1-2/cursor" +2080 check-screen-row screen, 3/y, "1 line 7 ", "F - test-trace-scroll/up1-3" +2081 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/up1-3/cursor" 2082 # scroll up 2083 edit-trace t, 2/ctrl-b -2084 clear-screen screen -2085 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor -2086 check-screen-row screen, 0/y, "1 line 0 ", "F - test-trace-scroll/up2-0" -2087 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-scroll/up2-0/cursor" -2088 check-screen-row screen, 1/y, "1 line 1 ", "F - test-trace-scroll/up2-1" -2089 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/up2-1/cursor" -2090 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-scroll/up2-2" -2091 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/up2-2/cursor" -2092 check-screen-row screen, 3/y, "1 line 3 ", "F - test-trace-scroll/up2-3" -2093 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/up2-3/cursor" +2084 clear-screen screen +2085 var y/ecx: int <- render-trace screen, t, 0/xmin, 0/ymin, 0x10/xmax, 4/ymax, 1/show-cursor +2086 check-screen-row screen, 0/y, "1 line 0 ", "F - test-trace-scroll/up2-0" +2087 check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, "|||||||| ", "F - test-trace-scroll/up2-0/cursor" +2088 check-screen-row screen, 1/y, "1 line 1 ", "F - test-trace-scroll/up2-1" +2089 check-background-color-in-screen-row screen, 7/bg=cursor, 1/y, " ", "F - test-trace-scroll/up2-1/cursor" +2090 check-screen-row screen, 2/y, "1 line 2 ", "F - test-trace-scroll/up2-2" +2091 check-background-color-in-screen-row screen, 7/bg=cursor, 2/y, " ", "F - test-trace-scroll/up2-2/cursor" +2092 check-screen-row screen, 3/y, "1 line 3 ", "F - test-trace-scroll/up2-3" +2093 check-background-color-in-screen-row screen, 7/bg=cursor, 3/y, " ", "F - test-trace-scroll/up2-3/cursor" 2094 } 2095 2096 # saving and restoring trace indices -- cgit 1.4.1-2-gfad0