Using sll with z80asm Version 1.8

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
2late
Posts: 15
Joined: Fri Apr 26, 2019 12:00 pm

Using sll with z80asm Version 1.8

Post by 2late »

I want to use one of the shift left logical directives. According to the headline here http://z80-heaven.wikidot.com/instructions-set:sll they can either be written SLL or SL1. However the table shows sla directives, which do work as expected. But I have no success with using SLL instead..

The program is

Code: Select all

ORG 49152
SLL A
RET
which should be easy enough. However it gives me

Code: Select all

$ z80asm -v -i sllatest.zas -o sllatest.sna
Assembling....
sllatest.zas:2: error: command or comment expected (was  A )
*** 1 error found ***
I can't help feeling like I'm comitting some probably very stupid error.
olofsen
Posts: 177
Joined: Wed Jan 08, 2014 12:29 pm

Re: Using sll with z80asm Version 1.8

Post by olofsen »

Apparently z80asm doesn't know this undocumented instruction... For example zasm and sjasm do handle it:

https://k1.spdns.de/Develop/Projects/zasm/
http://www.xl2s.tk/
2late
Posts: 15
Joined: Fri Apr 26, 2019 12:00 pm

Re: Using sll with z80asm Version 1.8

Post by 2late »

Thanks for trying it out. I wasn't aware that this is no official Zilog instruction. It seems that I have to consider another assembler then or stick to the mundane, something like

Code: Select all

SLA A
OR 1
Last edited by 2late on Tue Apr 30, 2019 11:51 am, edited 1 time in total.
User avatar
1024MAK
Posts: 3245
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Using sll with z80asm Version 1.8

Post by 1024MAK »

There is lots of information on the Z80 and it’s instruction set on http://www.z80.info/ ;)

Mark
2late
Posts: 15
Joined: Fri Apr 26, 2019 12:00 pm

Re: Using sll with z80asm Version 1.8

Post by 2late »

1024MAK wrote: Sun Apr 28, 2019 12:12 am There is lots of information on the Z80 and it’s instruction set on http://www.z80.info/ ;)
Thanks.
I also used http://clrhome.org/table/# but the mouse over fly out always goes to the right i.e. goes over the edge of my screen for the right most column. Also all jr and jp instructions have the same, purely abstract description.

Ah, the memorys. When I learned from the "Cheap Video Cookbook" how my 81 worked. I had struggled endlessly with 1k being put into the $2000 - $3FFF rang to put the charset there. Then it finally dawned on me that one had to connect them to the "video bus" which wasn't available on the outside, i.e. through the standard connector.
hlide
Posts: 4
Joined: Sat Jun 06, 2020 12:55 am

Re: Using sll with z80asm Version 1.8

Post by hlide »

2late wrote: Sat Apr 27, 2019 4:28 pm Thanks for trying it out. I wasn't aware that this is no official Zilog instruction. It seems that I have to consider another assembler then or stick to the mundane, something like

Code: Select all

SLA A
OR 1
nah, use something like

Code: Select all

DB $CB,$37 ; SLL A
Why? OR will affect C flag in the wrong way if you want to use it through SLL.
2late
Posts: 15
Joined: Fri Apr 26, 2019 12:00 pm

Re: Using sll with z80asm Version 1.8

Post by 2late »

hlide wrote: Sun Jun 07, 2020 5:31 pm nah, use something like

Code: Select all

DB $CB,$37 ; SLL A
Why? OR will affect C flag in the wrong way if you want to use it through SLL.
Good point. Thanks. Didn't seem to matter in my case though.
Post Reply