Search the web
Sign In
New User? Sign Up
vmu-dev · The VMU Development list
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Basic ASM   Message List  
Reply | Forward Message #450 of 1156 |
Re: Basic ASM

On 14 Jul 00, rednuht@... wrote:

> could some of the people who have successfully used ASM for the vmu
> have a look at this please.

First off, *FOR GOD'S SAKE* make sure that the code you post (*INCLUDING*
the width added by the tabulator chars!) will not exceed 73 chars a line!
It looks like SHIT when it's viewed on an 80x25 chars display! And you
others, when you _quote_ source code, then please make sure that the
quoted lines stay readable and aren't split over multiple lines! *cough*
edit by hand if necessary *cough*

Anyway, the following is a short routine that I occasionally use in my
programs:

FindLine:
;
; takes a line-number in ACC (0 - 31)
;
; returns line-start in ACC ($80, $86, $90, $96 etc.)
; and sets XBNK-register to required value (0 or 1)
;
; no other registers will be affected
;
rol ; multiply with 8
rol
rol
;
bn acc,3,.fl_l1
sub #2 ; line start correction, if uneven line number
.fl_l1:
mov #0,xbnk ; default: bank 0
bn acc,7,.fl_l2
inc xbnk ; select bank 1 if line-number was 16 or more
.fl_l2:
or #%10000000 ; add $80 (start of XRAM)
;
ret

Hope this helps.

Bye


Alessandro
---
You get what anyone gets. You get a lifetime.



Sun Aug 6, 2000 8:36 am

tyro@...
Send Email Send Email

Forward
Message #450 of 1156 |
Expand Messages Author Sort by Date

could some of the people who have successfully used ASM for the vmu have a look at this please. * ----------- * FindLine ; take a Y coordinate and return...
rednuht@...
Send Email
Jul 14, 2000
4:21 pm

There is something wrong with this code which is that it is MUCH too long and complicated for what it should do. One common trick used in assembly is to...
Omar Cornut
cornut@...
Send Email
Jul 16, 2000
1:02 pm

Thats great, but did u not read ... I need to know how to do it the long way, if my game is slow fine i will optimize, but to get me started a i want miles of...
rednuht
rednuht@...
Send Email
Jul 16, 2000
4:42 pm

... First off, *FOR GOD'S SAKE* make sure that the code you post (*INCLUDING* the width added by the tabulator chars!) will not exceed 73 chars a line! It...
tyro@...
Send Email
Aug 8, 2000
1:03 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help