[cc65] ca65: macro parameter types

Date view Thread view Subject view

From: Stephan Lesch (slesch_at_studcs.uni-sb.de)
Date: 2003-11-22 00:56:07


Good evening,

I would like to write a macro that takes a string OR a number as
an argument and distinguishes the types, like
.macro print arg
	.if "arg is numeric"
		.word arg
	.else
		.pushseg
		.segment "STRINGS"
		.local txt
txt:		.asciiz arg
		.popseg
		.word txt
	.endif
.endmacro

Is there a way to do this? At the moment, I'm using two separate macros.

Best wishes,
Stephan


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-11-22 00:59:40 CET