Starting Out With SX Assembler
microcontrolleruser
Posts: 1,194
Here's the code.Will put questions in next post.
; ;DETAILS: ; This code demonstrates configuring the I/O pin direction (input/output). ;======================================================================= ;-------------------------- DEVICE DIRECTIVES -------------------------- DEVICE SX28,OSC4MHZ,TURBO IFDEF __SASM ;SASM Directives DEVICE STACKX,OPTIONX IRC_CAL IRC_SLOW ELSE ;Parallax Assember Directives DEVICE STACKX_OPTIONX ENDIF RESET Initialize ;---------------------------- DEBUG SETTINGS --------------------------- FREQ 4_000_000 ;------------------------ INITIALIZATION ROUTINE ----------------------- Initialize ;Port Direction Configuration mov ra,#%0000 ;Set port A low mov rb,#%11111111 ;Set port B high mov rc,#%11110000 ;Set port C bits 4-7 high, 0-3 low mov W,#$1F ;Allow Direction configuration mov M,W mov !ra,#%0000 ;Set port A bits 0-3 to output mov !rb,#%11111111 ;Set port B bits 0-7 to input mov !rc,#%00000000 ;Set port C bits 0-7 output ;---------------------------- MAIN PROGRAM ----------------------------- Main jmp Main
Comments
How do you know if you are in SASM or PASM?
I would like to clean this up and just have one set of directives in there.
Figured it out;Sort of.We are in SASM according to Configure.
Okay.Anybody know what SASM is? Scenix assembler compiler?
Found out what SASM is.From SX Blitz guide.