Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible parser label issue #34

Open
dougajmcdonald opened this issue Mar 18, 2018 · 1 comment
Open

Possible parser label issue #34

dougajmcdonald opened this issue Mar 18, 2018 · 1 comment
Labels
core-repo enhancement Enhacement of existing functionality question Further information is requested

Comments

@dougajmcdonald
Copy link
Contributor

This guy doesn't parse, gives errors about unknown labels:

;redcode-94
;name Bubbly Sort 1b
;author Ilmari Karonen
;strategy Going for the size point with this one..
;strategy I hope I'm not too late, good reason:
;strategy  I've spent the last twelve days a few
;strategy  kilometers away from the nearest modem,
;strategy  and so couldn't participate earlier, or
;strategy  even know that the tournament had begun
;strategy Written and optimized in a few hours for
;strategy size only!
;strategy  length: 10 instructions
;strategy  speed: ITEMS*(ITEMS-1)/2 comparisons
;strategy         1 comparison = 2 cycles
;strategy         1 swap = 7 cycles (!)
;date Jul 14, 1997
;planar sort
;assert MAXLENGTH > 10

LAST    equ     (ITEMLIST+ITEMS-1)
temp    equ     (swap-1)

	org     loop

swap    mov.i   @ptr, temp
	mov.i   *ptr, >ptr
	mov.i   temp, }ptr
loop    slt.b   <ptr, {ptr
	djn.b   loop, count
	jmn.b   swap, count
count   mov.ab  #ITEMS-1, #ITEMS-1
	add.f   count, ptr
	djn.f   loop, count
ptr     dat.f   LAST, LAST+1

	end
line
char
type
message
31
18
ERROR
Unrecognised label 'ITEMS'
31
28
ERROR
Unrecognised label 'ITEMS'
34
17
ERROR
Unrecognised label 'ITEMLIST'
34
17
ERROR
Unrecognised label 'ITEMS'
34
23
ERROR
Unrecognised label 'ITEMLIST'
34
23
ERROR
Unrecognised label 'ITEMS'
@dougajmcdonald dougajmcdonald changed the title Possible label issue Possible parser label issue Mar 18, 2018
@gareththegeek
Copy link
Contributor

The error message is correct that ITEMS is not defined - I have no idea what this is meant to be...

Some special constant that isn't in the corewar standard I guess.

@gareththegeek gareththegeek transferred this issue from corewar/corewar Feb 24, 2020
@gareththegeek gareththegeek added core-repo enhancement Enhacement of existing functionality question Further information is requested labels Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-repo enhancement Enhacement of existing functionality question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants