Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hi,

ich hab mir bei Programmersheaven den MicroAsm v1.0 runtergeladen

und versucht ein Programm von mir zu Compilieren.

Dabei hab ich ein paar Sprungadressen in Labels geändert, und zwar so

wie in der dzugehörigen Hilfe gezeigt wird.

Trotzdem bekomme ich immer den Fehler "Jump out of Range", habt ihr ne Ahnung warum?

Hier mal der Code:


#make_COM#

; COM file is loaded at CS:0100h
ORG 100h

MOV AH,01
INT 21
MOV BL,AL
MOV AH,07
INT 21
MOV BH,AL
CMP BH,0D
JNZ label1 //Jump out of Range
MOV BH,30
XCHG BL,BH
label1:
PUSH BX
MOV BH,00
MOV AH,03
INT 10
MOV DL,00
MOV AH,02
INT 10
POP BX
MOV DL,BL
MOV AH,02
INT 21
MOV DL,BH
INT 21
MOV DL,2D
INT 21
MOV [0300],BL
MOV [0302],BH
MOV AH,01
INT 21
MOV BL,AL
MOV AH,07
INT 21
MOV BH,AL
CMP BH,0D
JNZ label2 //Jump out of Range
MOV BH,30
XCHG BL,BH
label2:
PUSH BX
MOV AH,03
MOV BH,00
INT 10
MOV AH,02
MOV DL,03
INT 10
POP BX
MOV DL,BL
MOV AH,02
INT 21
MOV DL,BH
INT 21
MOV DL,3D
INT 21
MOV [0304],BL
MOV [0306],BH
MOV CL,00
MOV AL,[0306]
SUB AL,30
MOV [0308],AL
MOV AL,[0302]
SUB AL,[0308]
CMP AL,30
JNB label3 //Jump out of Range
ADD AL,0A
MOV CL,01
label3:
MOV [0310],AL
MOV AL,[0304]
SUB AL,30
MOV [0314],AL
MOV AL,[0300]
SUB AL,[0314]
SUB AL,CL
MOV [0312],AL
MOV DL,[0312]
MOV AH,02
INT 21
MOV DL,[0310]
INT 21
MOV AH,07
INT 21
INT 20
[/PHP]

Gruß

Guybrush

hi,

du musst einen NEAR jump und keinen SHORT jump verwenden

hab dazu was für dich ausgegegraben:

any conditional jump (JA, JB, JE, JZ, JS, JP, JCXZ, JC, JO, and their

negative equivalents (JNA, JNB, JNAE, JAE, etc.) all have a range of

+127 to -128 of the statement itself. This 1-byte offset jump is called

a SHORT jump. I don't know which compiler you are using but on the 386

you can use an alternate form called the NEAR conditional jump which has

a range of anywhere in the current segment. Usually a JB NEAR <address>

should work. well, it does in NASM :-). maybe .386 may work for you.

if you can't use that/must write for 80286 and below, you can use a

skip construct:

JE OutOfRange

becomes:

JNE Skip1 'the OPPOSITe. JE -> JNE, JC -> JNC, JNA -> JA, etc.

JMP OutOfRange

.Skip1:

because JMP is a NEAR jump (anywhere in the segment). a FAR jump can

only be done using JMPs or CALLs (not a conditional jump) and can jump

anywhere- includes a segment and an offset.

Viel Spass

Striper

hast du 368+ Instructions eigeschalten?

####################################

Short jumps can only jump +-128 bytes. To fix this, use

JUMPS

or

.386

or

je Label

change to

jne There

jmp Label

There:

or if you use ".386" or better, you can also

use the "/m#" command line switch to allow multiple

passes

TASM /m9 File.ASM

and TASM will optimize all JMP/Jcc to the smallest

opcode possible.

####################################

ich quote mich mal selber:

Original geschrieben von striper

if you can't use that/must write for 80286 and below, you can use a

skip construct:

JE OutOfRange

becomes:

JNE Skip1 'the OPPOSITe. JE -> JNE, JC -> JNC, JNA -> JA, etc.

JMP OutOfRange

.Skip1:

Striper

dann versuch doch den Skip

Striper

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.