This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - Munchor
Pages: 1 ... 105 106 [107] 108 109 ... 424
1591
« on: May 13, 2011, 04:57:48 pm »
Actually, if you want something similar to getkey(15), you might want:
jr loop_Condition loop: ;code loop_Condition: b_call(getCSC) ;getCSC doesn't wait for a key to be pressed, _GetKey will. cp 15 ;Im not sure what the equate is called, prolly skClear jr nz,loop
As for wiping out registers, push and pop really help
I guess that is indeed better. Also, kClear works for me. Thanks to the getCSC bcall trick I think I can now make my cursor program.
1592
« on: May 13, 2011, 04:52:25 pm »
@aeTIos: No problem I'm not saying I want you to use Twitter, this is for twitter users that belong to Omnimaga.
1593
« on: May 13, 2011, 04:11:11 pm »
Oh my how stupid, I forgot about B_CALL (_GetKey). Thanks a lot for reminding me of that, this worked: Start: B_CALL (_GetKey) cp kClear jr z, End jr Start End: ret I have a very big problem now, I know how to display images using iPutSprite, but I wanted to make a cursor. My problem was clearing the screen in the end of the loop (it wiped out some registers).
1594
« on: May 13, 2011, 03:38:10 pm »
I decided to create a topic to gather all my z80 asm questions since I have a few and I'm still learning. First of all, I'd like you guys to know how advanced I am, this was my (best?) program: .nolist #include "ti83plus.inc" .list .org userMem-2 .db $BB,$6D Init: B_CALL _ClrLCDFull ld hl,0 ld (curCol), hl ld hl,Welcome B_CALL _PutS
B_CALL _GetKey cp kEnter jr z,Win B_CALL _ClrLCDFull
ld hl,0 ld (curCol), hl ld hl,LoseTxt B_CALL _PutS B_CALL _GetKey B_CALL _ClrLCDFull ret
LoseTxt: .db "LOSE",0 Win: B_CALL _ClrLCDFull
ld hl,0 ld (curCol), hl ld hl,WinTxt
B_CALL _PutS B_CALL _GetKey B_CALL _ClrLCDFull ret WinTxt: .db "WIN",0 Welcome: .db "Press ",$C1,"ENTER]",0 If you run it, it asks you to press [ENTER], if you do, you win, if you don't, well you lose The Game. My first question is how to make Axe-like loops in Asm? In Axe, I'd do something like Repeat getKey(15). How would I do that in Assembly? TitleScreen: ;Title Screen code Loop: ;Code cp kClear jr z, TitleScreen jr Loop
I thought of this, but I can't test it right now. Thanks <Edit> I actually tried this and it looped forever, freezing my calc: Start: cp kClear jr z, End jr Start End: ret I'm pretty sure I'm doing something wrong, but I'm a bit rusty at z80 asm.
1595
« on: May 13, 2011, 10:23:35 am »
ERR: BLOCK Either an “End” is missing you you have too many “End”s. This is from documentation.pdf. What if there is an ERR for too many "End"s and an error for not enough?
1596
« on: May 13, 2011, 10:05:48 am »
I can't really see that :$
1597
« on: May 13, 2011, 10:04:30 am »
I have started using Twitter a few weeks back and when I tweet about my calculator projects or about the calculator community, I always tweet #omnimaga. So if I am saying my Mission Copter game is finished I would say "yay, finish Mission Copter #omnimaga #cemetech". In this page you can see all tweets that had #omnimaga on them. There are not many of them, but I think that since some of us use Twitter, why not tweet #omnimaga Omnimaga is becoming very popular on Facebook and through gaming websites, also because of nDoom (tweets with nDoom on it here). So, I think people who want to know about #omnimaga could tweet and find some neat stuff. So I turn this topic into an appeal, tweet #omnimaga so finding stuff about Omnimaga and calculators is easier on Twitter! Thanks
1598
« on: May 13, 2011, 09:51:58 am »
-Linux compatability Very well SirCmpwn, I'd also like a few other things like speed of emulation (100%, 200%, 50%, ...). Can't wait for a beta release or a RC.
1599
« on: May 12, 2011, 04:48:58 pm »
Actually, it was changed already. I think Z did it. Either way, thanks a lot, it's always great when I have suggestions and you guys make them.
1600
« on: May 12, 2011, 04:08:45 pm »
Ah ok, then yours would probably fits best.
1601
« on: May 12, 2011, 04:07:56 pm »
Oh my, I barely visit TI Bank but it has helped a lot with the Nspire hacking and all those useful tools of theirs. It is a the best TI French website and its archives are also fully loaded with lots of stuff. I really hope it doesn't close and wish it good luck.
1602
« on: May 12, 2011, 03:53:54 pm »
I think OmnomIRC/SpyBot45 development would be better.
Z, I'm sorry but I prefer DJs, but doesn't netham45 have other bots? So OmnomIRC and IRC Bots Development? Not sure
1603
« on: May 12, 2011, 03:26:41 pm »
Looks nice Z! What is a Ground Pound, though?
Z? Can I call him Z too? Hey Z, I have to resay this game is really cool, but I don't understand this last update, and I mean as in I don't understand it from what you said (technical words and such).
1604
« on: May 12, 2011, 03:24:09 pm »
Well, this seems to be being well received, perhaps some suggestions for the new name beyond mines which are not that good
1605
« on: May 12, 2011, 01:47:10 pm »
Even if this is never going to be in #omnimaga, I worked a bit on it:
#!/usr/bin/env python
import datetime import hashlib import os import random import sys import time import urllib
from twisted.words.protocols import irc from twisted.internet import protocol from twisted.internet import reactor
class MyBot(irc.IRCClient):
def _get_nickname(self): return self.factory.nickname
nickname = property(_get_nickname)
def signedOn(self): self.join(self.factory.channel)
def joined(self, channel): print "*** Joined %s" % channel self.myDict = {}
def privmsg(self, user, channel, msg): user = user.split('!')[0] if msg[len(msg)-2:] == "++": if msg.split('++')[0] == user: self.msg(channel,"You can't plus yourself") return
try: self.myDict[msg.split('++')[0]] += 1 print "+1 for %s by %s" % (msg.split('++')[0],user) return except KeyError: self.myDict[msg.split('++')[0]] = 1 print "The first +1 for %s by %s" % (msg.split('++')[0],user) return
if msg[len(msg)-2:] == "--": try: self.myDict[msg.split('--')[0]] = self.myDict[msg.split('--')[0]] - 1 print "-1 for %s by %s" % (msg.split('++')[0],user) return except: self.myDict[msg.split('--')[0]] = -1 print "The first -1 for %s by %s" % (msg.split('++')[0],user) return
if msg.split()[0] == '!score': try: msgToDisplay = msg.split()[1] + ": " + str(self.myDict[msg.split()[1]]) self.msg(channel,msgToDisplay) print "I answered to %s: %s" % (user,msgToDisplay) return except KeyError: self.msg(channel,"Non-existing member: %s" % msg.split()[1]) print "Non-existing member: %s" % msg.split()[1]
class MyBotFactory(protocol.ClientFactory): protocol = MyBot
def __init__(self, channel, nickname='scoreBot'): self.channel = channel self.nickname = nickname
def clientConnectionLost(self, connector, reason): print "Lost connection (%s), reconnecting." % (reason,) connector.connect()
def clientConnectionFailed(self, connector, reason): print "Could not connect: %s" % (reason,)
def main(): network = 'irc.freenode.net' reactor.connectTCP(network, 6667, MyBotFactory('#python-forum')) reactor.run()
if __name__ == "__main__": main() Actually, I just made even more updates:
#!/usr/bin/env python
import datetime import hashlib import os import random import sys import time import urllib
from twisted.words.protocols import irc from twisted.internet import protocol from twisted.internet import reactor
class MyBot(irc.IRCClient):
def _get_nickname(self): return self.factory.nickname
nickname = property(_get_nickname)
def signedOn(self): self.join(self.factory.channel)
def joined(self, channel): print "*** Joined %s" % channel self.myDict = {}
def privmsg(self, user, channel, msg): user = user.split('!')[0] if msg[len(msg)-2:] == "++": if msg.split('++')[0] == user: self.msg(channel,"You can't plus yourself") return
try: self.myDict[msg.split('++')[0]] += 1 print "+1 for %s by %s" % (msg.split('++')[0],user) return except KeyError: self.myDict[msg.split('++')[0]] = 1 print "The first +1 for %s by %s" % (msg.split('++')[0],user) return
elif msg[len(msg)-2:] == "--": try: self.myDict[msg.split('--')[0]] = self.myDict[msg.split('--')[0]] - 1 print "-1 for %s by %s" % (msg.split('++')[0],user) return except: self.myDict[msg.split('--')[0]] = -1 print "The first -1 for %s by %s" % (msg.split('++')[0],user) return
elif msg.split()[0] == '!score': try: msgToDisplay=msg.split()[1]+": %s" % str(self.myDict[msg.split()[1]]) self.msg(channel,msgToDisplay) print "I answered to %s: %s" % (user,msgToDisplay) return except KeyError: msgToDisplay="Non-existing member: %s" % msg.split()[1] self.msg(channel,msgToDisplay) print "I answered to %s: Non-existing member: %s" % (user,msg.split()[1])
class MyBotFactory(protocol.ClientFactory): protocol = MyBot
def __init__(self, channel, nickname='scoreBot'): self.channel = channel self.nickname = nickname
def clientConnectionLost(self, connector, reason): print "Lost connection (%s), reconnecting." % (reason,) connector.connect()
def clientConnectionFailed(self, connector, reason): print "Could not connect: %s" % (reason,)
def main(): network = 'irc.freenode.net' reactor.connectTCP(network, 6667, MyBotFactory('#python-forum')) reactor.run()
if __name__ == "__main__": main()
Pages: 1 ... 105 106 [107] 108 109 ... 424
|