(setq cursoron (new CHAR_WIDTH)) (setq cursoroff (new CHAR_WIDTH)) (setq i 0) (while (lt i CHAR_WIDTH) (iasgn (add cursoron i) 1 255) (iasgn (add cursoroff i) 1 0) (setq i (add i 1)) ) ;* open a handle to the timer device for every 500msec (1/2 sec) (setq hcursor (openpath "/dev/timer/500")) ;* Function cursor does the actual writes to the screen for the blinking. (de cursor (x) (cond (gblinkstate (writefile hmono cursoron (xyify (mul CHAR_WIDTH gcol) (add CHAR_HEIGHT -2 (mul CHAR_HEIGHT grow))) CHAR_WIDTH) (writefile hmono cursoron (xyify (mul CHAR_WIDTH gcol) (add CHAR_HEIGHT -1 (mul CHAR_HEIGHT grow))) CHAR_WIDTH) (setq gblinkstate nil) ) (t (writefile hmono cursoroff (xyify (mul CHAR_WIDTH gcol) (add CHAR_HEIGHT -2 (mul CHAR_HEIGHT grow))) CHAR_WIDTH) (writefile hmono cursoroff (xyify (mul CHAR_WIDTH gcol) (add CHAR_HEIGHT -1 (mul CHAR_HEIGHT grow))) CHAR_WIDTH) (setq gblinkstate t) ) ) ) ;* make cursor get called every 500msec (writefile hcursor nil "cursor")