PRAGMA differences?

Other misc things
Post Reply
WORP3
Member
Posts: 26
Joined: Thu Dec 29, 2022 12:51 pm

PRAGMA differences?

Post by WORP3 »

Why is it that the PRAGMA for startup must be in lower case and almost everything else in upper case? If I change this then it won't recognize this option anymore,strange.

Code: Select all

#pragma output startup = 0
#pragma output CRT_ENABLE_EIDI = 0
WORP3
Member
Posts: 26
Joined: Thu Dec 29, 2022 12:51 pm

Re: PRAGMA differences?

Post by WORP3 »

see:

using

Code: Select all

#pragma output CRT_ENABLE_EIDI = 0
You get this

Code: Select all

T008Bh	CDF300..  Íó..	CALL	T00F3H	;call to main	
T008Eh	E5......  å...	PUSH	HL		
T008Fh	E1......  á...	POP	HL		
T0090h	76......  v...	HALT			
T0091h	18FE....  .þ..	JR	0FEh			; Jump to 00091H
using

Code: Select all

#pragma output crt_enable_eidi = 0
You get this:

Code: Select all

T008Ch	FB......  û...	EI			
T008Dh	CDF600..  Íö..	CALL	T00F6H	;call to main
T0090h	E5......  å...	PUSH	HL		
T0091h	F3......  ó...	DI			
T0092h	E1......  á...	POP	HL		
T0093h	76......  v...	HALT			
T0094h	18FE....  .þ..	JR	0FEh			; Jump to 00094H
Same for startup but then it only works with lower case....
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Re: PRAGMA differences?

Post by dom »

It's a historical quirk. -startup= was originally a command line option rather than a pragma and so ended up with a lower case name. When the other command line options were changed to pragmas they changed name/became upper case (eg -zorg -> CRT_ORG_CODE)
WORP3
Member
Posts: 26
Joined: Thu Dec 29, 2022 12:51 pm

Re: PRAGMA differences?

Post by WORP3 »

Ohh ok that's not really beneficial to a quick start ;)
Is the startup pragma the only one that is in lower case? Or can I presume that everything else is in Capital like normal?
Post Reply