XCASM is a high level relocating macro meta assembler. XCASM has high level optimising code generation facilities. It can convert high level statements into executable machine code. This web page provides an internet interface to XCASM for the perpose of simple evaluation. Please pay special attension to the very tight efficient code produced by the optimising code generator. This version of XCASM is the restricted 8 bit version (hobbyist / student LITE) configured for the PIC 16F84. The 16 bit version (hobbyist / student STANDARD and commercial Pro versions) can generate efficient optimised assembler code for high level statements using mixed 8 / 16 bit values. Further related items of interest XCASM documentation XCASM companion simulator (XCSIM) screen shot ZMech PIC CASE tool (uses XCASM and XCSIM) ZMech screen shot Purchasing Other products OPERATION: select a predefined expression OR write your own, then generate code for it by clicking on the assocated icon Predefined ExampleExpressions User Defined Expression Simple .let A = A + 1 .let A = A + 5 .let A = A - 1 .let A = A - 5 .let A = A << 1 .let A = A >> 1 .let A = D + E .let A = A + D + E .let A = A - (D + E) .let A = A | 4 .let A = A | 5 .let A = A & ~4 .let A = A & ~5 .let A = B + 1 .let A = B + 5 .let A = B - 1 .let A = B - 5 .let A = B << 1 .let A = B >> 1 Bits .let A = A | 4 .let A = A & ~4 .let A = A & 0xEF .let A = A | (1 << 3) .let A[j] = A[j] | 4 .let A[j] = A[j] & ~4 .let A = A | 5 .let A = A & ~5 .let A[j] = A[j] | 5 .let A[j] = A[j] & ~5 Arrays .let A = D [j] + E[j] .let A[j+1] = A[j+1] + D[j] .let A[j] = A[j] + 1 .let A[j] = A[j] + 5 Code Space Arrays .let A = D[j] + P[j] .let A[j] = S[j] + P[j] .let A[j+1] = A[j+1] + P[j] Pointers .let A = *D + *E .let *A = *A + B .let *A = *(A+j) + B .let *A = *(&B + j) Logical .let A = D == E .let A = (D == E) && (G == H) .let A = (D == E) || (G == H) Conditional Execution xif A == B xthen .let A = A + 1 xif A == B xthen goto lab0001 xif A == B xthen movlw 19 Custom .sect data_sect .data .org 16 A .ds 1 B .ds 1 .sect code_sect .code .org 0 MyRndUp .macro arg1, arg2 incf arg1,w andlw 0xfe movwf arg2 .endm xif A == B xthen MyRndUp A, B
This version of XCASM is the restricted 8 bit version (hobbyist / student LITE) configured for the PIC 16F84. The 16 bit version (hobbyist / student STANDARD and commercial Pro versions) can generate efficient optimised assembler code for high level statements using mixed 8 / 16 bit values.
Further related items of interest
OPERATION: select a predefined expression OR write your own, then generate code for it by clicking on the assocated icon