; EXWINDOW.MAC ; ; ; This program can be used with the Osborne Executive to ; 1) split the screen either horizontally or vertically ; into two windows; ; 2) switch from window #1 to window #2; or ; 3) reset the screen window to the normal full size. ; ; ; Command format: ; ; window { h | v | 1 | 2 | r } ; ; where h = horizontal screen split ; v = vertical screen split ; r = reset to normal screen window (full size) ; 1 = switch to window 1 ; 2 = switch to window 2 ; ; Program author: Paul Woodie (Woodie -at Dockmaster) ; December, 1985 ; (301) 859-6044 days ; (301) 974-0650 evenings ; ; prntdta macro @data ;define a macro for 'print string' lxi d,@data ;point to data string to be printed mvi c,9 ;bdos 'print string' function call bdos ;do it! endm ; bdos equ 00005h esc equ 1bh cls equ 1ah ; org 100h ; lda 80h ;get length of command tail cpi 2 ;is it one char long (+ the space) jnz error ;no, print error message lda 82h ;get the one-char command tail cpi 'H' jz hsplit ;split the screen horizontally cpi 'h' jz hsplit cpi 'V' jz vsplit ;split the screen vertically cpi 'v' jz vsplit cpi 'R' jz reset ;reset the screen cpi 'r' jz reset cpi '1' jz window1 ;select window 1 cpi '2' jz window2 ;select window 2 ; ; jmp error ;incorrect command tail ; ; hsplit: prntdta hdata jmp 0 ;return to cpm vsplit: prntdta vdata jmp 0 window1: prntdta w1data jmp 0 window2: prntdta w2data jmp 0 reset: prntdta resetdata jmp 0 ; ; error: prntdta prompt ;print error message jmp 0 ; prompt db 0dh,0ah,'Command Form:' db 0dh,0ah,0ah,'window { h | v | 1 | 2 | r }',0dh,0ah,'$' hdata db esc,cls db esc,'=',32+11,32+00 ;direct cursor addressing db '----------------------------------------' db '----------------------------------------' db esc,'=',32+12,32+00 ;direct cursor addressing db '----------------------------------------' db '----------------------------------------' ; Data above draws dividing line between windows ; define window 2, then 1 db esc,'z','2',32+13,32+0,32+23,32+79 db esc,'z','1',32+0,32+0,32+10,32+79 db esc,cls,'Top window is #1.',0dh,0ah,0ah,'$' ; vdata db esc,cls ; direct cursor address plus two bytes of data db esc,'=',32+01,32+39,'||' db esc,'=',32+03,32+39,'||' db esc,'=',32+05,32+39,'||' db esc,'=',32+07,32+39,'||' db esc,'=',32+09,32+39,'||' db esc,'=',32+11,32+39,'||' db esc,'=',32+13,32+39,'||' db esc,'=',32+15,32+39,'||' db esc,'=',32+17,32+39,'||' db esc,'=',32+19,32+39,'||' db esc,'=',32+21,32+39,'||' db esc,'=',32+23,32+39,'||' ; Data above draws dividing line between windows ; define window 2, then 1 db esc,'z','2',32+0,32+41,32+23,32+79 db esc,'z','1',32+0,32+0,32+23,32+38 db esc,cls,'Left window is #1.',0dh,0ah,0ah,'$' w1data db esc,'s','1','Now in window 1.','$' w2data db esc,'s','2','Now in window 2.','$' resetdata db esc,'z','1',32+0,32+0,32+23,32+79 db esc,cls,'Screen reset to normal.',0dh,0ah,0ah,'$' ; end