MXL Magazine Online
HOMELATEST ISSUEARTICLESBINARY BINGEJAVA JNUKYGUI LABLINKSSHOPABOUT CONTACT  
Home > Issue 002 > Coding Showdown > Pick a point

Pick a point

Requirements: .Chris Module Studio

Today we're going to go crazy. We're going to write text in the middle of the screen!

Its pretty normal thing to do but do you actually know how to do it? Well, here's how. In draw you just need one more attributary at the start of your command. Take a look at this.

10 SCREEN 7 20 CLS 30 DRAW "BM100,100 U10 R10 D10 L10"

This would draw a simple square starting from the point 100,100. I also added a CLS (always clear your screen!) and put the screen in mode 7 because your default is 0 which doesn't allow graghics.
All I did here is add the "BM" command. This stands for Blank Move which moves the pointer to a specific point withough drawing a line.

Screen 7 gives you a screen size of about 330 by 200. Seen Screen of in the .Chris Module Studio Refrence section for more information.

Chaning the position of text is a bit longer but still easy. It uses the local command.

10 LOCATE 10,5 20 PRINT "HELLO WORLD!"