Re: Questions from a newbie

From: Rich (legalize_at_xmission.com)
Date: 2005-01-28 19:33:00

In article <20050128174016.GA3200@nodoiuna.lsi.upc.es>,
    Jordi Delgado <jdelgado@lsi.upc.edu>  writes:

> BTW, someone mentioned the TIM you get by doing SYS 1024.

To transfer to the monitor, you need to execute a BRK instruction,
which transfers control to the software interrupt vector which in turn
transfers control to the monitor in the ROM.  SYS 1024 transfers
control to location 1024 which is always zero.  You can actually SYS
any address containing a zero byte and be transferred to the monitor.

> Now, Let's suppose you enter a program using the Monitor (after
> getting the hex code from assembling it in another computer), then, how to sa
ve
> it in a disk?

An easy way might be to write a simple basic program that did PEEKs at
the range of memory used by your code and write that one byte at
a time to a .PRG file opened as a sequential byte file.  You write on
the "loader" header that tells the basic loader where your assembly
code should be loaded.

We had a discussion about this very subject on this list just a few
weeks ago -- I was asking the same questions.
-- 
"The Direct3D Graphics Pipeline"-- code samples, sample chapter, FAQ:
          <http://www.xmission.com/~legalize/book/>
             Pilgrimage: Utah's annual demoparty
                <http://pilgrimage.scene.org>

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.