Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 125 users online: 6 members, 83 guests and 36 bots. Members: CalebHansberry, jpitser, LincolnB, shkaboinka, Tari. Bots: VoilaBot (2), Baidu (1), Spinn3r (1), Magpie Crawler (3), VoilaBot (10), Googlebot (18), MSN/Bing (1).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
|
| Author |
Message |
|
Rascherite

New Member

Joined: 09 Nov 2011 Posts: 93 Location: Under a heaping pile of saxophones
|
Posted: 06 Jan 2012 01:58:46 pm Post subject: |
|
|
haha yeah, I need to get out of that double-posting habit. glad I found the delete post button.
So, is the actual doorscs more like my routine? Is doors CS open source? _________________ "If you don't live it, it won't come out of your horn."
-Charlie Parker
TI BASIC Sudoku - optimizing random puzzle generator, making number of preset squares more even and reliable
asm metronome - trying to figure out how to dougie with the interrupts |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
Posted: 06 Jan 2012 02:01:08 pm Post subject: |
|
|
| Rascherite wrote: | haha yeah, I need to get out of that double-posting habit. glad I found the delete post button.
So, is the actual doorscs more like my routine? Is doors CS open source? | No, it's not. The thing is, though, the Doors CS line routines handle vertical, horizontal, and skewed lines all within the same routine, as well as white lines, black lines, checkered lines, and inverting lines. Therefore, picking out the specific pieces is a little bit harder to do. You can easily just use them yourself, though:
http://dcs.cemetech.net/index.php?title=Fastline _________________
 |
|
| Back to top |
|
|
Rascherite

New Member

Joined: 09 Nov 2011 Posts: 93 Location: Under a heaping pile of saxophones
|
Posted: 06 Jan 2012 02:03:53 pm Post subject: |
|
|
| KermMartian wrote: | | No, it's not. |
not open source or not like mine?
I guess all asm is open-source, in a way
...is there a disasm for z80?
so, in the DCS fastline, is the line routine just one routine and the vertical and horizontal lines are just drawn coincidentally when h=d or l=e without any special attention given to their verticalness or horizontalness? _________________ "If you don't live it, it won't come out of your horn."
-Charlie Parker
TI BASIC Sudoku - optimizing random puzzle generator, making number of preset squares more even and reliable
asm metronome - trying to figure out how to dougie with the interrupts |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
Posted: 06 Jan 2012 02:12:54 pm Post subject: |
|
|
That's correct. The way it works out, it's just as fast as having separate routines for those special cases, and saves the memory of needing to have code for the special cases. Doors CS is closed-source, although if people ask nicely and I trust them as individuals to not re-use or re-distribute my code without asking, I generally give pieces of my code to people. _________________
 |
|
| Back to top |
|
|
Rascherite

New Member

Joined: 09 Nov 2011 Posts: 93 Location: Under a heaping pile of saxophones
|
Posted: 06 Jan 2012 02:17:15 pm Post subject: |
|
|
| KermMartian wrote: | | Doors CS is closed-source, although if people ask nicely and I trust them as individuals to not re-use or re-distribute my code without asking, I generally give pieces of my code to people. |
That's understandable. If I spent that much time working on an OS and a library of DCS's scope, I would hesitate before showing it to anyone.
not that I'm going to try and steal your DCS code or anything evil like that, but is there some sort of disassembler for z80? _________________ "If you don't live it, it won't come out of your horn."
-Charlie Parker
TI BASIC Sudoku - optimizing random puzzle generator, making number of preset squares more even and reliable
asm metronome - trying to figure out how to dougie with the interrupts |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
Posted: 06 Jan 2012 02:29:13 pm Post subject: |
|
|
There are a few; the most impressive is the IDA Pro disassembler that BrandonW recommends. Also, my policy on open-sourcing calculator code comes from a few rather significant incidents in which members of the community blatantly stole and used code I had released under a limited license without proper attribution, then claimed it was OK to violate my license. That sort of behavior makes me very angry, not that I think you would ever do something like that. _________________
 |
|
| Back to top |
|
|
Rascherite

New Member

Joined: 09 Nov 2011 Posts: 93 Location: Under a heaping pile of saxophones
|
Posted: 06 Jan 2012 02:41:35 pm Post subject: |
|
|
| KermMartian wrote: | | Also, my policy on open-sourcing calculator code comes from a few rather significant incidents in which members of the community blatantly stole and used code I had released under a limited license without proper attribution, then claimed it was OK to violate my license. That sort of behavior makes me very angry, not that I think you would ever do something like that. |
That's terrible!! I'm honored to know that you trust me in that respect, and no, I would never do that to another programmer, least of all one who I respect so much!
Now that I have a sense of resolution about my line drawing programs, I want to talk about interrupts. Z80 in 28 days explains the subject very poorly, in my opinion, so I'd appreciate it if someone would explain the basics to me.
I know what an interrupt IS, but , first of all, i need to know how they are triggered on the z80. _________________ "If you don't live it, it won't come out of your horn."
-Charlie Parker
TI BASIC Sudoku - optimizing random puzzle generator, making number of preset squares more even and reliable
asm metronome - trying to figure out how to dougie with the interrupts |
|
| Back to top |
|
|
Ashbad

... I think redheaded girls are kind of cool

Joined: 01 Dec 2010 Posts: 2417 Location: Stomp Stomp Stomp, The Idiot Convention
|
Posted: 06 Jan 2012 02:48:24 pm Post subject: |
|
|
Interrupts are triggered in many ways, depending on the IM (Interrupt Mode). IM 0 is unusable on the 84+, since it requires sending an instruction on the data bus (and we cannot do that) such as RST 38h, RST 8h, etc. IM 1 will jump to address 0x0038 on each call, and is triggered by peripheral devices usually. IM 2 is what you usually use, and involves using a vector table, working with the I register, etc. (It's a bit more to explain, so looking at something like brandonw's wiki should say enough about it). _________________ -Ashbad |
|
| Back to top |
|
|
Rascherite

New Member

Joined: 09 Nov 2011 Posts: 93 Location: Under a heaping pile of saxophones
|
Posted: 06 Jan 2012 02:58:53 pm Post subject: |
|
|
Thanks, ashbad! Can you maybe link me up to the page?
Random question about code appearance... Is it more common to have tabs or spaces between instructions and operands?
Code: ld [tab] a, b
Versus
Code: ld [space] a, b
_________________ "If you don't live it, it won't come out of your horn."
-Charlie Parker
TI BASIC Sudoku - optimizing random puzzle generator, making number of preset squares more even and reliable
asm metronome - trying to figure out how to dougie with the interrupts |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
Posted: 06 Jan 2012 03:04:47 pm Post subject: |
|
|
It's more common in community code to use a space. TI code almost always uses a tab in between, and frequently uppercase registers and opcodes. _________________
 |
|
| Back to top |
|
|
Rascherite

New Member

Joined: 09 Nov 2011 Posts: 93 Location: Under a heaping pile of saxophones
|
Posted: 06 Jan 2012 06:29:26 pm Post subject: |
|
|
<badjoke>I guess ti just knows that CAPSLOCK IS CRUISE CONTROL FOR COOL</badjoke>
Seriously, though, I can't stand it when register names and opcodes are in all caps. Its so annoying. _________________ "If you don't live it, it won't come out of your horn."
-Charlie Parker
TI BASIC Sudoku - optimizing random puzzle generator, making number of preset squares more even and reliable
asm metronome - trying to figure out how to dougie with the interrupts |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
Posted: 06 Jan 2012 09:09:59 pm Post subject: |
|
|
| Rascherite wrote: | <badjoke>I guess ti just knows that CAPSLOCK IS CRUISE CONTROL FOR COOL</badjoke>
Seriously, though, I can't stand it when register names and opcodes are in all caps. Its so annoying. | Absolutely agreed on that. Also, let me clarify more things about interrupts; what can I teach you?  _________________
 |
|
| Back to top |
|
|
Ashbad

... I think redheaded girls are kind of cool

Joined: 01 Dec 2010 Posts: 2417 Location: Stomp Stomp Stomp, The Idiot Convention
|
Posted: 06 Jan 2012 09:38:02 pm Post subject: |
|
|
As for a link, http://z80-heaven.wikidot.com/interrupts seems to be a very good generalization of basically everything you'll need to know about interrupts on the 84+. Any questions beyond that, Kerm is definitely your man. _________________ -Ashbad |
|
| Back to top |
|
|
Rascherite

New Member

Joined: 09 Nov 2011 Posts: 93 Location: Under a heaping pile of saxophones
|
Posted: 08 Jan 2012 02:26:42 am Post subject: |
|
|
If you're writing a subroutine that will be used over and over, e.g, a line drawer, is it bad practice to reserve 3 or 4 bytes of ram for it, or should you use only the registers and the stack?
like, is this acceptable?
Code: my_routine:
ld b, 4
ld hl, _var1
_loop:
ld a, (hl)
inc a
ld (hl), a
inc hl
djnz _loop
ret
_var1:
.db $00
_var2:
.db $1A
_var3:
.dw $4C53
I feel like this is a kinda dumb question, because there are some subroutines that are complex enough to require ram use and not just register/stack use, so it seems like I can assume that this is allowed. _________________ "If you don't live it, it won't come out of your horn."
-Charlie Parker
TI BASIC Sudoku - optimizing random puzzle generator, making number of preset squares more even and reliable
asm metronome - trying to figure out how to dougie with the interrupts |
|
| Back to top |
|
|
quigibo

New Member

Joined: 24 Jan 2009 Posts: 89 Location: Los Angeles
|
Posted: 08 Jan 2012 04:17:03 am Post subject: |
|
|
That's generally acceptable if you absolutely have to, but keep in mind it will prevent the following things:
- Recursion won't work.
- You can't call the routine from an interrupt if you use it elsewhere. |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
Posted: 08 Jan 2012 01:22:24 pm Post subject: |
|
|
| Quote: | | If you're writing a subroutine that will be used over and over, e.g, a line drawer, is it bad practice to reserve 3 or 4 bytes of ram for it, or should you use only the registers and the stack? | You should be using safeRAM for that rather than using scratch RAM within the program itself, especially since the latter tends to confuse writeback routines. _________________
 |
|
| Back to top |
|
|
Rascherite

New Member

Joined: 09 Nov 2011 Posts: 93 Location: Under a heaping pile of saxophones
|
Posted: 08 Jan 2012 08:50:24 pm Post subject: |
|
|
What is saferam? _________________ "If you don't live it, it won't come out of your horn."
-Charlie Parker
TI BASIC Sudoku - optimizing random puzzle generator, making number of preset squares more even and reliable
asm metronome - trying to figure out how to dougie with the interrupts |
|
| Back to top |
|
|
willrandship

Expert

Joined: 06 Jul 2010 Posts: 558 Location: Between Venus and Mars
|
Posted: 08 Jan 2012 08:51:26 pm Post subject: |
|
|
Saferam in axe can be easily accessed with L1 through L6 (they're in the Command list with descriptions on just how safe they really are)
Basically it's ram outside your program that can be used for temporary storage _________________ Hmm...what to put here....
 |
|
| Back to top |
|
|
Ashbad

... I think redheaded girls are kind of cool

Joined: 01 Dec 2010 Posts: 2417 Location: Stomp Stomp Stomp, The Idiot Convention
|
Posted: 08 Jan 2012 08:52:00 pm Post subject: |
|
|
| Rascherite wrote: | | What is saferam? |
SafeRAM is a general term for non-volatile chunks of RAM left by TIOS for program use. An example is SaveSScreen, which is 768 bytes large. _________________ -Ashbad |
|
| Back to top |
|
|
Rascherite

New Member

Joined: 09 Nov 2011 Posts: 93 Location: Under a heaping pile of saxophones
|
Posted: 08 Jan 2012 08:52:40 pm Post subject: |
|
|
I'm not using axe... and I also want to know WHAT it is, HOW it is different from normal RAM, and WHY it can be used for subroutines.
edit:
| Ashbad wrote: | | SafeRAM is a general term for non-volatile chunks of RAM left by TIOS for program use. An example is SaveSScreen, which is 768 bytes large. |
What if your main needs to use the ram in SaveSScreen? Or is it bad practice to let your programs use the ram at SaveSScreen unless they're meant to be called? _________________ "If you don't live it, it won't come out of your horn."
-Charlie Parker
TI BASIC Sudoku - optimizing random puzzle generator, making number of preset squares more even and reliable
asm metronome - trying to figure out how to dougie with the interrupts |
|
| Back to top |
|
|
|
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.039004 seconds.
|