please dont rip this site

Scenix Sasmport.src

;MACROS --------------------------------------------------------------------------

; Port r[a | b | c | d | e] [in | out | pull | float | cmos | ttl] bits
;  sets the port mode and configuration for standard pins

in	EQU	$F00
out	EQU	$FFF
pull	EQU	$E00
float	EQU	$EFF
cmos	EQU	$D00
ttl	EQU	$DFF
sch	EQU	$CFF
inten	EQU	$B00
intedge	EQU	$A00
intpend EQU	$900

porthelp MACRO
	ERROR 'USAGE: port r[a,b,c,d,e] [in,out,pull,float,cmos,ttl] bits'
	ENDM

_PortMode = $1F

PortMode MACRO 1
	noexpand
; IF _PortMode <> \1 ;can't do this if you don't know how you got to this code.
IF CpuPins > 28
  _PortMode = \1 | $10
  expand
 mov w,#_PortMode
 mov m,w
  noexpand
ELSE
  _PortMode = \1
  expand
 mov	m,#_PortMode
  noexpand
ENDIF
;  ENDIF
 ENDM

port	MACRO	port, mode, mask
	noexpand
IF (port==ra) || (port==rb) 
ELSE
 IF (CpuPins > 18) && (port==rc) )
 ELSE
  IF (CpuPins > 28) && ((port==rd) || (port==re)) )
  ELSE
	porthelp
   ENDIF
  ENDIF
 ENDIF
IF port==RB && ((?mode=='sch') || (?mode=='inten') || (?mode=='intedge') || (?mode=='intpend'))
ELSE
 IF (?mode=='in') || (?mode=='out') || (?mode=='pull') || (?mode=='float') || (?mode=='cmos') || (?mode=='ttl')
 ELSE
  porthelp
  ENDIF
 ENDIF
	PortMode (mode / $100) 
	expand
 mov !port, #(mode//$100)^mask
	noexpand
	ENDM



file: /Techref/scenix/sasmport.src, 1KB, , updated: 2002/8/13 15:09, local time: 2024/10/9 18:35,
TOP NEW HELP FIND: 
44.200.94.150:LOG IN
©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://www.piclist.com/Techref/scenix/sasmport.src"> scenix sasmport</A>

Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
 

Welcome to www.piclist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .