6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 10, 2024 5:13 pm

All times are UTC




Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: JSR Indirect Address
PostPosted: Wed May 31, 2017 12:25 am 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 362
As best as I can tell, this isn't possible natively, but I thought someone might have an idea...

Basically, I want to do "JSR (a)". Obviously this doesn't exist - JSR only does "JSR a". I could perhaps synthesize it using by constructing the appropriate values on the stack before using "JMP (a)"? But that seems messy.

Its for a my bios IRQ handler, an outline of which is in the code block below.

Essentially, I want to make it so the user program can specify a custom IRQ handler, without necessarily disabling the native BIOS IRQ handler functionality. Any ideas, thoughts, comments etc extremely welcome.

Code:
  CODE
IrqHandler:
    ; If bit 1 of biosIrqMode = 0 then skip custom IRQ handler
    BBR1    biosIrqMode, ?HandlerImpl
    JSR     (biosIrqHandler)
   
?HandlerImpl:

    ; If bit 0 of biosIrqMode = 1 then skip the BIOS IRQ functionality
    BBS0    biosIrqMode, ?HandlerPrologue

    PHA
    PHX
    PHY
   
    ; .... ETC

    PLY
    PLX
    PLA
   
?HandlerPrologue:
    BBR2    biosIrqMode, ?HandlerEnd
    JSR     (biosIrqHandler)

?HandlerEnd:
    RTI
  ENDS

  PAGE0
biosIrqHandler  dw          ; Address for the custom IRQ handler subroutine
biosNmiHandler  dw          ; Address for the custom NMI handler subroutine
biosIrqMode     db          ; Bitfield for customizing the BIOS' interrupt functionality
                            ; Bit 0: Disable BIOS IRQ functionality
                            ; Bit 1: Enable custom IRQ handler before BIOS IRQ functionality
                            ; Bit 2: Enable custom IRQ handler after BIOS IRQ functionality
                            ; Bit 3: Enable custom NMI handler
  ENDS


P.S. There seems to be a bizarre bug in the Assembler on the line "BBS0 biosIrqMode, ?HandlerPrologue" - it states that "biosIrqMode" is an invalid addressing mode... It doesn't complain for the same line with BBS1 or BBR0.... since they're all effectively the same instructions, I am very puzzled.

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
 Post subject: Re: JSR Indirect Address
PostPosted: Wed May 31, 2017 12:47 am 
Offline
User avatar

Joined: Wed Mar 01, 2017 8:54 pm
Posts: 660
Location: North-Germany
I would setup the IRQ vector to point to a "JMP IRQservice" instruction somewhere in RAM. (Perhaps after checking whether it was an IRQ or a BRK.) This instruction ($4C XX YY) could be placed in a fixed location in RAM during the initial setup after reset. The address $YYXX provided after reset is the address of the BIOS service routine.

If your application wants to change that, it could overwrite XX YY with a new target address. (You may either save the original value somewhere or perhaps changing the BIOS setup in a way that there is a small subroutine that initializes this JMP to its default direction.)

The BIOS_ISR may even written in a way that it calls another RAM based JMP (say "JMP IRQservice_exit") that is setup to point to a RTI instruction. Then you have the choice of processing interrupts before and/or after BIOS.



my 2 cents


Top
 Profile  
Reply with quote  
 Post subject: Re: JSR Indirect Address
PostPosted: Wed May 31, 2017 1:02 am 
Offline

Joined: Fri Apr 15, 2016 1:03 am
Posts: 139
You can "jsr abs" to a "jmp (abs)".

Something like:
etc
    JSR ?ToBiosIrqHandler ; JSR (biosIrqHandler)
etc
JSR ?ToBiosIrqHandler ; JSR (biosIrqHandler)
etc
RTI

?ToBiosIrqHandler:  JMP  (biosIrqHandler)


Top
 Profile  
Reply with quote  
 Post subject: Re: JSR Indirect Address
PostPosted: Wed May 31, 2017 1:12 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8479
Location: Midwestern USA
Alarm Siren wrote:
As best as I can tell, this isn't possible natively, but I thought someone might have an idea...

Just my curmudgeonly opinion, but it seems to me like a convoluted way to go about it. In my POC BIOS, I just have the ISR handler jump through a page 1 vector, which normally points back to the continuation of the ISR. If I want to add something to the ISR I just point the vector to it, with the "wedged" add-on saving the original vector and jumping to it when done. If my wedge is replacing the BIOS' ISR it has the necessary code at the end to restore the MPU state and return to the foreground routine.

As a rule, I never use subroutine calls in an ISR.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: JSR Indirect Address
PostPosted: Wed May 31, 2017 1:53 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Alarm Siren wrote:
Basically, I want to do "JSR (a)". Obviously this doesn't exist - JSR only does "JSR a". I could perhaps synthesize it using by constructing the appropriate values on the stack before using "JMP (a)"? But that seems messy.
Surely there's some setup, but it's not that messy. And "JSR (a)" is an elegant way of doing things (generally, I mean -- not necessarily in context of an ISR).

A 6502 or 'C02 takes 6 bytes (and 10 cycles) to put the return address on stack ( LDA#, PHA, LDA#, PHA ). An '816 can use PEA, which is even smaller and faster (and doesn't trash A).

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
 Post subject: Re: JSR Indirect Address
PostPosted: Wed May 31, 2017 2:02 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
If it's only in one place, and in RAM, it would work well to use self-modifying code, where the variable holding the address to JSR to is the JSR instruction's own operand.  That eliminates the need for variable space elsewhere too, including in precious ZP space.

Whether you do it this way or not, make sure an interrupt can't hit between the writing of the two address bytes, since then you'll jump to an invalid address.

My 6502 stacks treatise has a chapter on synthesizing instructions with RTS, RTI, and JSR, at http://wilsonminesco.com/stacks/RTSsynth.html .

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: JSR Indirect Address
PostPosted: Wed May 31, 2017 9:33 am 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 362
GaBuZoMeu wrote:
I would setup the IRQ vector to point to a "JMP IRQservice" instruction somewhere in RAM. (Perhaps after checking whether it was an IRQ or a BRK.) This instruction ($4C XX YY) could be placed in a fixed location in RAM during the initial setup after reset. The address $YYXX provided after reset is the address of the BIOS service routine.

If your application wants to change that, it could overwrite XX YY with a new target address. (You may either save the original value somewhere or perhaps changing the BIOS setup in a way that there is a small subroutine that initializes this JMP to its default direction.)

The BIOS_ISR may even written in a way that it calls another RAM based JMP (say "JMP IRQservice_exit") that is setup to point to a RTI instruction. Then you have the choice of processing interrupts before and/or after BIOS.


See my comments below to BDD.

BigDumbDinosaur wrote:
Alarm Siren wrote:
As best as I can tell, this isn't possible natively, but I thought someone might have an idea...

Just my curmudgeonly opinion, but it seems to me like a convoluted way to go about it. In my POC BIOS, I just have the ISR handler jump through a page 1 vector, which normally points back to the continuation of the ISR. If I want to add something to the ISR I just point the vector to it, with the "wedged" add-on saving the original vector and jumping to it when done. If my wedge is replacing the BIOS' ISR it has the necessary code at the end to restore the MPU state and return to the foreground routine.


That is definitely the simplest method and one I have considered, but I rejected it because it requires the user programmer have an understanding of the internal operation of the IRQ handler in order to properly handle the various different circumstances. Also, if a naughty programmer didn't save the original IRQ vector but instead hard-coded it "because it never changes" and then I did change it.... my method doesn't allow the programmer to make that mistake and because its treated like a standard subroutine call within the ISR, doesn't require any special knowledge of the internal workings of the ISR.

Basically, I'm trying to make my BIOS API inherently backwards-compatible by not relying on any specific addresses, and insofar as is possible, make it resistant to programmers doing naughty things.

BigDumbDinosaur wrote:
As a rule, I never use subroutine calls in an ISR.

Why not? I know there will be a small performance hit from using JSR/RTS over JMP (a) JMP, but based on my reading of the datasheet, looking at 12 cycles vs 8 cycles respectively, which is hardly the end of the world...

leepivonka wrote:
You can "jsr abs" to a "jmp (abs)".

Something like:
etc
JSR ?ToBiosIrqHandler ; JSR (biosIrqHandler)
etc
JSR ?ToBiosIrqHandler ; JSR (biosIrqHandler)
etc
RTI

?ToBiosIrqHandler: JMP (biosIrqHandler)


Thank you, I hadn't considered that possibility but of course it provides the required functionality and is dead simple.

GARTHWILSON wrote:
If it's only in one place, and in RAM, it would work well to use self-modifying code, where the variable holding the address to JSR to is the JSR instruction's own operand. That eliminates the need for variable space elsewhere too, including in precious ZP space.


Unfortunately the whole BIOS IRQ routine is in the BIOS ROM, so this isn't an option.

[quuote="GARTHWILSON"]Whether you do it this way or not, make sure an interrupt can't hit between the writing of the two address bytes, since then you'll jump to an invalid address.[/quote]

A very good point. In the case of my API design, I'll make a note. Either you should SEI/CLI around that bit or you could BBR the relevant bits of my IRQ Control register. I think I prefer the latter in that is doesn't prevent the IRQ from firing immediately for vanilla functionality, but will also not cause the incomplete address to be dereferenced.

GARTHWILSON wrote:
My 6502 stacks treatise has a chapter on synthesizing instructions with RTS, RTI, and JSR, at http://wilsonminesco.com/stacks/RTSsynth.html .


Your website is a literal treasure trove, sir! I've most recently been having a good long read through your Stacks Treatise. Admittedly I've implemented it a bit differently to your method (I didn't like the idea of putting it in ZP as that space is precious), but I have got a software stack now for parameter passing.

Thank you all for your kind assistance, as always.


----


For my P.S. where
Code:
BBS0    biosIrqMode, ?HandlerPrologue
is for some reason (as best as I can tell a bug in the assembler) rejected due to an "invalid addressing mode" on biosIrqMode,
would you say the following code is equivalent?
Code:
    db $85
    db <biosIrqMode
    db ?HandlerPrologue-$

If it is I'll stick that in a macro and use it instead of the native BBS0 opcode that is apparently broken.

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
 Post subject: Re: JSR Indirect Address
PostPosted: Wed May 31, 2017 12:52 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Quote:
For my P.S. where
Code:
BBS0 biosIrqMode, ?HandlerPrologue
is for some reason (as best as I can tell a bug in the assembler) rejected due to an "invalid addressing mode" on biosIrqMode,
would you say the following code is equivalent?
Code:
db $85
db <biosIrqMode
db ?HandlerPrologue-$

If it is I'll stick that in a macro and use it instead of the native BBS0 opcode that is apparently broken.


Probably not, as the $ represents the program counter which is 16-bit, so the result would be a word, not a byte. Is there any chance that the branch calculation results to being out of range? Also, you didn't specify which assembler you're using (or I missed it). I use the BBRx/BBSx instructions with the WDC assembler and it hasn't given me any such errors. In any case, worth checking to see if it's an out of range error that is shown incorrectly.

Bad programmers will be bad programmers, period. You can't really compensate by coding. (Like BDD), I also use soft vectors (albeit in page $03) for IRQ, BRK, etc. and returns via vectors as well. This makes it easy to wedge in another routine pre or post.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: JSR Indirect Address
PostPosted: Wed May 31, 2017 5:09 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8479
Location: Midwestern USA
Alarm Siren wrote:
BigDumbDinosaur wrote:
As a rule, I never use subroutine calls in an ISR.

Why not? I know there will be a small performance hit from using JSR/RTS over JMP (a) JMP, but based on my reading of the datasheet, looking at 12 cycles vs 8 cycles respectively, which is hardly the end of the world...

The problem is in the effect of scale, not in the occasional use of a subroutine. Just for example: if a running program were to do a full screen (80×25) repaint and your machine is running a UART that doesn't have a FIFO, such as the 65C51, nearly 2000 IRQs will occur in rapid succession (specifically, at about 104 microsecond intervals if the serial data rate is 9600 bps). If your ISR has just one subroutine in it as you are planning, that amounts to 24,000 clock cycles expended just in processing the JSR/RTS pair, versus 16,000 cycles to process a JuMP indirect. A lot of foreground processing can get done in those extra 8000 clock cycles, y'know. :D

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: JSR Indirect Address
PostPosted: Wed May 31, 2017 6:41 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
Alarm Siren wrote:
GARTHWILSON wrote:
If it's only in one place, and in RAM, it would work well to use self-modifying code, where the variable holding the address to JSR to is the JSR instruction's own operand. That eliminates the need for variable space elsewhere too, including in precious ZP space.

Unfortunately the whole BIOS IRQ routine is in the BIOS ROM, so this isn't an option.

Can you copy just that portion of code to RAM upon boot-up?  Preventing the performance hit of the indirects in an ISR may be quite desirable.

Quote:
GARTHWILSON wrote:
Whether you do it this way or not, make sure an interrupt can't hit between the writing of the two address bytes, since then you'll jump to an invalid address.

A very good point. In the case of my API design, I'll make a note. Either you should SEI/CLI around that bit or you could BBR the relevant bits of my IRQ Control register. I think I prefer the latter in that is doesn't prevent the IRQ from firing immediately for vanilla functionality, but will also not cause the incomplete address to be dereferenced.

What I didn't think of when I wrote the above is the possibility that the different places to jump to could either be in the same page, or start at the same byte in different pages, so you only need to change one byte of the address, not both.  In that case, there's no worry about an interrupt hitting between the modification of two bytes.

Quote:
GARTHWILSON wrote:
My 6502 stacks treatise has a chapter on synthesizing instructions with RTS, RTI, and JSR, at http://wilsonminesco.com/stacks/RTSsynth.html .

Your website is a literal treasure trove, sir! I've most recently been having a good long read through your Stacks Treatise. Admittedly I've implemented it a bit differently to your method (I didn't like the idea of putting it in ZP as that space is precious), but I have got a software stack now for parameter passing.

Thank you.  Remember that the ZP data stack doesn't need nearly the depth one might think, and that it might pay for itself (or more than pay for itself) anyway by reducing the number of ZP variables you'll need.  Testing may be the only way to know for sure.  But yes, if you don't need the extra ZP addressing modes in the kinds of things you put on the data stack, you could, with the small one-cycle penalty, put the data stack elsewhere in RAM.  Even without implementing a data stack though, there's a lot in the stacks treatise that any 6502 programmer can take advantage of.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: JSR Indirect Address
PostPosted: Wed May 31, 2017 10:17 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 362
floobydust wrote:
Quote:
For my P.S. where
Code:
BBS0 biosIrqMode, ?HandlerPrologue
is for some reason (as best as I can tell a bug in the assembler) rejected due to an "invalid addressing mode" on biosIrqMode,
would you say the following code is equivalent?
Code:
db $85
db <biosIrqMode
db ?HandlerPrologue-$

If it is I'll stick that in a macro and use it instead of the native BBS0 opcode that is apparently broken.


Probably not, as the $ represents the program counter which is 16-bit, so the result would be a word, not a byte. Is there any chance that the branch calculation results to being out of range? Also, you didn't specify which assembler you're using (or I missed it). I use the BBRx/BBSx instructions with the WDC assembler and it hasn't given me any such errors. In any case, worth checking to see if it's an out of range error that is shown incorrectly.


Fair point on the out of range error. I too am using the official WDC assembler, insofar as I'm aware its the most recent version.

The EXACT code is:
Code:
  CODE
; Handler for IRQ.
IrqHandler:
    ; If bit 1 of biosIrqMode = 0 then skip custom IRQ handler
    BBR1    biosIrqMode, ?HandlerImpl
    JSR     ?ToCustomIrqHandler
   
?HandlerImpl:
    ; If bit 0 of biosIrqMode = 1 then skip the BIOS IRQ functionality
    BBS0    <biosIrqMode, ?HandlerPrologue
   
    PHA
    PHX
    PHY
   
    ; .... ETC

    PLY
    PLX
    PLA
   
?HandlerPrologue:
    BBR2    biosIrqMode, ?HandlerEnd
    JSR     ?ToCustomIrqHandler

?HandlerEnd:
    RTI
   
?ToCustomIrqHandler:
    ; Jump to custom IRQ Handler Subroutine
    JMP     (!biosIrqHandler)
   
  ENDS

Code:
  PAGE0
biosIrqMode     db
  ENDS

The error is:
Code:
    BBS0    biosIrqMode, ?HandlerPrologue
                       ^
Pass 1:File bios.asm; Line 78 # ERROR - Illegal addressing mode!


I don't believe its out of range or an incorrect type. If I replace BBS0 with BBS1 it compiles fine. Interestingly it also seems to compile OK if I change it to BBS0 <biosIrqMode, ?HandlerPrologue... maybe its getting confused about the addressing mode to use in this instance? Still seems odd since none of the other BBSx instructions complain.

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
 Post subject: Re: JSR Indirect Address
PostPosted: Wed May 31, 2017 11:19 pm 
Offline
User avatar

Joined: Wed Mar 01, 2017 8:54 pm
Posts: 660
Location: North-Germany
Alarm Siren wrote:
Basically, I'm trying to make my BIOS API inherently backwards-compatible by not relying on any specific addresses, and insofar as is possible, make it resistant to programmers doing naughty things.

You should consider a couple of API functions to ADD and REMOVE a custom IRQ handler with at least one option like REGS_ARE_SAVED/REGS_ARE_NOT_SAVED.

You should consider that there are more IRQ sources and polling is required to obtain the true originator. The customer may want to solve this by adding/removing specific handlers. So you need to maintain a chain of IRQ handlers. (Polling may even necessary if you have hardware for vectoring interrupts! e.g. 65C22) There should be an option to enchain an IRQ handler to the top of the list in order to gain quick response.

I don't know if it is appropriate to require a signal/flag from each enchained IRQ handler whether it has found its IRQ or not - just to have an option of "early exit" the chain. (Perhaps you have a hardware where an unused port input can be used to monitor the IRQ line, this way you could check whether the IRQ is already serviced or not.)


Top
 Profile  
Reply with quote  
 Post subject: Re: JSR Indirect Address
PostPosted: Thu Jun 01, 2017 4:45 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Quote:
I don't believe its out of range or an incorrect type. If I replace BBS0 with BBS1 it compiles fine. Interestingly it also seems to compile OK if I change it to BBS0 <biosIrqMode, ?HandlerPrologue... maybe its getting confused about the addressing mode to use in this instance? Still seems odd since none of the other BBSx instructions complain.


Well, I tried changing some of my code and used BBS0, it works without error. Also, the WDC Macro Assembler hasn't changed version in a very long time... should be 3.49.1. Perhaps try using full labels, i.e., sans the "?" in front of the label. It's not clear what the cause is, but make sure you check the source very closely for syntax. I've made several changes to a BBSx line in my source and it always assembles correctly. It would be interesting to figure what it is. You can also contact WDC and give them a sample of your code to try.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: JSR Indirect Address
PostPosted: Thu Jun 01, 2017 1:39 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
floobydust wrote:
It would be interesting to figure what it is.
Yes -- and my reverse-engineering instincts are aroused by the intrigue. Certainly the sensible thing is to contact WDC. But, purely for sport, I'd be tempted to try to fix the problem myself. :twisted: I'm making some assumptions, but it wouldn't surprise me if this could work:

Using a hex editor one could open the assembler executable and search for the text strings BBS0 (...) BBS7. Then have a look at the surrounding bytes, and see what pattern exists. Presumably all eight BBS instances will have accompanying bytes which are identical; also one which varies according to the associated opcode.

The smoking gun is if you find a byte(s) which is identical for only seven out of eight BBS instances. Presumably that encodes the permissible address modes, and for whatever reason it's corrupted in the BBS0 case. Change it to match the others, and see what happens!

Not everyone will consider this fun or worthwhile, and I'm half joking after all. But floating prospective solutions exercises creativity. A challenge like this is catnip for me! :mrgreen:


Edited to add:
    >for whatever reason it's corrupted in the BBS0 case

    Hmm, the corruption could be a typo or copy-paste error in the source code for the assembler, but it could also happen later when the code actually loads into RAM and runs. If it's the latter then I'm SOL. :|

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
 Post subject: Re: JSR Indirect Address
PostPosted: Thu Jun 01, 2017 8:56 pm 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
If the addresses you are testing are relative then you will need to prefix them with a '<' for force the assembler to see them as page zero (although in this case they must always be)
Code:
    34                              chip   w65c02s
    35                              
    36 00:0000: 4C xx xx           jmp   ?label
    37 00:0003: 7F 7F 03           bbr7   $7f,?label
    38 00:0006: 8F xx 00           bbs0   <TMP,?label
    39                              
    40 00:0009: EA           ?label:      nop

I hadn't spotted the '?' prefix for temporary label. Thanks for point that out.

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


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 post attachments in this forum

Search for:
Jump to: