Bram Moolenaar | e4f25e4 | 2017-07-07 11:54:15 +0200 | [diff] [blame] | 1 | INIT |
| 2 | WANTSCREEN c |
| 3 | |
| 4 | !Get |
| 5 | RESET |
| 6 | PUSH "ABC" |
| 7 | movecursor 0,3 |
| 8 | ?screen_chars 0,0,1,3 = 0x41,0x42,0x43 |
| 9 | ?screen_chars 0,0,1,80 = 0x41,0x42,0x43 |
| 10 | ?screen_text 0,0,1,3 = 0x41,0x42,0x43 |
| 11 | ?screen_text 0,0,1,80 = 0x41,0x42,0x43 |
| 12 | ?screen_cell 0,0 = {0x41} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0) |
| 13 | ?screen_cell 0,1 = {0x42} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0) |
| 14 | ?screen_cell 0,2 = {0x43} width=1 attrs={} fg=rgb(240,240,240) bg=rgb(0,0,0) |
| 15 | ?screen_row 0 = "ABC" |
| 16 | ?screen_eol 0,0 = 0 |
| 17 | ?screen_eol 0,2 = 0 |
| 18 | ?screen_eol 0,3 = 1 |
| 19 | PUSH "\e[H" |
| 20 | movecursor 0,0 |
| 21 | ?screen_chars 0,0,1,80 = 0x41,0x42,0x43 |
| 22 | ?screen_text 0,0,1,80 = 0x41,0x42,0x43 |
| 23 | PUSH "E" |
| 24 | movecursor 0,1 |
| 25 | ?screen_chars 0,0,1,80 = 0x45,0x42,0x43 |
| 26 | ?screen_text 0,0,1,80 = 0x45,0x42,0x43 |
| 27 | |
| 28 | WANTSCREEN -c |
| 29 | |
| 30 | !Erase |
| 31 | RESET |
| 32 | PUSH "ABCDE\e[H\e[K" |
| 33 | ?screen_chars 0,0,1,80 = |
| 34 | ?screen_text 0,0,1,80 = |
| 35 | |
| 36 | !Copycell |
| 37 | RESET |
| 38 | PUSH "ABC\e[H\e[@" |
| 39 | PUSH "1" |
| 40 | ?screen_chars 0,0,1,80 = 0x31,0x41,0x42,0x43 |
| 41 | |
| 42 | RESET |
| 43 | PUSH "ABC\e[H\e[P" |
| 44 | ?screen_chars 0,0,1,1 = 0x42 |
| 45 | ?screen_chars 0,1,1,2 = 0x43 |
| 46 | ?screen_chars 0,0,1,80 = 0x42,0x43 |
| 47 | |
| 48 | !Space padding |
| 49 | RESET |
| 50 | PUSH "Hello\e[CWorld" |
| 51 | ?screen_chars 0,0,1,80 = 0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,0x72,0x6c,0x64 |
| 52 | ?screen_text 0,0,1,80 = 0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,0x72,0x6c,0x64 |
| 53 | |
| 54 | !Linefeed padding |
| 55 | RESET |
| 56 | PUSH "Hello\r\nWorld" |
| 57 | ?screen_chars 0,0,2,80 = 0x48,0x65,0x6c,0x6c,0x6f,0x0a,0x57,0x6f,0x72,0x6c,0x64 |
| 58 | ?screen_text 0,0,2,80 = 0x48,0x65,0x6c,0x6c,0x6f,0x0a,0x57,0x6f,0x72,0x6c,0x64 |
| 59 | |
| 60 | !Altscreen |
| 61 | RESET |
| 62 | PUSH "P" |
| 63 | ?screen_chars 0,0,1,80 = 0x50 |
| 64 | PUSH "\e[?1049h" |
| 65 | ?screen_chars 0,0,1,80 = |
| 66 | PUSH "\e[2K\e[HA" |
| 67 | ?screen_chars 0,0,1,80 = 0x41 |
| 68 | PUSH "\e[?1049l" |
| 69 | ?screen_chars 0,0,1,80 = 0x50 |