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 14:09, local time: 2024/11/15 11:18,
TOP NEW HELP FIND: 
18.218.119.28:LOG IN

 ©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://massmind.ecomorder.com/techref/scenix/sasmport.src"> scenix sasmport</A>

Did you find what you needed?

 

Welcome to ecomorder.com!

 
Quick, Easy and CHEAP! RCL-1 RS232 Level Converter in a DB9 backshell
Ashley Roll has put together a really nice little unit here. Leave off the MAX232 and keep these handy for the few times you need true RS232!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .