mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-11-26 17:49:18 +00:00
1 line
18 KiB
Plaintext
1 line
18 KiB
Plaintext
|
This display interface uses BIOS call $10 functions for a fast display interface. A couple of state variables is contained in a vector that is task specific such that different tasks may use different windows. For simplicity windows always span the whole width of the screen. They can be defined by top and bottom line. This mechanism is used for a convenient status display line on the bottom of the screen. \ Multitsking display interface loadscreen ks cas 10nov05 Onlyforth \needs Assembler 2 loadfrom asm.scr User area area off \ points at active window Variable status \ to switch status on/off | Variable cursor \ points at area with active cursor 1 8 +thru .( Multitasking display driver loaded ) cr \ Multitsking display interface ks 6 sep 86 : Area: Create 0 , 0 , 7 c, Does> area ! ; \ | col | row | top | bot | att | Area: terminal terminal area @ cursor ! : (area Create dup c, 1+ Does> c@ area @ + ; 0 | (area ccol | (area crow | (area ctop | (area cbot (area catt drop : window ( topline botline -- ) cbot c! ctop c! ; : full 0 c/col 2- window ; full \ Multitask (type (emit ks 20 dez 87 Code (type ( addr len -- ) W pop I push R push u' area U D) I mov U push D U mov $F # A+ mov $10 int u' catt I D) R- mov 3 # A+ mov $10 int C push D push $E0E # C mov 1 # A+ mov $10 int I ) D mov 1 # C mov U inc [[ U dec 0= not ?[[ 2 # A+ mov $10 int D- inc ' c/row >body #) D- cmp 0= not ?[[ W ) A- mov W inc 9 # A+ mov $10 int ]]? ]? D I ) mov D pop cursor #) I cmp 0= ?[ I ) D mov ]? 2 # A+ mov $10 int C pop 1 # A+ mov $10 int U pop R pop I pop D pop ' pause #) jmp end-code : (emit ( char -- ) sp@ 1 (type drop ;
|