[quirks-uvm-devel] New features were added
Status: Pre-Alpha
Brought to you by:
teodor
From: Sergei L. <se...@mo...> - 2002-04-07 19:20:44
|
I am glad to introduce new feature in VM. Now we can use debug printing from Quirks programs. New commands are: print "string"; print <cell>; printn "string"; printn <cell>; `printn' is the same as `print' but doesn't feed a line after printing. All printing is performed to standard output. Normally these commands are ignored when an instance for a procedure is created. But if we give "debug" property to instance maker: make instance of :proc (debug) it instantiates all these commands. This property can be added to the property list with others parameters, for example: make instance of :proc (DU, debug) (the order of properties can be arbitrary). Thus, now we can write our "Hello, World!" program :) : procedure :HelloWorld is begin print "Hello, World!"; end :HelloWorld; as well as a counter program: procedure :Counter is lv is <int32/inout int32/inout stu>; declare map auInc is <int32/in int32/out stu>; auCmp is <int32/in int32/in int32/out stu>; map is (auInc[0], lv[0]) (auInc[1], lv[0]) (auCmp[0], lv[0]) (auCmp[1], ct[1]) (auCmp[2], lv[1]) end map; begin printn "Print all numbers from " printn ct[0]; printn " to "; printn ct[1]; print ":"; lv[0] <- ct[0]; loop print lv[0]; until not auCmp[2]; print lv[0]; end :Counter; ========== For Maxim: 2 new backend variables were added: void (*_generate_debug_print_cell) (const Cell* cell, int nl); void (*_generate_debug_print_string) (const char* str, int nl); =========== For Bhavani: You can try add printing to your CtoF program, I'd like you get it successfully executed. I'd like include it as an example of these commands in 1.1d3 release (before the 15 of April). =========== Changes summary: can be browsed in CVS by the description string "TASK 51575". -- Sergei |