Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
22 May, 2013, 12:52:04 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 2 [3] 4   Go Down
  Print  
Author Topic: ASM Command of the Week -  (Read 2387 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
calc84maniac
Epic z80 roflpwner
Coder Of Tomorrow
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: 20 May, 2013, 21:27:24
Date Registered: 28 August, 2008, 05:09:05
Location: Right behind you.
Posts: 2735


Total Post Ratings: +373

View Profile
« Reply #30 on: 14 March, 2012, 10:43:20 »
0

The hidden flags only exist on the old models of the TI-83+, though (the ones with real Zilog chips)
Logged

"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
ZippyDee
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 12 May, 2013, 10:03:36
Date Registered: 21 March, 2011, 03:15:07
Location: Yes.
Posts: 704


Total Post Ratings: +73

View Profile
« Reply #31 on: 14 March, 2012, 12:08:07 »
0

But is there actually any use for the hidden flags? Are the values documented?
Logged

There's something about Tuesday...


Pushpins 'n' stuff...

Hot_Dog
If you can't find a cat, look for its tail.
Support Staff
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 21:08:05
Date Registered: 28 December, 2009, 18:47:54
Location: Midland, Washington
Posts: 2940


Total Post Ratings: +428

View Profile
« Reply #32 on: 03 April, 2012, 16:59:53 »
0

EXX
Logged

There are people who can speak two languages, and they are called bilingual.  There are people who speak three languages and are therefore trilingual.  Then there are people who speak one language, and these people are called Americans.

Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Yesterday at 21:06:29
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3753


Total Post Ratings: +605

View Profile
« Reply #33 on: 03 April, 2012, 17:12:32 »
0

That is a pretty useful command, especially if you need more registers, or you need to preserve some and you don't use interrupts. I personally rarely use interrupts, so super complicated math functions get to use b'c'd'e'h'l' Cheesy

So details:
4 cycles, 1 byte, hex code: D9
Swaps registers with shadow registers


So as a really poor example, say I need to copy some data to memory somewhere, but I need to preserve all registers for some reason. Also, assume you don't need interrupts Tongue


1
2
3
4
5
6
7
8
di
exx
ld bc,768
ld hl,BufData
ld de,plotSScreen
ldir
exx
And yay, your registers are preserved Cheesy
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


calc84maniac
Epic z80 roflpwner
Coder Of Tomorrow
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: 20 May, 2013, 21:27:24
Date Registered: 28 August, 2008, 05:09:05
Location: Right behind you.
Posts: 2735


Total Post Ratings: +373

View Profile
« Reply #34 on: 03 April, 2012, 17:13:46 »
+1

I use shadow BC, DE, HL in all of my intense rendering methods: Project M parallax tilemapper, F-Zero mode7 engine, and TI-Boy tilemapping. (I rarely find a need to use shadow AF, which I would usually give to interrupts).

Also, shadow registers play a crucial role in TI-Boy's CPU emulator, as they hold the Game Boy's BC,DE,HL registers. This allows me to execute many GBZ80 opcodes almost directly, by doing something like exx \ add a,e \ exx in order to emulate add a,e, etc.
Logged

"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Yesterday at 21:06:29
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3753


Total Post Ratings: +605

View Profile
« Reply #35 on: 03 April, 2012, 17:14:29 »
0

Wow, nice, now I see why it is so fast o.o
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


Art_of_camelot
The matrix has you.. ಠ_ಠ
Support Staff
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Today at 11:15:31
Date Registered: 30 August, 2008, 04:55:55
Location: Dr. Light's Laboratory
Posts: 4391


Total Post Ratings: +149

View Profile WWW
« Reply #36 on: 04 April, 2012, 00:40:52 »
0

@calc84:That's pretty cool. =)
Logged

Projects:
TBA! Coming to an 83+ near you!

NerdTests.com says I'm a Cool Nerd King.  Click here to take the Nerd Test, get nerdy images and jokes, and write on the nerd forum!


chickendude
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Female
Last Login: Yesterday at 19:04:07
Date Registered: 06 September, 2008, 11:27:30
Posts: 435

Total Post Ratings: +66

View Profile
« Reply #37 on: 03 September, 2012, 09:43:43 »
0

Can anyone think of a good use for otd/oti? I just saw JimE's Keyin routine which has a pretty interesting use of ini to store all DI keypresses into saferam that you can access using "bit key,(iy+keygroup)". It's a pretty interesting idea i might implement into some of my programs, especially since you don't have to worry about registers getting overwritten Smiley
Logged
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Yesterday at 21:06:29
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3753


Total Post Ratings: +605

View Profile
« Reply #38 on: 03 September, 2012, 14:23:15 »
0

I have used these commands to read/write data to the LCD ports.

EDIT: For example, if I wanted to draw a simple sprite, assuming the LCD coordinates are already loaded:

1
2
3
4
5
6
7
8
9
     ld bc,0811h       ;b=8, size of the sprite, c=11h, the LCD Data port
     ld hl,SpriteData
DrawLoop:
     <<any code to provide a proper delay>>
     outi
     jr nz,DrawLoop
     ret
SpriteData:
     .db 3Ch,42h,81h,81h,81h,81h,42h,3Ch    ;ball
« Last Edit: 03 September, 2012, 14:27:10 by Xeda112358 » Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


chickendude
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Female
Last Login: Yesterday at 19:04:07
Date Registered: 06 September, 2008, 11:27:30
Posts: 435

Total Post Ratings: +66

View Profile
« Reply #39 on: 03 September, 2012, 19:37:01 »
0

That's what i figured they could be used for, though i was thinking more along the lines of a fastcopy routine. Thanks for the sample.
Logged
thepenguin77
z80 Assembly Master
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 18:56:03
Date Registered: 14 December, 2009, 04:21:52
Location: Purdue
Posts: 1484


Total Post Ratings: +778

View Profile
« Reply #40 on: 03 September, 2012, 23:58:41 »
+1

Let's not forget USB.


1
2
3
4
5
6
send8BytesBitsOverPipe0:
ld hl, bytesToSend
ld bc, 8*256+$A0
otir
ret


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
;#######################################
;take in all the bytes from a port
;input: c = port
;output: b = bytes received
importBytes:
ld b, 0
importLoop:
in a, ($96)
or a
ret z
ini ;this dec's b
inc b
inc b
jr importLoop


Every USB program includes some form of ini/inir and oti/otir. The reason you can do this is because the USB driver has internal buffers and does not need a delay when you write to it.
Logged

zStart v1.3.011 4-29-2013  zStart fully works on 83+BE's (except custom font)
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Yesterday at 21:06:29
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3753


Total Post Ratings: +605

View Profile
« Reply #41 on: 05 September, 2012, 18:33:48 »
0

Hmm, so if I am reading your post properly, the first code sends 8 bytes to port $A0, and the second writes all the bytes being received, to HL, and then returns the number of bytes that were received? Is USB control that easy?
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


thepenguin77
z80 Assembly Master
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 18:56:03
Date Registered: 14 December, 2009, 04:21:52
Location: Purdue
Posts: 1484


Total Post Ratings: +778

View Profile
« Reply #42 on: 05 September, 2012, 19:51:46 »
0

Hmm, so if I am reading your post properly, the first code sends 8 bytes to port $A0, and the second writes all the bytes being received, to HL, and then returns the number of bytes that were received? Is USB control that easy?

The one that reads all of the data is that easy. The driver basically says, "I got some data for you" and you read it all.

The output one is super simplified, but this small section of code does appear in most data transfer code.


USB is super hard.
« Last Edit: 05 September, 2012, 19:52:19 by thepenguin77 » Logged

zStart v1.3.011 4-29-2013  zStart fully works on 83+BE's (except custom font)
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Yesterday at 21:06:29
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3753


Total Post Ratings: +605

View Profile
« Reply #43 on: 07 September, 2012, 15:07:38 »
0

Okay, I will have to experiment a little with that, then. I don't care to use a standard USB protocol, anyways.
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


shmibs
bonsai bok choy wiseguy waterboy
Administrator
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Last Login: Today at 04:52:32
Date Registered: 11 June, 2010, 19:36:15
Location: 89B6
Posts: 1846


Total Post Ratings: +234

View Profile
« Reply #44 on: 07 September, 2012, 16:11:17 »
0

ooh, are you going to be using it for direct linking between calcs?
Logged



We're not human, are we?
Pages: 1 2 [3] 4   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.392 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.