;KPCURS20.MAC - July 24, 1987 ;Jon Lindsay, San Jose, CA ;set the cursor shape ; ;was assembled using M80 ; aseg ; org 100h ; jmp begin db 'Jon Lindsay San Jose, CA' stack: oldsp: dw 0 begin: lxi h,0 dad sp shld oldsp lxi sp,stack ; shape equ 1dh cr equ 13 lf equ 10 ; lda 5ch+1 ;check for command tail cpi 20h jz labb0 ;if not tail, do normal entry lda 5dh ;get input jmp labb01 ;bypass message and prompt ; labb0: mvi e,26 mvi c,2 call 5 ; mvi c,9 lxi d,mesq1 call 5 ; labb00: mvi c,1 call 5 labb01: cpi '1' ;flashing block jnz labb1 mvi a,0ah out 1ch mvi a,64 out shape jmp term labb1: cpi '2' ;flashing fat underline jnz labb11 mvi a,0ah out 1ch mvi a,77 out shape jmp term labb11: cpi '3' ;flashing thin underline jnz labb2 mvi a,0ah out 1ch mvi a,79 out shape jmp term labb2: cpi '4' ;solid block - no flash jnz labb3 mvi a,0ah out 1ch mvi a,0 out shape jmp term labb3: cpi '5' ;fat underline - no flash jnz labb31 mvi a,0ah out 1ch mvi a,13 out shape jmp term labb31: cpi '6' ;underline - no flash jnz labb4 mvi a,0ah out 1ch mvi a,15 out shape jmp term labb4: cpi '7' ;cursor off jnz labb5 lxi d,curoff call prstr jmp term curoff: db 27,'C4$' labb5: cpi '8' ;cursor on jnz labb6 lxi d,curon call prstr jmp term curon: db 27,'B4$' labb6: cpi '9' ;return to CP/M jnz labb0 jmp term ; term: lhld oldsp sphl ret ; prstr: mvi c,9 jmp 5 ; mesq1: db 'Cursor Form v2.0: Kaypro (graphics) -J.Lindsay ',cr,lf,lf db 'Select cursor shape by typing number:',cr,lf,lf db 'Can also enter selection from CP/M command line' db cr,lf,'Example: A>CURSOR 6 <-- produce thin line cursor' db cr,lf,lf db '1 ==> Block - fast flashing',cr,lf db '2 ==> Underline (fat) - flashing',cr,lf db '3 ==> Underline (thin) - flashing',cr,lf db '4 ==> Block - nonflashing',cr,lf db '5 ==> Underline (fat) - nonflashing',cr,lf db '6 ==> Underline (thin) - nonflashing',cr,lf db '7 ==> Cursor OFF',cr,lf db '8 ==> Cursor ON (original cursor)',cr,lf db '9 ==> Return to CP/M without change : ' db '$' ; end