Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
; License:	https://www.linuxnasm.org/index.php/license
; Name: bebankacc.asm
; ; Build: nasm "-felf64" bebankacc.asm -l bebankacc.lst -o bebankacc.o ; ld -s -melf_x86_64 -o bebankacc bebankacc.o ../libmodulo97/libmodulo97.a ; ; Description: Modulo 97 check on Belgian Bankaccount Numbers %define COMMAND "bebankacc" %define PURPOSE "Belgian bank account number check in pure NASM <http://www.nasm.us>." %define APPLICATIONTITLE "Belgian bank account number" %define NUMBERLENGTH 12 %define NUMBERSTRING "12" %macro MODULO97CHECK 0 mov rdi, rax call Modulo97.Check %endm [list -] %include "../template/mod97.template" [list +]
Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
; License:	https://www.linuxnasm.be/index.php/license
; Name: bedrvrlic.asm
; ; Build: nasm "-felf64" bedrvrlic.asm -l bedrvrlic.lst -o bedrvrlic.o ; ld -s -melf_x86_64 -o bedrvrlic bedrvrlic.o ../libmodulo97/libmodulo97.a ; ; Description: Modulo 97 check on Belgian Drivers Licenses %define COMMAND "bedrvrlic" %define PURPOSE "Belgian drivers license number check in pure NASM <http://www.nasm.us>." %define APPLICATIONTITLE "Belgian drivers license" %define NUMBERLENGTH 10 %define NUMBERSTRING "10" %macro MODULO97CHECK 0 ; RAX has the converted number, we need to extract the last two decimal digits xor rdx, rdx mov rbx, 100 div rbx ; RDX = checkdigits, RAX = number mov rcx, 97 sub rcx, rdx ; RCX = 97 - modulo97(number) xor rdx, rdx mul rbx ; RAX = number * 100 add rax, rcx ; new number to check mov rdi, rax call Modulo97.Check %endm [list -] %include "../template/mod97.template" [list +]
Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
; License:	https://www.linuxnasm.be/index.php/license
; Name: berrn.asm
; ; Build: nasm "-felf64" berrn.asm -l berrn.lst -o berrn.o ; ld -s -melf_x86_64 -o berrn berrn.o ../libmodulo97/libmodulo97.a ; ; Description: Modulo 97 check on Belgian Rijksregister Numbers ; ; Remark: ; Checking the Belgian Rijksregister Number is a bit more tricky. We have to deal with birthdays before the year 2000 and ; after or in the year 2000. The algorithm is as follows. ; ; checkdigits = 97 - (n mod 97) for years before 2000 ; ; when this gives a wrong mod97 check we could have to deal with birth years after 1999. ; in this case we have to re-test with ; checkdigits = 97 - ((n + 20000000000) mod 97) ; ; when we extract the checkdigits from the number first, we can add 200000000 to RAX instead of 20000000000. The assembler will not comply ; with a warning: signed dword immediate exceeds bounds %define COMMAND "berrn" %define PURPOSE "Belgian Rijksregister number check in pure NASM <http://www.nasm.us>." %define APPLICATIONTITLE "Belgian Rijksregister Number" %define NUMBERLENGTH 11 %define NUMBERSTRING "11" %macro MODULO97CHECK 0 xor r9, r9 ; RAX has the converted number, we need to extract the last two decimal digits mov r8, rax .retest: xor rdx, rdx mov rbx, 100 div rbx ; RDX = checkdigits, RAX = number and r9, r9 jz .before2000 add rax, 2000000000 .before2000: mov rcx, 97 sub rcx, rdx ; RCX = 97 - modulo97(number) xor rdx, rdx mul rbx ; RAX = number * 100 add rax, rcx ; new number to check mov rdi, rax call Modulo97.Check jnc .legaldone and r9, r9 jnz .illegaldone mov rax, r8 inc r9 jmp .retest .illegaldone: stc .legaldone: %endm [list -] %include "../template/mod97.template" [list +]
Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
; License:	https://www.linuxnasm.be/index.php/license
; Name: beidcard.asm
; ; Build: nasm "-felf64" beidcard.asm -l beidcard.lst -o beidcard.o ; ld -s -melf_x86_64 -o beidcard beidcard.o ../libmodulo97/libmodulo97.a ; ; Description: Modulo 97 check on Belgian ID card Numbers %define COMMAND "beid" %define PURPOSE "Belgian ID card number check in pure NASM <http://www.nasm.us>." %define APPLICATIONTITLE "Belgian ID card" %define NUMBERLENGTH 12 %define NUMBERSTRING "12" %macro MODULO97CHECK 0 mov rdi, rax call Modulo97.Check %endm [list -] %include "../template/mod97.template" [list +]
Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
; License:	https://www.linuxnasm.be/index.php/license
; Name: bedrvrlic.asm ; ; Build: nasm "-felf64" besiscard.asm -l besiscard.lst -o besiscard.o ; ld -s -melf_x86_64 -o besiscard besiscard.o ../libmodulo97/libmodulo97.a ; ; Description: Modulo 97 check on Belgian SIS card Numbers %define COMMAND "besiscard" %define PURPOSE "Belgian SIS card Number check in pure NASM <http://www.nasm.us>." %define APPLICATIONTITLE "Belgian SIS card Number" %define NUMBERLENGTH 10 %define NUMBERSTRING "10" %macro MODULO97CHECK 0 mov rdi, rax call Modulo97.Check %endm [list -] %include "../template/mod97.template" [list +]