Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

The solution to a problem changes the nature of the problem. -- Peer


devel / comp.lang.asm.x86 / Re: assembly code find error

SubjectAuthor
* assembly code find errorOwn Muhammad
`* assembly code find errorR.Wieser
 `* assembly code find errorKerr-Mudd, John
  `* assembly code find errorR.Wieser
   `* assembly code find errorJust_Craig
    `- assembly code find errorR.Wieser

1
assembly code find error

<44f2262a-3189-4faf-93f5-3b0def44bd95n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=452&group=comp.lang.asm.x86#452

  copy link   Newsgroups: comp.lang.asm.x86
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: cj8802335@gmail.com (Own Muhammad)
Newsgroups: comp.lang.asm.x86
Subject: assembly code find error
Date: Mon, 10 Jul 2023 12:39:48 -0700 (PDT)
Organization: A noiseless patient Spider
Lines: 128
Approved: fbkotler@myfairpoint.net - comp.lang.asm.x86 moderation team.
Message-ID: <44f2262a-3189-4faf-93f5-3b0def44bd95n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Date: Mon, 10 Jul 2023 19:39:49 +0000
Injection-Info: dont-email.me; posting-host="54db06c3da7bc6513065a809abadf3bd";
logging-data="2789083"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180CpPhMw1LtZ3UnVl2cFYefoGX3LbYH1U="
User-Agent: G2/1.0
Cancel-Lock: sha1:2Doh4lE2jjv9vTbYxPCAvK76ODA=
 by: Own Muhammad - Mon, 10 Jul 2023 19:39 UTC

[org 0x0100]

jmp start

section data

name db'Name:Ali shan',0

vuid db'VUID :bc210410288',0

vuid_asc db'vuid sorted:001122488'
,0
vuid_desc db'vuid sorted:884221100',0

Current_values db vuid-vuid

section text
start;
mov ah,0
mov al,3
int 0x10

mov ah,0x0e
mov si,name
call print_string_color

mov al,0x0d
int 0x10
mov al,0x0a
int 0x10
mov si,current_values
call print_string_color

mov ax,0
mov es,ax
cli
mov word[es:9*4],kbisr
mov [es:9*4+2],cs
sti
l1:
mov ah,0
int 0x16
cmp al,27
jne l1
mov ax,0x4c00
int 0x21

kbisr:
push ax
push es
mov ax,0xb800
mov es,ax
in al,0x60
cmp al,0x2a
je.left_shift_pressed
cmp al,0x36
je.right_shift_pressed

mov ax,0
int 0x10
jmp.end

..left_shift_pressed:
mov ax,0
int 0x10
mov ah,0x0e
mov si,name
call print_string_color

mov al,0x0d
int 0x10
mov al,0x0a
int 0x10
mov si,vuid
call print_string_color

mov al,0x0d
int 0x10
mov al,0x0a
int 0x10
mov si,vuid_desc
call print_string_color

jmp end
..right_shift_pressed:
mov ax,0
int 0x10
mov ah,0x0e
mov si,name
call print_string_color

mov al,0x0d
int 0x10
mov al,0x0a
int 0x10

mov si,vuid
call print_string_color
mov al,0x0d
int 0x10
mov al,0x0a
int 0x10

mov ah,0x0e
mov si,vuid_asc
call print_string_color

..end:
mov al,0x20
out 0x20,al
pop es
pop ax
iret
print_string_color:
lodsb
cmp al,0
je.done
mov ah,0x0e
mov bh,0
int 0x10
jmp priny_string_color

..done:
ret

Re: assembly code find error

<u8isui$2rhni$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=453&group=comp.lang.asm.x86#453

  copy link   Newsgroups: comp.lang.asm.x86
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@nospicedham.is.invalid (R.Wieser)
Newsgroups: comp.lang.asm.x86
Subject: Re: assembly code find error
Date: Tue, 11 Jul 2023 08:30:27 +0200
Organization: A noiseless patient Spider
Lines: 15
Approved: fbkotler@myfairpoint.net - comp.lang.asm.x86 moderation team.
Message-ID: <u8isui$2rhni$1@dont-email.me>
References: <44f2262a-3189-4faf-93f5-3b0def44bd95n@googlegroups.com>
Injection-Info: dont-email.me; posting-host="54db06c3da7bc6513065a809abadf3bd";
logging-data="3014711"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/lJdmr7cEuy89Myvu+HTCoUosabJIJq60="
Cancel-Lock: sha1:MZ63bqjTpPk8taMMA4Kluln8U2Q=
 by: R.Wieser - Tue, 11 Jul 2023 06:30 UTC

Own Muhammad,

[snip code]

I think you forgot to include the explanation to what the code is supposed
to do and what it does instead (what the problem is). And ofcourse also
what you did yourself to find the problem.

Start explaining with why you are intercepting int 9 (but not restoring it
<-- which just /might/ be the whole problem ....).

Regards,
Rudy Wieser

Re: assembly code find error

<20230711104220.a38ae4baa198913627bdccec@127.0.0.1>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=454&group=comp.lang.asm.x86#454

  copy link   Newsgroups: comp.lang.asm.x86
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: admin@nospicedham.127.0.0.1 (Kerr-Mudd, John)
Newsgroups: comp.lang.asm.x86
Subject: Re: assembly code find error
Date: Tue, 11 Jul 2023 10:42:20 +0100
Organization: Dis
Lines: 23
Approved: fbkotler@myfairpoint.net - comp.lang.asm.x86 moderation team.
Message-ID: <20230711104220.a38ae4baa198913627bdccec@127.0.0.1>
References: <44f2262a-3189-4faf-93f5-3b0def44bd95n@googlegroups.com>
<u8isui$2rhni$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="54db06c3da7bc6513065a809abadf3bd";
logging-data="3040039"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4NOk2XQxS2aPSFURP+arD1GjrYAEDDuU="
Cancel-Lock: sha1:7ST4t2PM7IE6EQe84yX7KkNbF44=
 by: Kerr-Mudd, John - Tue, 11 Jul 2023 09:42 UTC

On Tue, 11 Jul 2023 08:30:27 +0200
"R.Wieser" <address@nospicedham.is.invalid> wrote:

> Own Muhammad,
>
> [snip code]
>
> I think you forgot to include the explanation to what the code is supposed
> to do and what it does instead (what the problem is). And ofcourse also
> what you did yourself to find the problem.
>
> Start explaining with why you are intercepting int 9 (but not restoring it
> <-- which just /might/ be the whole problem ....).
>
There's at least 2 syntax/spelling errors in the code as posted, just from
a quick glance.

It looks as if someone is trying to hack together some code from
something borrowed from elsewhere with not much understanding of what it's
(supposed) to do.
--
Bah, and indeed Humbug.

Re: assembly code find error

<u8jed1$2tavr$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=455&group=comp.lang.asm.x86#455

  copy link   Newsgroups: comp.lang.asm.x86
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@nospicedham.is.invalid (R.Wieser)
Newsgroups: comp.lang.asm.x86
Subject: Re: assembly code find error
Date: Tue, 11 Jul 2023 13:28:21 +0200
Organization: A noiseless patient Spider
Lines: 11
Approved: fbkotler@myfairpoint.net - comp.lang.asm.x86 moderation team.
Message-ID: <u8jed1$2tavr$1@dont-email.me>
References: <44f2262a-3189-4faf-93f5-3b0def44bd95n@googlegroups.com><u8isui$2rhni$1@dont-email.me> <20230711104220.a38ae4baa198913627bdccec@127.0.0.1>
Injection-Info: dont-email.me; posting-host="54db06c3da7bc6513065a809abadf3bd";
logging-data="3060447"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+cx460VHvE62dCnk3i88fOZRShVmVbahE="
Cancel-Lock: sha1:ATM4mkaVWNRlp7Nr6XkvgGxesdM=
 by: R.Wieser - Tue, 11 Jul 2023 11:28 UTC

John,

> with not much understanding of what it's (supposed) to do.

.... Almost as if the code is an assignment from a teacher who tries to
figure out how much the student picked up from his tutoring.

Regards,
Rudy Wieser

Re: assembly code find error

<717b3d31-7c95-43c5-b4e7-49d459f90006n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=470&group=comp.lang.asm.x86#470

  copy link   Newsgroups: comp.lang.asm.x86
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: craigmeyer.corporate@nospicedham.gmail.com (Just_Craig)
Newsgroups: comp.lang.asm.x86
Subject: Re: assembly code find error
Date: Wed, 2 Aug 2023 04:58:51 -0700 (PDT)
Organization: A noiseless patient Spider
Lines: 12
Approved: fbkotler@myfairpoint.net - comp.lang.asm.x86 moderation team.
Message-ID: <717b3d31-7c95-43c5-b4e7-49d459f90006n@googlegroups.com>
References: <44f2262a-3189-4faf-93f5-3b0def44bd95n@googlegroups.com>
<u8isui$2rhni$1@dont-email.me> <20230711104220.a38ae4baa198913627bdccec@127.0.0.1>
<u8jed1$2tavr$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Date: Wed, 02 Aug 2023 11:58:51 +0000
Injection-Info: dont-email.me; posting-host="524a22ad7f1fe9ec0d467dee8c1d3dce";
logging-data="73722"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+P5smYnkFV8dqS03fBJ3upfqs8sMgWcQI="
User-Agent: G2/1.0
Cancel-Lock: sha1:BS0GBRwNmMVJE2SwFE1tI0dbxKQ=
 by: Just_Craig - Wed, 2 Aug 2023 11:58 UTC

On Tuesday, 11 July 2023 at 13:38:12 UTC+2, R.Wieser wrote:
> John,
> > with not much understanding of what it's (supposed) to do.
> ... Almost as if the code is an assignment from a teacher who tries to
> figure out how much the student picked up from his tutoring.
>
> Regards,
> Rudy Wieser

i suspect as much -
https://www.studocu.com/row/document/virtual-university-of-pakistan/introduction-to-assembly-language/org-0x0100-well/64920331

Re: assembly code find error

<uadq9b$43sm$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=471&group=comp.lang.asm.x86#471

  copy link   Newsgroups: comp.lang.asm.x86
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@nospicedham.is.invalid (R.Wieser)
Newsgroups: comp.lang.asm.x86
Subject: Re: assembly code find error
Date: Wed, 2 Aug 2023 16:46:48 +0200
Organization: A noiseless patient Spider
Lines: 31
Approved: fbkotler@myfairpoint.net - comp.lang.asm.x86 moderation team.
Message-ID: <uadq9b$43sm$1@dont-email.me>
References: <44f2262a-3189-4faf-93f5-3b0def44bd95n@googlegroups.com> <u8isui$2rhni$1@dont-email.me> <20230711104220.a38ae4baa198913627bdccec@127.0.0.1> <u8jed1$2tavr$1@dont-email.me> <717b3d31-7c95-43c5-b4e7-49d459f90006n@googlegroups.com>
Injection-Info: dont-email.me; posting-host="524a22ad7f1fe9ec0d467dee8c1d3dce";
logging-data="136146"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18QWJkRjd1SKI5Nni+WNCDwowcjp61JJRw="
Cancel-Lock: sha1:1ZL6OIf6lWEuwZyihW2uaMXpv7A=
 by: R.Wieser - Wed, 2 Aug 2023 14:46 UTC

Just_Craig,

>> ... Almost as if the code is an assignment from a teacher who tries to
>> figure out how much the student picked up from his tutoring.
>>
>> Regards,
>> Rudy Wieser
>
> i suspect as much -
> https://www.studocu.com/row/document/virtual-university-of-pakistan/introduction-to-assembly-language/org-0x0100-well/64920331

Thats a good find. :-)

Though I assumed that the posted code was provided by the teacher, to see if
the students would be able to figure out which mistakes where made in it and
fix them (spelling as well as method and missing/extra commands).

In regard to the link, I only see the "scroll a window in the screen" INT 10
, AX=0x0600 call. - which isn't even part of the solution (the result are
supposed to be on fixed lines on the screen).

I must say that the part "it prints your VUID in the ascending order" is ...
iffy to me (just "display 'hello world' " would have done as well and would
not be confusing). On the other hand, it shows that the poster didn't
overthink that part, and just put it into a string (instead of going for a
sorting routine). Point for the poster I guess.

Regards,
Rudy Wieser

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor