uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

check-rom.tal (367B)


      1 @check-rom ( filename* -- 00 if the file doesn't exist or not a valid ROM
      2                        OR 01 if the ROM seems to be valid )
      3 	.File/name DEO2
      4 	#0001 .File/length DEO2
      5 	;&first-char .File/read DEO2
      6 
      7 	( did the file read okay? )
      8 	.File/success DEI2 ORA
      9 
     10 	( is the first character a LIT, LIT2, LITk or LIT2k? )
     11 	LIT &first-char $1 #9f AND #80 EQU
     12 
     13 	AND
     14 	JMP2r
     15