[A83] Re: Conditional bcall()ing
[Prev][Next][Index][Thread]
[A83] Re: Conditional bcall()ing
>From: "Joe Pemberton" <dArkSk8eR@buffbody.com>
>Reply-To: assembly-83@lists.ticalc.org
>To: assembly-83@lists.ticalc.org
>Subject: [A83] Re: Conditional bcall()ing
>Date: Mon, 29 Oct 2001 19:17:32 -0600
>MIME-Version: 1.0
>Received: from [195.67.128.9] by hotmail.com (3.2) with ESMTP id
>MHotMailBDA74B8700324136E819C343800908BC0; Mon, 29 Oct 2001 17:21:38 -0800
>Received: from towerguard. (mx-1.sollentuna.net [195.67.128.9])by
>mx-1.sollentuna.net (Postfix) with ESMTPid 5607E18023; Tue, 30 Oct 2001
>02:21:32 +0100 (CET)
>Received: with LISTAR (v1.0.0; list assembly-83); Tue, 30 Oct 2001 02:21:32
>+0100 (CET)
>Received: from greekemail.com (unknown [208.158.96.117])by
>mx-1.sollentuna.net (Postfix) with ESMTP id 62A621804Dfor
><assembly-83@lists.ticalc.org>; Tue, 30 Oct 2001 02:21:25 +0100 (CET)
>Received: from buffbody.com [192.168.1.22] by greekemail.com
>(SMTPD32-6.00) id A4573FC00D6; Mon, 29 Oct 2001 19:56:07 +0000
>From assembly-83-bounce@lists.ticalc.org Mon, 29 Oct 2001 17:22:13 -0800
>Delivered-To: lists.ticalc-assembly-83@mx-1.sollentuna.net
>Message-ID: <4120011023011732328@buffbody.com>
>X-EM-Version: 5, 0, 0, 4
>X-EM-Registration: #01E0520310450300B900
>X-Priority: 3
>X-Mailer: My Own Email v4.00
>X-listar-version: Listar v1.0.0
>Sender: assembly-83-bounce@lists.ticalc.org
>Errors-To: assembly-83-bounce@lists.ticalc.org
>X-original-sender: dArkSk8eR@buffbody.com
>Precedence: bulk
>X-list: assembly-83
>
>
>
>----------------------------------------------
>Original Message
>From: "Dan Weiss"<dwedit@hotmail.com>
>Subject: [A83] Re: Conditional bcall()ing
>Date: Mon, 29 Oct 2001 18:18:43 -0600
>
> >
> >>From: "Joe Pemberton" <dArkSk8eR@buffbody.com>
> >>Reply-To: assembly-83@lists.ticalc.org
> >>To: assembly-83@lists.ticalc.org
> >>Subject: [A83] Re: Conditional bcall()ing
> >>Date: Mon, 29 Oct 2001 18:00:27 -0600
> >>MIME-Version: 1.0
> >>Received: from [195.67.128.9] by hotmail.com (3.2) with ESMTP id
> >>MHotMailBDA73986000F4136E80EC343800906DF0; Mon, 29 Oct 2001 16:04:41
>-0800
> >>Received: from towerguard. (mx-1.sollentuna.net [195.67.128.9])by
> >>mx-1.sollentuna.net (Postfix) with ESMTPid 067BB18041; Tue, 30 Oct 2001
> >>01:04:23 +0100 (CET)
> >>Received: with LISTAR (v1.0.0; list assembly-83); Tue, 30 Oct 2001
>01:04:22
> >>+0100 (CET)
> >>Received: from greekemail.com (unknown [208.158.96.117])by
> >>mx-1.sollentuna.net (Postfix) with ESMTP id 5BA3D18040for
> >><assembly-83@lists.ticalc.org>; Tue, 30 Oct 2001 01:04:21 +0100 (CET)
> >>Received: from buffbody.com [192.168.1.22] by greekemail.com
> >>(SMTPD32-6.00) id A2452E900D4; Mon, 29 Oct 2001 18:39:01 +0000
> >>From assembly-83-bounce@lists.ticalc.org Mon, 29 Oct 2001 16:05:22 -0800
> >>Delivered-To: lists.ticalc-assembly-83@mx-1.sollentuna.net
> >>Message-ID: <41200110230002731@buffbody.com>
> >>X-EM-Version: 5, 0, 0, 4
> >>X-EM-Registration: #01E0520310450300B900
> >>X-Priority: 3
> >>X-Mailer: My Own Email v4.00
> >>X-listar-version: Listar v1.0.0
> >>Sender: assembly-83-bounce@lists.ticalc.org
> >>Errors-To: assembly-83-bounce@lists.ticalc.org
> >>X-original-sender: dArkSk8eR@buffbody.com
> >>Precedence: bulk
> >>X-list: assembly-83
> >>
> >>
> >>
> >>----------------------------------------------
> >>Original Message
> >>From: "Tijl Coosemans"<tijl.coosemans@mail.be>
> >>Subject: [A83] Re: Conditional bcall()ing
> >>Date: Mon, 29 Oct 2001 21:45:34 +0100
> >>
> >> >
> >> >> From: Tijl Coosemans <tijl.coosemans@mail.be>
> >> >>
> >> >> > From: Emir Sakic <saka@hotmail.com>
> >> >> >
> >> >> > Right, my fault about lables.
> >> >> > jr 3 gave me error with $9327 as start address, thanx for clearing
> >>it.
> >> >> >
> >> >> > Anyway to conclude:
> >> >> > #define bcall_z(addr) jr nz,$+5 \ rst 28h \ .dw addr
> >> >> > :)
> >> >
> >> >> indeed, as taken from the Ion.inc file
> >> >>
> >> >> #define bcall(xxxx) rst 28h \ .dw xxxx
> >> >> #define bcallz(xxxx) jr nz,$+5 \ rst 28h \ .dw xxxx
> >> >> #define bcallnz(xxxx) jr z,$+5 \ rst 28h \ .dw xxxx
> >> >> #define bcallc(xxxx) jr nc,$+5 \ rst 28h \ .dw xxxx
> >> >> #define bcallnc(xxxx) jr c,$+5 \ rst 28h \ .dw xxxx
> >> >>
> >> >> I think somebody has already sent this, but since I didn't
>remember...
> >>:)
> >> >
> >> >BTW: Even though it's a byte bigger, a 'jp' would be faster than a
>'jr'.
> >>(Not that the gain in speed
> >> >is very large compared to a 'bcall'.)
> >>
> >>Yes, but the problem with that is that if you use a jp instead of a jr
>the
> >>jump would NOT be relative, and you could NOT use the #define statement
>to
> >>make the whole bcall_z(xxxx) thing. Why? Simple - you would need a
>label
> >>right after the bcall to jump to if nonzero is set. And if you used the
> >>"#define jp nz, label \ rst 28h \ .dw xxxx", you would always jump to
> >>"label" =p not good. You <i>could</i> just not use #define and write in
> >> jp nz, label
> >> bcall(xxxx)
> >> label
> >>each time you want to do bcallz(xxxx), but that would defeat the point
>of
> >>the whole #define thing =)
> >> >-----------------------------------------------------
> >> >Mail.be, Free WebMail and Virtual Office
> >> >http://www.mail.be
> >> >
> >> >
> >> >
> >> >
> >>
> >>_____________________________________________
> >>Free email with personality! Over 200 domains!
> >>http://www.MyOwnEmail.com
> >>
> >>
> >>
> >
> >The $ feature of TASM can work for any 16-bit value, so it would work
>fine
> >with jp. (you just need to add an extra byte to the offset)
> >
> >TASM converts the absolute address of a JR to a reletive address, so
>that's
> >why $ works there.
>
>
>oh, I thought the $ just lets TASM know that the value is a hex value =)
>thanks for telling me that
>
> >
> >_________________________________________________________________
> >Get your FREE download of MSN Explorer at
>http://explorer.msn.com/intl.asp
> >
> >
> >
> >
>
>_____________________________________________
>Free email with personality! Over 200 domains!
>http://www.MyOwnEmail.com
>
>
>
$ indicates a hex value when placed at the end of a number.
When separate, it's not that at all. $ becomes the current address.
So LD a,($+5) stores (currentaddress+5) into a.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Follow-Ups: