proc xmit {b} {
global p
- puts -nonewline $p [format %c $b]
+ p $p [format %c $b]
}
proc xmit_s {b} {
setup_$ms
+proc p {s} { puts -nonewline $s }
+
proc endline {} {
global inline displine
- if {$inline} { puts -nonewline "\n"; incr displine }
+ if {$inline} { p "\n"; incr displine }
set inline 0
}
global insection section displine addr shownsection inline
if {$insection && [string compare $section $shownsection]} {
endline
- puts "---------- $section ----------"
+ p "---------- $section ----------\n"
set shownsection $section
set displine 0
} elseif {!$insection && [string length $shownsection]} {
endline
- puts "------------------------------"
+ p "------------------------------\n"
set shownsection {}
set displine 0
}
if {[string length $sym]} {
if {$displine && $inline && !($displine&3)} {
- puts -nonewline "\n"
+ p "\n"
}
endline
}
if {!$inline} {
- puts -nonewline [format "%08x %-15s %-20s" $addr \
+ p [format "%08x %-15s %-20s" $addr \
[lindex $sym 0] [lindex $sym 1]]
set inline 1
}
show {}
set bytes [readbytes $addr $now]
foreach b $bytes {
- puts -nonewline [format " %02x" [expr {$b & 0xff}]]
+ p [format " %02x" [expr {$b & 0xff}]]
incr addr
}
set inline 1