top decor
ROM subroutines E-MMI ROM subroutines list


Note that every ROM subroutine call uses $70 with the beginning of the ROM address and $6F register to return.

The information is carefully checked only for those subroutines which code is published!


Print INT64 value subroutine

Entry: 10

In: $71 - integer value
Out: nothing, only print to screen
Mod: $71 - $74; buffer in system RAM: maximum EA00...006C - EA00...007F

Comments: Prints 64-bit integer (positive or negative) to screen

Subroutine code: here


Input INT64 value subroutine

Entry: 14

In: no
Out: $71 - input value
Mod: $71 - $76; buffer in system RAM: maximum EA00...0060 - EA00...0076

Comments: Converts text string (till "Enter") to 64-bit integer; controls input for correct digits and shows incorrect one the following way:

123e4
   ^???
(to say truth, this works correctly only when number is input from the very beginning of the string...)

Subroutine code: here


Print DOUBLE value subroutine (with 9 digits)

Entry: 18

In: $71 - double value
Out: nothing, only print to screen
Mod: $71

Comments: subroutine prints float number with 9 digits. To get another number of digits, use the next subroutine

Print DOUBLE value subroutine

Entry: 1C

In: $71 - double value, $72 - number of digits
Out: nothing, only print to screen
Mod: $71

Comments:

Input DOUBLE value subroutine

Entry: 20

In: no
Out: $71 - input value
Mod:

Comments:


Print CHAR value subroutine

Entry: 24

In: $71 - character code
Out: nothing, only print to screen
Mod: no

Comments:

Subroutine code: here


Input CHAR value subroutine

Entry: 28

In: no
Out: $71 - input character
Mod: no

Comments:

Subroutine code: here


Print BOOLEAN value subroutine

Entry: 2C

In: $71 - boolean value: 0 - FALSE, else TRUE
Out: nothing, only print to screen
Mod: $71 - $73

Comments: Uses next subroutine

Subroutine code: here


Print text after subroutine call

Entry: 30

In: text after subroutine call (first byte - number of symbols)
Out: nothing, only print to screen
Mod: $71, $72

Comments: To use this subroutine you must do the following. After standard GO instruction with displacement 30 put number of symbols in the text string into next byte and then text itself. As MMIX instruction of our program after the text must have address multiply by 4, fill if necessary the rest bytes by zeros for example. Say for text "NO" the required 4 bytes after the subroutine call may be
02 4E 4F 00

Subroutine code: here


Next line subroutine

Entry: 34

In: no
Out: nothing, only print to screen
Mod: $71

Comments: Prints CR and LF codes.

Subroutine code: here


Convert INT64 to DOUBLE subroutine

Entry: 38

In: $71 - integer value
Out: $71 - float value
Mod:

Comments:

Convert DOUBLE to INT64 subroutine (with round)

Entry: 3C

In: $71 - float value
Out: $71 - integer value
Mod:

Comments:

Convert DOUBLE to INT64 subroutine (with trunc)

Entry: 40

In: $71 - float value
Out: $71 - integer value
Mod:

Comments:

back previous page next page forward


Related topics:

E-MMI software
 

  (C) 2003, Evgeny Eremin. rEd-MMI project documentation