Motorola M68CPU32BUG User Manual Page 59

  • Download
  • Add to my manuals
  • Print
  • Page
    / 98
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 58
SYSTEM CALLS
M68CPU32BUG/D REV 1 5-6
.CHANGEV Parse Value, Assign to Variable .CHANGEV
If the above code was called with a syscall routine and BUFFER contained ’1 3’ in pointer/count
format and POINT contained 2 (longwords), then COUNT would be assigned the value 3, and
POINT would contain 4 (pointing to first character past 3). Note that POINT is the offset of the
buffer start address (not the address of the first character in the buffer) to the next character to
process. In this case, a value of 2 in POINT indicates that the space between 1 and 3 is the next
character to be processed. After calling .CHANGEV, the screen displays:
COUNT = 3
If the above code was called again, nothing could be parsed from BUFFER, so a prompt would
be issued. For example, if the string 5 is entered in response to the prompt.
COUNT = 3? 5<CR>
COUNT = 5
If in the previous example nothing had been entered at the prompt, COUNT would retain its prior
value.
COUNT = 3? <CR>
COUNT = 3
SYSTEM CALLS
M68CPU32BUG/D REV 1 5-3
Table 5-1. CPU32Bug System Call Routines
Function Trap Code Description
.BINDEC $0064 Convert binary to Binary Coded Decimal (BCD)
.CHANGEV $0067 Parse value
.CHKBRK $0005 Check for break
.DELAY $0043 Timer delay function
.DIVU32 $006A Divide two 32-bit unsigned integers
.ERASLN $0027 Erase line
.INCHR $0000 Input character
.INLN $0002 Input line (pointer/pointer format)
.INSTAT $0001 Input serial port status
.MULU32 $0069 Multiply two 32-bit unsigned integers
.OUTCHR $0020 Output character
.OUTLN $0022 Output line (pointer/pointer format)
.OUTSTR $0021 Output string (pointer/pointer format)
.PCRLF $0026 Output carriage return and line feed
.READLN $0004 Input line (pointer/count format)
.READSTR $0003 Input string (pointer/count format)
.RETURN $0063 Return to CPU32Bug
.SNDBRK $0029 Send break
.STRCMP $0068 Compare two strings (pointer/count format)
.TM_INI $0040 Timer initialization
.TM_RD $0042 Read timer
.TM_STR0 $0041 Start timer at T=0
.WRITD $0028 Output string with data (pointer/count format)
.WRITDLN $0025 Output line with data (pointer/count format)
.WRITE $0023 Output string (pointer/count format)
.WRITELN $0024 Output line (pointer/count format)
Fr
eescale S
emiconduct
or
, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Page view 58
1 2 ... 54 55 56 57 58 59 60 61 62 63 64 ... 97 98

Comments to this Manuals

No comments