This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's
z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.
Z80 & 68k Assembly =>
z80 & ez80 Assembly
Author |
Message |
|
Sleight
Newbie
Joined: 22 Nov 2010 Posts: 9
|
Posted: 04 Jan 2011 11:46:22 pm Post subject: |
|
|
I am trying to make a program that uses the far most column and bottom row. (the ones that basic can't use)
Here's what I have, and I have no clue why it isn't working. Help please?
BCALL ClrLCDFull
BCALL RunIndicOff
Set fullScrnDraw,(IY+apiFlg4)
LD BC,0 ;bottom left corner
LD DE,95*256+63 ;top right corner
BCALL DarkLine
BCALL GetKey ;I get the same result even if I leave this off
Ret
Oh, and I'm using Mimas .3 on my calculator.
What (I think) this code should do is draw a line from the bottom left corner to the top right corner, including the pixels at the corners.
What I am getting is a line across the screen, but neither of the corner pixels are darkening.
So I am getting the line I want, it's just that (I think) it is clipping the parts of it that are in the "forbidden rows".
Thanks |
|
Back to top |
|
|
Ben24
Newbie
Joined: 28 Dec 2010 Posts: 16
|
Posted: 06 Jan 2011 12:04:07 am Post subject: |
|
|
It seems to be working fine for me. I'm guessing that the "GetKey" is there to pause the program until you press a key in order to prevent the rightmost column from clearing when the program exits and the "done" message is displayed?
This is how it looks on my calc (well... emulator):
(You'll notice the clearing of the rightmost column when the program exits)
I don't really have any suggestions for you other than, perhaps, to try it without Mimas. Maybe something is going wrong and the fullScrnDraw flag isn't being set correctly?
I'm totally new to assembly so forgive me if the above is incorrect, ludicrous, or if I haven't been of much help at all :P
- Ben
Last edited by Guest on 06 Jan 2011 12:08:27 am; edited 1 time in total |
|
Back to top |
|
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 06 Jan 2011 10:21:20 pm Post subject: |
|
|
Looks like the fullScrnDraw flag isn't correctly defined in Mimas. I'm sorry about that; I have no idea how that could have happened. You can write 'set 2, (iy + apiFlg4)' instead.
I'll release a fixed version of Mimas as soon as I have a chance. (But I guess while I'm at it, I should probably check to make sure I didn't screw up any other flag definitions!) |
|
Back to top |
|
|
Sleight
Newbie
Joined: 22 Nov 2010 Posts: 9
|
Posted: 07 Jan 2011 11:30:30 pm Post subject: |
|
|
FloppusMaximus wrote:
Looks like the fullScrnDraw flag isn't correctly defined in Mimas. I'm sorry about that; I have no idea how that could have happened. You can write 'set 2, (iy + apiFlg4)' instead.
I'll release a fixed version of Mimas as soon as I have a chance. (But I guess while I'm at it, I should probably check to make sure I didn't screw up any other flag definitions!)
Thanks, works great!
I really appreciate Mimas, and have thoroughly enjoyed learning assembly on my calculator.
I never seriously thought I would actually learn it that hexadecimal voodoo (coming from Ti-Basic), but here I am, and having fun no less!
--
On an entirely different subject, I am a little confused about the graph screen.
I understand the whole LCD/buffer relationship, but what about drawing to the graph screen?
I'm trying to leave a picture on it after my program is through, so that I can save it to a pic.
I thought that would be easiest to do by drawing on the graph screen and not mucking with the vat.
How would this be done with out the graphing Bcalls?
Any help appreciated. |
|
Back to top |
|
|
calc84maniac
Elite
Joined: 22 Jan 2007 Posts: 770
|
Posted: 10 Jan 2011 12:21:20 pm Post subject: |
|
|
I think what you need to do is make sure the graph is not marked as dirty. This code could work:
Code: res graphDraw,(iy+graphFlags)
That makes sure the graph won't be redrawn the next time it is viewed. |
|
Back to top |
|
|
Sleight
Newbie
Joined: 22 Nov 2010 Posts: 9
|
Posted: 10 Jan 2011 09:34:07 pm Post subject: |
|
|
calc84maniac wrote:
I think what you need to do is make sure the graph is not marked as dirty. This code could work:
Code: res graphDraw,(iy+graphFlags)
That makes sure the graph won't be redrawn the next time it is viewed.
Of course. What else could it be?
From Ti's documentation, it seemed that this flag was only for the equations, statplots, and the like.
More likely, the distinction between "graphing" and "drawing" in the first place is primarily an artifact of my time with ti basic.
...Or I'm just wrong altogether.
Thanks again |
|
Back to top |
|
|
Xeda112358
Active Member
Joined: 19 May 2009 Posts: 520
|
Posted: 16 Jan 2011 11:02:20 pm Post subject: |
|
|
Ah, I saw your post on TIBD before I came over here (issa me, Xeda). Well, if you want to store the graph screen to a picture, you can do something like this (forgive me if my mnemonics are wrong):
Code:
PicNameInOP1:
ld hl,$0060 ;216000 This is the name of the pic. Change the 00 to whatever pic number you would like
ld (OP1+1),hl ;227984
xor a ;AF
ld (OP1+3),a ;327B84
MakePic:
rFindSym ;D7
jr c,3 ;3803
bcall(_DelVarArc);EFC94F
bcall(_CreatePict);EF3343
ld bc,756 ;01F402 Size of the pic
ld hl,plotSScreen ;214093
inc de ;13
inc de ;13
ldir ;EDB0 copies the data pointed at by HL to the position pointed at by DE. It copies BC bytes
ret :C9
Later you can manipulate the pic vars to hold the last row of pixels, too
Last edited by Guest on 16 Jan 2011 11:03:22 pm; edited 1 time in total |
|
Back to top |
|
|
|
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
»
Go to Registration page