\ \ Last change: KS 30.09.2015 14:16:49 \ \ The Original Code is: MESSAGES.FS \ \ Definition of warnings, errors and host execution tokens : .error ( -n -- ) cr #warmboot case? IF ." warmboot " EXIT THEN #all_tasks_busy case? IF ." all_tasks_busy " EXIT THEN #task_not_linked case? IF ." task_not_linked " EXIT THEN #catch_not_initialized case? IF ." catch_not_initialized " EXIT THEN #not_my_semaphore case? IF ." not_my_semaphore " EXIT THEN #uninitialized_buffer case? IF ." uninitialized_buffer " EXIT THEN #pointer_already_initialized case? IF ." pointer_already_initialized " EXIT THEN #buffer_too_small case? IF ." buffer_too_small " EXIT THEN #index_overflow case? IF ." index_overflow " EXIT THEN #unassigned_reference case? IF ." unassigned_reference " EXIT THEN #unassigned_array case? IF ." unassigned_array " EXIT THEN #array_overflow case? IF ." array_overflow " EXIT THEN ." error: " .hex ; : .warning ( +n -- ) cr ." warning: " #string_overflow case? IF ." string_overflow " EXIT THEN .hex ; \ debug words that can be compiled on the target to be executed by the host : do_messages ( n -- ) dup 0< IF State off .error EXIT THEN #dot case? IF target> . EXIT THEN #udot case? IF target> tu. EXIT THEN #dotr case? IF dtarget> .r EXIT THEN #ddot case? IF dtarget> d. EXIT THEN #cret case? IF cr EXIT THEN #here case? IF Tdp @ >target EXIT THEN #allot case? IF target> Tdp +! EXIT THEN #emit case? IF target> emit EXIT THEN dup $3FFF > IF .warning EXIT THEN cr ." message: " .hex ;