Commodore 128 Alive!

Commodore 128 => 128 programmers => Assembly => Topic started by: xlar54 on January 02, 2008, 10:50 AM

Title: Calling the Window command from assembly
Post by: xlar54 on January 02, 2008, 10:50 AM
Anyone know how to do this? Id like to be able to call BASIC 7's window command via assembly to limit where text goes.
Title: Calling the Window command from assembly
Post by: xlar54 on January 02, 2008, 11:07 AM
Thought I might toss a teaser screenshot in... something Im working on.  Written 100% in assembly, which definitely increases the challenge level..


(http://img230.imageshack.us/img230/5984/screenxr1.th.jpg) (http://img230.imageshack.us/my.php?image=screenxr1.jpg)
Title: Calling the Window command from assembly
Post by: airship on January 02, 2008, 12:11 PM
JWINDOW ($C02D) call with carry bit clear, .A=row # & .X=column # to set top row & left column; call with carry bit set, .A=row # & .X=column # to set bottom row & right column

CLEAR ($C142) clear window and home cursor in window

CURHOM ($C150) home cursor in window

CLRWIN ($C142) clear current window

PLOT ($FFED) gets/sets the cursor position within the current window: if carry is cleared when called, .Y defines the line # and .X the column #; if carry is set when called, .Y=current line# and .X=current column #

All in 'Mapping the Commodore 128' if nikoniko ever gets the PDF library back on line ;)
Title: Calling the Window command from assembly
Post by: nikoniko on January 02, 2008, 12:16 PM
Well, ultimately the window limits just get written to zero page addresses $E4-$E7, in the order of Lower limit, Upper limit, Left margin, Right margin, if you want to save yourself a couple of calls. How are you outputting your text?

Quote from: AirshipAll in 'Mapping the Commodore 128' if nikoniko ever gets the PDF library back on line
Didn't you notice Lance opened his own PDF library? Check the top menu. "Mapping" is there along with pretty much everything else we had up. There's also a direct download link in your C128 books thread. :)
Title: Calling the Window command from assembly
Post by: xlar54 on January 02, 2008, 01:33 PM
Thanks guys... these routines could be very useful here.  Ill tell ya, the more I mess around with assembly, the more I enjoy it over BASIC.  (and begin to prefer it as well).   Will see how far this editor goes before interest wanes... I tend to be a programmer with A.D.D.  :)

I also have some code somewhere for windows that restore what was behind them, which will help with the dos-style drop down menus.  And I think I may leave it as ML rather than a BASIC stub, so that you can SYS to it and leave the editor in memory.
Title: Calling the Window command from assembly
Post by: Blacklord on January 02, 2008, 01:55 PM
Quote from: nikonikoWell, ultimately the window limits just get written to zero page addresses $E4-$E7, in the order of Lower limit, Upper limit, Left margin, Right margin, if you want to save yourself a couple of calls. How are you outputting your text?

Quote from: AirshipAll in 'Mapping the Commodore 128' if nikoniko ever gets the PDF library back on line
Didn't you notice Lance opened his own PDF library? Check the top menu. "Mapping" is there along with pretty much everything else we had up. There's also a direct download link in your C128 books thread. :)
That's gonna go once you're up though.

Lance
Title: Calling the Window command from assembly
Post by: airship on January 03, 2008, 01:16 AM
I was just taking the chance to ping you, niko^2. :)
EhPortal 1.34 © 2025, WebDev