a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
Include
 classes
 clib
 datatypes
 devices
 diskfont
 dos
 exec
  ables.i
  alerts.i / .h
  avl.h
  devices.i / .h
  errors.i / .h
  exec.i / .h
  exec_lib.i
  execbase.i / .h
  initializers.i / .h
  interrupts.i / .h
  io.i / .h
  libraries.i / .h
  lists.i / .h
  macros.i
  memory.i / .h
  nodes.i / .h
  ports.i / .h
  resident.i / .h
  semaphores.i / .h
  strings.i
  tasks.i / .h
  types.i / .h
 gadgets
 graphics
 hardware
 images
 intuition
 libraries
 pragma
 pragmas
 prefs
 proto
 reaction
 resources
 rexx
 utility
 workbench
GuruMeditation
Docs » Include » exec » initializers.i / .h
	IFND	EXEC_INITIALIZERS_I
EXEC_INITIALIZERS_I	SET	1
**
**	$VER: initializers.i 39.0 (15.10.1991)
**	Includes Release 45.1
**
**	Macros for creating InitStruct() tables
**
**	(C) Copyright 1985-2001 Amiga, Inc.
**	    All Rights Reserved
**

INITBYTE	MACRO	; &offset,&value
		IFLE	(\1)-255	;If offset <=255
		DC.B	$a0,\1		;use byte offset
		DC.B	\2,0
		MEXIT			;exit early
		ENDC
		DC.B	$e0,0
		DC.W	\1
		DC.B	\2,0
		ENDM

INITWORD	MACRO	; &offset,&value
		IFLE	(\1)-255	;If offset <=255
		DC.B	$90,\1		;use byte offset
		DC.W	\2
		MEXIT			;exit early
		ENDC
		DC.B	$d0,0
		DC.W	\1
		DC.W	\2
		ENDM

INITLONG	MACRO	; &offset,&value
		IFLE	(\1)-255	;If offset <=255
		DC.B	$80,\1		;use byte offset
		DC.L	\2
		MEXIT			;exit early
		ENDC
		DC.B	$c0,0
		DC.W	\1
		DC.L	\2
		ENDM

;size=source size 0=long, 1=word, 2=byte, 3=illegal.
;offset=offset from memory base to put data
;value=unused
;count=number of source items to copy, minus one
;follow this macro with the proper sized data (dc.b,dc.w,dc.l,etc.)
INITSTRUCT	MACRO	; &size,&offset,&value,&count
		DS.W	0
		IFC	'\4',''
COUNT\@	SET	0
		ENDC
		IFNC	'\4',''
COUNT\@	SET	\4
		ENDC
CMD\@		SET	(((\1)<<4)!COUNT\@)
		IFLE	(\2)-255	;byte offset large enough?
		DC.B	(CMD\@)!$80
		DC.B	\2
		MEXIT
		ENDC
		DC.B	CMD\@!$0C0	;byte too small, use 24-bit offset.
		DC.B	(((\2)>>16)&$0FF)
		DC.W	((\2)&$0FFFF)
		ENDM

	ENDC	; EXEC_INITIALIZERS_I

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Andromeda

AOA
FC
AFL
PHA

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se