Calling the Window command from assembly

Started by xlar54, January 02, 2008, 10:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xlar54

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.

xlar54

Thought I might toss a teaser screenshot in... something Im working on.  Written 100% in assembly, which definitely increases the challenge level..



airship

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 ;)
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

nikoniko

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. :)

xlar54

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.

Blacklord

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

airship

I was just taking the chance to ping you, niko^2. :)
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine